"Ogg" හි සංශෝධන අතර වෙනස්කම්

Content deleted Content added
No edit summary
No edit summary
11 පේළිය:
 
Because the format is free, and its reference implementation is non-[[copyleft]]ed, Ogg's various codecs have been incorporated into a number of different free and [[proprietary software|proprietary]] [[media player (application software)|media players]], both commercial and non-commercial, as well as [[portable media player]]s and [[GPS]] receivers from different manufacturers.
 
== පිටු ව්‍යුහය ==
{{Main|Ogg පිටු}}
The following is the field layout of an Ogg page header:
 
[[File:Ogg page header structure (en).svg|512px|center|The field layout of an Ogg page header]]
 
;Capture pattern – 32 bits
:The capture pattern or sync code is a [[magic number (programming)|magic number]] used to ensure synchronisation when parsing Ogg files. Every page starts with the four ASCII character sequence ''OggS''. This assists in resynchronising a parser in cases where data has been lost or is corrupted, and is a sanity check before commencing parsing the page structure.
 
;Version – 8 bits
:This field indicates the version of the Ogg bitstream format, to allow for future expansion. It is currently mandated to be 0.
 
;Header type – 8 bits
:This is an 8 bit field of flags, which indicates the type of page that follows. The rightmost or least significant bit is considered bit 0, with value 0x01, the next least significant digit is bit 1, with value 0x02. The third is bit 2, with value 0x04, and so on.
:{| class="wikitable"
! style="width:5%;"|Bit
! style="width:10%;"|Value
! style="width:10%;"|Flag
! style="width:75%;"|Page type
|-
|0
|0x01
|Continuation
|The first packet on this page is a continuation of the previous packet in the logical bitstream.
|-
|1
|0x02
|BOS
|Beginning Of Stream. This page is the first page in the logical bitstream. The BOS flag must be set on the first page of every logical bitstream, and must not be set on any other page.
|-
|2
|0x04
|EOS
|End Of Stream. This page is the last page in the logical bitstream. The EOS flag must be set on the final page of every logical bitstream, and must not be set on any other page.
|}
 
;Granule position – 64 bits
:A granule position is the time marker in Ogg files. It is an abstract value, whose meaning is determined by the codec. It may for example be a count of the number of samples, the number of frames or a more complex scheme.
 
;Bitstream serial number – 32 bits
:This field is a serial number that identifies a page as belonging to a particular logical bitstream. Each logical bitstream in a file has a unique value, and this field allows implementations to deliver the pages to the appropriate decoder. In a typical vorbis and theora file, one stream is the audio (vorbis), and the other is the video (theora)
 
;Page sequence number – 32 bits
:This field is a monotonically increasing field for each logical bitstream. The first page is 0, the second 1, etc. This allows implementations to detect when data has been lost.
 
;[[Checksum]] – 32 bits
:This field provides a checksum of the data in the entire page, performed with the checksum field set to 0. This allows verification that the data has not been corrupted since it was created. Pages that fail the checksum should be discarded.
 
;Page segments – 8 bits
:This field indicates the number of segments that exist in this page. It also indicates how many bytes are in the segment table that follows this field. There can be a maximum of 255 segments in any one page.
 
;Segment table
:The segment table is an 8 bit vector of values indicating the length of each segment within the page body. The number of segments is determined from the preceding Page Segments field. Each segment is between 0 and 255 bytes in length.
 
The segments provide a way to group segments into packets, which are meaningful units of data for the decoder. When the segment's length is indicated to be 255, this indicates that the following segment is to be concatenated to this one and is part of the same packet. When the segment's length is 0–254, this indicates that this segment is the final segment in this packet. Where a packet's length is a multiple of 255, the final segment is length 0.
 
Where the final packet continues on the next page, the final segment value is 255, and the continuation flag is set on the following page to indicate that the start of the new page is a continuation of last page.
 
 
"https://si.wikipedia.org/wiki/Ogg" වෙතින් සම්ප්‍රවේශනය කෙරිණි