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

Class: File_Ogg_Vorbis

Source Location: /File_Ogg-0.2.0/File/Ogg/Vorbis.php

Class Overview

File_Ogg_Bitstream
   |
   --File_Ogg_Vorbis

Extract the contents of a Vorbis logical stream.


Author(s):

Version:

  • CVS: $Id: Vorbis.php,v 1.5 2005/11/03 12:44:49 djg Exp $

Copyright:

  • David Grant <david@grant.org.uk>

Methods


Inherited Variables

Inherited Methods

Class: File_Ogg_Bitstream

File_Ogg_Bitstream::getSerial()
Gives the serial number of this stream.

Class Details

[line 65]
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 (Constructor)   [line 167]

File_Ogg_Vorbis File_Ogg_Vorbis( 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 435]

float getBitrate( )

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

[ Top ]

getBitrates   [line 424]

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 400]

int getChannels( )

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

[ Top ]

getComment   [line 353]

string 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 335]

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 462]

int getLength( )

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

[ Top ]

getSampleRate   [line 411]

int getSampleRate( )

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

[ Top ]

getSize   [line 451]

int getSize( )

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

[ Top ]

getVendor   [line 389]

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 375]

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 ]

isMono   [line 472]

boolean isMono( )

States whether this logical stream was encoded in mono.

[ Top ]

isStereo   [line 482]

boolean isStereo( )

States whether this logical stream was encoded in stereo.

[ Top ]


Documentation generated on Thu, 03 Nov 2005 08:00:09 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.