File_Ogg
[ class tree: File_Ogg ] [ index: File_Ogg ] [ all elements ]

Class: File_Ogg_Vorbis_Pear

Source Location: /File_Ogg-0.1.3/File/Ogg/Vorbis/PEAR.php

Class Overview


Extract the contents of a Vorbis logical stream.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 60]
Extract the contents of a Vorbis logical stream.

This class provides an interface to a Vorbis logical stream found within a Ogg stream. A variety of information may be extracted, including comment tags, running time, and bitrate. For more information, please see the following links.



[ Top ]


Method Detail

File_Ogg_Vorbis_Pear (Constructor)   [line 171]

File_Ogg_Vorbis_Pear File_Ogg_Vorbis_Pear( int $streamSerial, array $streamData, pointer $filePointer, string $filePath)

Constructor for accessing a Vorbis logical stream.

This method is the constructor for the native-PHP interface to a Vorbis logical stream, embedded within an Ogg physical stream.

  • Access: public

Parameters:

int   $streamSerial   —  Serial number of the logical stream.
array   $streamData   —  Data for the requested logical stream.
string   $filePath   —  Location of a file on the filesystem.
pointer   $filePointer   —  File pointer for the current physical stream.

[ Top ]

getBitrate   [line 462]

float getBitrate( )

Gives the most accurate bitrate measurement from this stream.
  • Access: public

[ Top ]

getBitrates   [line 451]

array getBitrates( )

Gives an array of the values of four different types of bitrates for this stream. The nominal, maximum and minimum values are found within the file, whereas the average value is computed.
  • Access: public

[ Top ]

getChannels   [line 427]

int getChannels( )

Gives the number of channels used in this stream.
  • Access: public

[ Top ]

getComment   [line 361]

mixed getComment( string $commentTitle)

Provides an interface to the numerous comments located with a Vorbis stream.

A Vorbis stream may contain one or more instances of each comment, so the user should check the variable type before printing out the result of this method. The situation in which multiple instances of a comment occurring are not as rare as one might think, since they are conceivable at least for ARTIST comments in the situation where a track is a duet.

  • Access: public

Parameters:

string   $commentTitle   —  Comment title to search for, e.g. TITLE.

[ Top ]

getCommentList   [line 343]

array getCommentList( )

Provides a list of the comments extracted from the Vorbis stream.

It is recommended that the user fully inspect the array returned by this function rather than blindly requesting a comment in false belief that it will always be present. Whilst the Vorbis specification dictates a number of popular comments (e.g. TITLE, ARTIST, etc.) for use in Vorbis streams, they are not guaranteed to appear.

  • Access: public

[ Top ]

getLength   [line 490]

int getLength( )

Gives the length (in seconds) of this stream.
  • Access: public

[ Top ]

getSampleRate   [line 438]

int getSampleRate( )

Gives the number of samples per second used in this stream.
  • Access: public

[ Top ]

getSerial   [line 387]

int getSerial( )

Gives the serial number of this stream.

The stream serial number is of fairly academic importance, as it makes little difference to the end user. The serial number is used by the Ogg physical stream to distinguish between concurrent logical streams.

  • Access: public

[ Top ]

getSize   [line 479]

int getSize( )

Gives the size (in bits) of this stream.
  • Access: public

[ Top ]

getVendor   [line 416]

string getVendor( )

Gives the vendor string for the software used to encode this stream.

It is common to find libVorbis here. A previous version of this package compared this vendor string against a release table, but this has been removed, as encoding software is not limited to libvorbis.

  • Access: public

[ Top ]

getVersion   [line 402]

int getVersion( )

Version of the Vorbis specification referred to in the encoding of this stream.

This method returns the version of the Vorbis specification (currently 0 (ZERO)) referred to by the encoder of this stream. The Vorbis specification is well- defined, and thus one does not expect this value to change on a frequent basis.

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:14:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.