Audio::TagLib::Ogg::PageHeader - An implementation of the page headers associated with each Ogg::Page
use Audio::TagLib::Ogg::PageHeader; my $i = Audio::TagLib::Ogg::PageHeader->new(); $i->setFirstPacketContinued(1); print $i->firstPacketContinued() ? "true" : "false", "\n"; # got "true"
This class implements Ogg page headers which contain the information about Ogg pages needed to break them into packets which can be passed on to the codecs.
Reads a PageHeader from $file starting at $pageOffset. The defaults create a page with no (and as such, invalid) data that must be set later.
Deletes this instance of the PageHeader.
Returns true if the header parsed properly and is valid.
Ogg pages contain a list of packets (which are used by the contained codecs). The sizes of these pages is encoded in the page header. This returns a list of the packet sizes in bytes.
Sets the sizes of the packets in this page to sizes on the stack. Internally this updates the lacing values in the header.
Some packets can be coutinued across multiple pages. If the first packet in the current page is a continuation this will return true. If this is page starts with a new packet this will return false.
Sets the internal flag indicating if the first packet in this page is continued to $continued.
Returns true if the last packet of this page is completely contained in this page.
Sets the internal flag indicating if the last packet in this page is complete to $completed.
This returns true if this is the first page of the Ogg (logical) stream.
Marks this page as the first page of the Ogg stream.
This returns true if this is the last page of the Ogg (logical) stream.
Marks this page as the last page of the Ogg stream.
A special value of containing the position of the packet to be interpreted by the codec. In the case of Vorbis this contains the PCM value and is used to calculate the length of the stream.
A special value of containing the position of the packet to be interpreted by the codec. It is only supported here so that it may be coppied from one page to another.
Every Ogg logical stream is given a random serial number which is common to every page in that logical stream. This returns the serial number of the stream associated with this packet.
Every Ogg logical stream is given a random serial number which is common to every page in that logical stream. This sets this pages serial number. This method should be used when adding new pages to a logical stream.
Returns the index of the page within the Ogg stream. This helps make it possible to determine if pages have been lost.
Sets the page's position in the stream to $sequenceNumber.
Retruns the complete header size.
Returns the size of the data portion of the page -- i.e. the size of the page less the header size.
Render the page header to binary data.
NOTE The checksum -- bytes 22 - 25 -- will be left empty and must be filled in when rendering the entire page.
None by default.
Dongxu Ma, <firstname.lastname@example.org>
Copyright (C) 2005 by Dongxu Ma
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.