|
| OggPage () |
| Constructs a new Ogg page.
|
|
| OggPage (std::istream &stream, std::uint64_t startOffset, std::int32_t maxSize) |
| Constructs a new OggPage and instantly parses the header read from the specified stream at the specified startOffset.
|
|
void | parseHeader (std::istream &stream, std::uint64_t startOffset, std::int32_t maxSize) |
| Parses the header read from the specified stream at the specified startOffset.
|
|
std::uint64_t | startOffset () const |
| Returns the start offset of the page.
|
|
std::uint8_t | streamStructureVersion () const |
| Returns the stream structure version.
|
|
std::uint8_t | headerTypeFlag () const |
| Returns the header type flag.
|
|
bool | isContinued () const |
| Returns whether this page is a continued packet (true) or a fresh packet (false).
|
|
bool | isFirstpage () const |
| Returns whether this page is the first page of the logical bitstream.
|
|
bool | isLastPage () const |
| Returns whether this page is the last page of the logical bitstream.
|
|
bool | isLastSegmentUnconcluded () const |
| Returns whether the last segment is unconcluded (the last lacing value of the last segment is 0xFF).
|
|
std::uint64_t | absoluteGranulePosition () const |
| Returns the absolute granule position.
|
|
std::uint32_t | streamSerialNumber () const |
| Returns the stream serial number.
|
|
bool | matchesStreamSerialNumber (std::uint32_t streamSerialNumber) const |
| Returns whether the stream serial number of the current instance matches the specified one.
|
|
std::uint32_t | sequenceNumber () const |
| Returns the page sequence number.
|
|
std::uint32_t | checksum () const |
| Returns the page checksum.
|
|
std::uint8_t | segmentTableSize () const |
| Returns the size of the segment table.
|
|
const std::vector< std::uint32_t > & | segmentSizes () const |
| Returns the sizes of the segments of the page in byte.
|
|
std::uint32_t | headerSize () const |
| Returns the header size in byte.
|
|
std::uint32_t | dataSize () const |
| Returns the data size in byte.
|
|
std::uint32_t | totalSize () const |
| Returns the total size of the page in byte.
|
|
std::uint64_t | dataOffset (std::vector< std::uint32_t >::size_type segmentIndex=0) const |
| Returns the data offset of the segment with the specified segmentIndex.
|
|
The OggPage class is used to parse Ogg pages.
- See also
- http://www.xiph.org/ogg/doc/framing.html
- Todo
- Add field for additional flags in v11.
std::uint64_t TagParser::OggPage::absoluteGranulePosition |
( |
| ) |
const |
|
inline |
Returns the absolute granule position.
The position specified is the total samples encoded after including all packets finished on this page (packets begun on this page but continuing on to the next page do not count). The rationale here is that the position specified in the frame header of the last page tells how long the data coded by the bitstream is. A truncated stream will still return the proper number of samples that can be decoded fully.
A special value of '-1' (in two's complement) indicates that no packets finish on this page.
Definition at line 153 of file oggpage.h.
std::uint32_t TagParser::OggPage::streamSerialNumber |
( |
| ) |
const |
|
inline |
Returns the stream serial number.
Ogg allows for separate logical bitstreams to be mixed at page granularity in a physical bitstream. The most common case would be sequential arrangement, but it is possible to interleave pages for two separate bitstreams to be decoded concurrently. The serial number is the means by which pages physical pages are associated with a particular logical stream.
Definition at line 166 of file oggpage.h.