cvs: pear /File_Ogg/File Ogg.php /File_Ogg/File/Ogg Flac.php Speex.php Theora.php Vorbis.php

From: Date: Thu, 10 Nov 2005 09:20:51 +0000
Subject: cvs: pear /File_Ogg/File Ogg.php /File_Ogg/File/Ogg Flac.php Speex.php Theora.php Vorbis.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-36199@lists.php.net to get a copy of this message
djg Thu Nov 10 04:20:51 2005 EDT Modified files: /pear/File_Ogg/File Ogg.php /pear/File_Ogg/File/Ogg Flac.php Speex.php Theora.php Vorbis.php Log: Commenting changes.

http://cvs.php.net/diff.php/pear/File_Ogg/File/Ogg.php?r1=1.11&r2=1.12&ty=u Index: pear/File_Ogg/File/Ogg.php diff -u pear/File_Ogg/File/Ogg.php:1.11 pear/File_Ogg/File/Ogg.php:1.12 --- pear/File_Ogg/File/Ogg.php:1.11 Tue Nov 8 17:36:37 2005 +++ pear/File_Ogg/File/Ogg.php Thu Nov 10 04:20:51 2005 @@ -26,11 +26,11 @@ * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL * @link http://pear.php.net/package/File_Ogg * @package File_Ogg - * @version CVS: $Id: Ogg.php,v 1.11 2005/11/08 22:36:37 djg Exp $ + * @version CVS: $Id: Ogg.php,v 1.12 2005/11/10 09:20:51 djg Exp $ */ require_once('PEAR.php'); -require_once('Ogg' . DIRECTORY_SEPARATOR . 'Bitstream.php'); +require_once('File/Ogg/Bitstream.php'); /** * @access public http://cvs.php.net/diff.php/pear/File_Ogg/File/Ogg/Flac.php?r1=1.7&r2=1.8&ty=u Index: pear/File_Ogg/File/Ogg/Flac.php diff -u pear/File_Ogg/File/Ogg/Flac.php:1.7 pear/File_Ogg/File/Ogg/Flac.php:1.8 --- pear/File_Ogg/File/Ogg/Flac.php:1.7 Tue Nov 8 17:36:43 2005 +++ pear/File_Ogg/File/Ogg/Flac.php Thu Nov 10 04:20:51 2005 @@ -19,7 +19,7 @@ // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | // +----------------------------------------------------------------------------+ -require_once('File/Ogg/Bitstream.php'); +require_once('Bitstream.php'); /** * @author David Grant <david@grant.org.uk> @@ -29,7 +29,7 @@ * @link http://pear.php.net/package/File_Ogg * @link http://flac.sourceforge.net/documentation.html * @package File_Ogg - * @version CVS: $Id: Flac.php,v 1.7 2005/11/08 22:36:43 djg Exp $ + * @version CVS: $Id: Flac.php,v 1.8 2005/11/10 09:20:51 djg Exp $ */ class File_Ogg_Flac extends File_Ogg_Bitstream { http://cvs.php.net/diff.php/pear/File_Ogg/File/Ogg/Speex.php?r1=1.8&r2=1.9&ty=u Index: pear/File_Ogg/File/Ogg/Speex.php diff -u pear/File_Ogg/File/Ogg/Speex.php:1.8 pear/File_Ogg/File/Ogg/Speex.php:1.9 --- pear/File_Ogg/File/Ogg/Speex.php:1.8 Tue Nov 8 17:36:43 2005 +++ pear/File_Ogg/File/Ogg/Speex.php Thu Nov 10 04:20:51 2005 @@ -19,7 +19,7 @@ // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | // +----------------------------------------------------------------------------+ -require_once('File/Ogg/Bitstream.php'); +require_once('Bitstream.php'); /** * @author David Grant <david@grant.org.uk> @@ -29,7 +29,7 @@ * @link http://pear.php.net/package/File_Ogg * @link http://www.speex.org/docs.html * @package File_Ogg - * @version CVS: $Id: Speex.php,v 1.8 2005/11/08 22:36:43 djg Exp $ + * @version CVS: $Id: Speex.php,v 1.9 2005/11/10 09:20:51 djg Exp $ */ class File_Ogg_Speex extends File_Ogg_Bitstream { http://cvs.php.net/diff.php/pear/File_Ogg/File/Ogg/Theora.php?r1=1.7&r2=1.8&ty=u Index: pear/File_Ogg/File/Ogg/Theora.php diff -u pear/File_Ogg/File/Ogg/Theora.php:1.7 pear/File_Ogg/File/Ogg/Theora.php:1.8 --- pear/File_Ogg/File/Ogg/Theora.php:1.7 Tue Nov 8 17:36:43 2005 +++ pear/File_Ogg/File/Ogg/Theora.php Thu Nov 10 04:20:51 2005 @@ -19,7 +19,7 @@ // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | // +----------------------------------------------------------------------------+ -require_once('File/Ogg/Bitstream.php'); +require_once('Bitstream.php'); /** * @author David Grant <david@grant.org.uk> @@ -29,7 +29,7 @@ * @link http://pear.php.net/package/File_Ogg * @link http://www.xiph.org/theora/ * @package File_Ogg - * @version CVS: $Id: Theora.php,v 1.7 2005/11/08 22:36:43 djg Exp $ + * @version CVS: $Id: Theora.php,v 1.8 2005/11/10 09:20:51 djg Exp $ */ class File_Ogg_Theora extends File_Ogg_Bitstream { http://cvs.php.net/diff.php/pear/File_Ogg/File/Ogg/Vorbis.php?r1=1.10&r2=1.11&ty=u Index: pear/File_Ogg/File/Ogg/Vorbis.php diff -u pear/File_Ogg/File/Ogg/Vorbis.php:1.10 pear/File_Ogg/File/Ogg/Vorbis.php:1.11 --- pear/File_Ogg/File/Ogg/Vorbis.php:1.10 Tue Nov 8 17:36:43 2005 +++ pear/File_Ogg/File/Ogg/Vorbis.php Thu Nov 10 04:20:51 2005 @@ -19,31 +19,36 @@ // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | // +----------------------------------------------------------------------------+ -require_once('File/Ogg/Bitstream.php'); +require_once('Bitstream.php'); /** * Check number for the first header in a Vorbis stream. + * * @access private */ define("OGG_VORBIS_IDENTIFICATION_HEADER", 1); /** * Check number for the second header in a Vorbis stream. + * * @access private */ define("OGG_VORBIS_COMMENTS_HEADER", 3); /** * Check number for the third header in a Vorbis stream. + * * @access private */ define("OGG_VORBIS_SETUP_HEADER", 5); /** * Error thrown if the stream appears to be corrupted. + * * @access private */ define("OGG_VORBIS_ERROR_UNDECODABLE", 1); /** * Error thrown if the user attempts to extract a comment using a comment key * that does not exist. + * * @access private */ define("OGG_VORBIS_ERROR_INVALID_COMMENT", 2); @@ -63,87 +68,87 @@ * @link http://pear.php.net/package/File_Ogg * @link http://www.xiph.org/vorbis/doc/ * @package File_Ogg - * @version CVS: $Id: Vorbis.php,v 1.10 2005/11/08 22:36:43 djg Exp $ + * @version CVS: $Id: Vorbis.php,v 1.11 2005/11/10 09:20:51 djg Exp $ */ class File_Ogg_Vorbis extends File_Ogg_Bitstream { /** * Array to hold each of the comments. * - * @var array * @access private + * @var array */ var $_comments = array(); /** * Version of vorbis specification used. * - * @var int * @access private + * @var int */ var $_version; /** * Number of channels in the vorbis stream. * - * @var int * @access private + * @var int */ var $_channels; /** * Number of samples per second in the vorbis stream. * - * @var int * @access private + * @var int */ var $_sampleRate; /** * Minimum bitrate for the vorbis stream. * - * @var int * @access private + * @var int */ var $_minBitrate; /** * Maximum bitrate for the vorbis stream. * - * @var int * @access private + * @var int */ var $_maxBitrate; /** * Nominal bitrate for the vorbis stream. * - * @var int * @access private + * @var int */ var $_nomBitrate; /** * Average bitrate for the vorbis stream. * - * @var float * @access private + * @var float */ var $_avgBitrate; /** * Vendor string for the vorbis stream. * - * @var string * @access private + * @var string */ var $_vendor; /** * The length of this stream in seconds. * - * @var int * @access private + * @var int */ var $_streamLength; @@ -183,7 +188,6 @@ * specification to ensure the stream is pure. * * @access private - */ function _decodeIdentificationHeader() { @@ -263,7 +267,7 @@ PEAR::raiseError("Stream Undecodable", OGG_VORBIS_ERROR_UNDECODABLE); // The following six characters should be the characters 'v', 'o', 'r', 'b', 'i', 's'. - if (fread($this->_filePointer, 6) != "vorbis") + if (fread($this->_filePointer, 6) != OGG_STREAM_CAPTURE_VORBIS) PEAR::raiseError("Stream is undecodable due to a malformed header.", OGG_VORBIS_ERROR_UNDECODABLE); } @@ -275,7 +279,6 @@ * a string to identify the encoding software. More details on the comments header can * be found at the following location. * - * @link http://www.xiph.org/ogg/vorbis/doc/v-comment.html * @access private */ function _decodeCommentsHeader() @@ -341,9 +344,9 @@ * 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 * @param string $commentTitle Comment title to search for, e.g. TITLE. * @return string - * @access public */ function getField($commentTitle) { @@ -354,7 +357,7 @@ return ($this->_comments[$commentTitle]); } else // The comment doesn't exist in this file. The user should've called getCommentList first. - return ""; + return (""); } /** @@ -364,8 +367,8 @@ * 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. * - * @return int * @access public + * @return int */ function getEncoderVersion() { @@ -380,8 +383,8 @@ * compared this vendor string against a release table, but this has been * removed, as encoding software is not limited to libvorbis. * - * @return string * @access public + * @return string */ function getVendor() { @@ -394,10 +397,11 @@ * This function returns the number of channels used in this stream. This * can range from 1 to 255, but will likely be 2 (stereo) or 1 (mono). * + * @access public * @return int * @see File_Ogg_Vorbis::isMono() * @see File_Ogg_Vorbis::isStereo() - * @access public + * @see File_Ogg_Vorbis::isQuadrophonic() */ function getChannels() { @@ -425,8 +429,8 @@ * stream. The nominal, maximum and minimum values are found within the file, * whereas the average value is computed. * - * @return array * @access public + * @return array */ function getBitrates() { @@ -439,8 +443,8 @@ * This function returns the most accurate bitrate measurement for this * recording, depending on values set in the stream header. * - * @return float * @access public + * @return float */ function getBitrate() { @@ -455,8 +459,8 @@ /** * Gives the length (in seconds) of this stream. * - * @return int * @access public + * @return int */ function getLength() { @@ -466,36 +470,51 @@ /** * States whether this logical stream was encoded in mono. * + * @access public * @return boolean */ function isMono() { - return $this->_channels == 1; + return ($this->_channels == 1); } /** * States whether this logical stream was encoded in stereo. * + * @access public * @return boolean */ function isStereo() { - return $this->_channels == 2; + return ($this->_channels == 2); + } + + /** + * States whether this logical stream was encoded in quadrophonic sound. + * + * @access public + * @return boolean + */ + function isQuadrophonic() + { + return ($this->_channels == 4); } /** * The title of this track, e.g. "What's Up Pussycat?". * - * @return string + * @access public + * @return string */ function getTitle() { - return $this->getField("TITLE"); + return ($this->getField("TITLE")); } /** * The version of the track, such as a remix. * + * @access public * @return string */ function getVersion() @@ -504,23 +523,25 @@ } /** - * The album from which this track comes. + * The album or collection from which this track comes. * + * @access public * @return string */ function getAlbum() { - return $this->getField("ALBUM"); + return ($this->getField("ALBUM")); } /** * The number of this track if it is part of a larger collection. * + * @access public * @return string */ function getTrackNumber() { - return $this->getField("TRACKNUMBER"); + return ($this->getField("TRACKNUMBER")); } /** @@ -529,31 +550,34 @@ * This function returns the name of the artist responsible for this * recording, which may be either a solo-artist, duet or group. * + * @access public * @return string */ function getArtist() { - return $this->getField("ARTIST"); + return ($this->getField("ARTIST")); } /** * The performer of this track, such as an orchestra * + * @access public * @return string */ function getPerformer() { - return $this->getField("PERFORMER"); + return ($this->getField("PERFORMER")); } /** * The copyright attribution for this track. * + * @access public * @return string */ function getCopyright() { - return $this->getField("COPYRIGHT"); + return ($this->getField("COPYRIGHT")); } /** @@ -562,11 +586,12 @@ * This funtion returns the license for this track, and may include * copyright information, or a creative commons statement. * + * @access public * @return string */ function getLicense() { - return $this->getField("LICENSE"); + return ($this->getField("LICENSE")); } /** @@ -575,11 +600,12 @@ * This function returns the name of the organisation responsible for * the production of this track, such as the record label. * + * @access public * @return string */ function getOrganization() { - return $this->getField("ORGANIZATION"); + return ($this->getField("ORGANIZATION")); } /** @@ -588,11 +614,12 @@ * This function returns a short description of this track, which might * contain extra information that doesn't fit anywhere else. * + * @access public * @return string */ function getDescription() { - return $this->getField("DESCRIPTION"); + return ($this->getField("DESCRIPTION")); } /** @@ -601,11 +628,12 @@ * This function returns the genre of this recording. There are no pre- * defined genres, so this is completely up to the tagging software. * + * @access public * @return string */ function getGenre() { - return $this->getField("GENRE"); + return ($this->getField("GENRE")); } /** @@ -614,11 +642,12 @@ * This function returns the date on which this recording was made. There * is no specification for the format of this date. * + * @access public * @return string */ function getDate() { - return $this->getField("DATE"); + return ($this->getField("DATE")); } /** @@ -627,19 +656,21 @@ * This function returns where this recording was made, such as a recording * studio, or concert venue. * + * @access public * @return string */ function getLocation() { - return $this->getField("LOCATION"); + return ($this->getField("LOCATION")); } /** + * @access public * @return string */ function getContact() { - return $this->getField("CONTACT"); + return ($this->getField("CONTACT")); } /** @@ -648,11 +679,12 @@ * Returns the International Standard Recording Code. This code can be * validated using the Validate_ISPN package. * + * @access public * @return string */ function getIsrc() { - return $this->getField("ISRC"); + return ($this->getField("ISRC")); } } ?> \ No newline at end of file
« previous php.pear.cvs (#36199) next »