From: Marius Gavrilescu Date: Sat, 17 Sep 2016 23:46:20 +0000 (+0100) Subject: Add doc too X-Git-Tag: 0.003~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=33fac129d4e945160adac31b73dd04e90d78bc50;p=audio-opusfile.git Add doc too --- diff --git a/lib/Audio/Opusfile.pm b/lib/Audio/Opusfile.pm index e0546ba..1e37f4b 100644 --- a/lib/Audio/Opusfile.pm +++ b/lib/Audio/Opusfile.pm @@ -132,6 +132,22 @@ Creates a new Audio::Opusfile object from an Ogg Opus file. Dies if the given file does not exist or is not a valid Ogg Opus file. +=item Audio::Opusfile->B(I<$buffer>) + +Creates a new Audio::Opusfile object from a buffer containing Ogg Opus +data. + +Dies if the given buffer does not contain valid data. + +=item Audio::Opusfile::test(I<$buffer>) + +Returns true if the given buffer looks like the beginning of a valid +Ogg Opus file, false otherwise. + +Dies if the given buffer does not have sufficient data to tell if it +is an Opus stream or if it looks like a Opus stream but parsing it +failed. + =item B<$of>->head Returns an L object corresponding to the file. @@ -140,6 +156,25 @@ Returns an L object corresponding to the file. Returns an L object corresponding to the file. +=item B<$of>->seekable + +Returns whether or not the data source being read is seekable. + +=item B<$of>->link_count + +Returns the number of links in this chained stream. Always returns 1 +for unseekable sources. + +=item B<$of>->serialno([I<$link_index>]) + +Get the serial number of the given link in a (possibly-chained) Ogg +Opus stream. If the given index is greater than the total number of +links, this returns the serial number of the last link. + +If the source is not seekable, I<$link_index> is negative, or +I<$link_index> is not given, then this function returns the serial +number of the current link. + =back =head1 EXPORT