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

Class: File_Ogg

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

Class Overview


Factory class for providing either a PEAR or PECL interface to an Ogg stream.


Methods


Inherited Variables

Inherited Methods


Class Details

[line 92]
Factory class for providing either a PEAR or PECL interface to an Ogg stream.

Due to the widespread availability of libraries from Xiph.Org, it is anticipated that a PECL version of this package will become available in the not-too-distant future. This class will provide a switch between the two modes if the PECL version is installed. Naturally, the PECL interface should offer speed benefits over the native PHP version (or PEAR as it is called throughout this package), and will be used as the preferred choice.



[ Top ]


Method Detail

File_Ogg (Constructor)   [line 127]

File_Ogg File_Ogg( string $fileLocation)

Returns an interface to an Ogg physical stream.

This method takes the path to a local file and examines it for a physical ogg bitsream. After instantiation, the user should query the object for the logical bitstreams held within the ogg container.

  • Access: public

Parameters:

string   $fileLocation     The path of the file to be examined.

[ Top ]

getStream   [line 249]

File_Ogg_Bitstream getStream( mixed $streamSerial)

Returns the appropriate logical bitstream that corresponds to the provided serial.

This function returns a logical bitstream contained within the ogg physical stream, corresponding to the serial used as the offset for that bitstream. The returned stream may be Vorbis, Speex, FLAC or Theora, although the only usable bitstream is Vorbis.


[ Top ]

hasStream   [line 289]

void hasStream( int $streamType)

This function returns true if a logical bitstream of the requested type can be found.

This function checks the contents of this ogg physical bitstream for of logical bitstream corresponding to the supplied type. If one is found, the function returns true, otherwise it return false.


Parameters:

int   $streamType     

[ Top ]

listStreams   [line 307]

void listStreams( [mixed $filter = null])

Returns an array of logical streams inside this physical bitstream.

This function returns an array of logical streams found within this physical bitstream. If a filter is provided, only logical streams of the requested type are returned, as an array of serial numbers. If no filter is provided, this function returns a two-dimensional array, with the stream type as the primary key, and a value consisting of an array of stream serial numbers.


[ Top ]


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