r57933 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57932‎ | r57933 | r57934 >
Date:23:20, 19 October 2009
Author:dale
Status:deferred (Comments)
Tags:
Comment:
* white space fixes
* added ffmpeg2theora fallback for getting stream duration
** ~problem ffmpeg2theora does not handle stream offsets ~
Modified paths:
  • /trunk/extensions/OggHandler/OggHandler.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Bitstream.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Theora.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Vorbis.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg.php
@@ -50,7 +50,7 @@
5151
5252 /**
5353 * Capture pattern to determine if a file is an Ogg physical stream.
54 - *
 54+ *
5555 * @access private
5656 */
5757 define("OGG_CAPTURE_PATTERN", "OggS");
@@ -58,13 +58,13 @@
5959 * Maximum size of an Ogg stream page plus four. This value is specified to allow
6060 * efficient parsing of the physical stream. The extra four is a paranoid measure
6161 * to make sure a capture pattern is not split into two parts accidentally.
62 - *
 62+ *
6363 * @access private
6464 */
6565 define("OGG_MAXIMUM_PAGE_SIZE", 65311);
6666 /**
6767 * Capture pattern for an Ogg Vorbis logical stream.
68 - *
 68+ *
6969 * @access private
7070 */
7171 define("OGG_STREAM_CAPTURE_VORBIS", "vorbis");
@@ -75,38 +75,38 @@
7676 define("OGG_STREAM_CAPTURE_SPEEX", "Speex ");
7777 /**
7878 * Capture pattern for an Ogg FLAC logical stream.
79 - *
 79+ *
8080 * @access private
8181 */
8282 define("OGG_STREAM_CAPTURE_FLAC", "FLAC");
8383 /**
8484 * Capture pattern for an Ogg Theora logical stream.
85 - *
 85+ *
8686 * @access private
8787 */
8888 define("OGG_STREAM_CAPTURE_THEORA", "theora");
8989 /**
9090 * Error thrown if the file location passed is nonexistant or unreadable.
91 - *
 91+ *
9292 * @access private
9393 */
9494 define("OGG_ERROR_INVALID_FILE", 1);
9595 /**
9696 * Error thrown if the user attempts to extract an unsupported logical stream.
97 - *
 97+ *
9898 * @access private
9999 */
100100 define("OGG_ERROR_UNSUPPORTED", 2);
101101 /**
102102 * Error thrown if the user attempts to extract an logical stream with no
103103 * corresponding serial number.
104 - *
 104+ *
105105 * @access private
106106 */
107107 define("OGG_ERROR_BAD_SERIAL", 3);
108108 /**
109109 * Error thrown if the stream appears to be corrupted.
110 - *
 110+ *
111111 * @access private
112112 */
113113 define("OGG_ERROR_UNDECODABLE", 4);
@@ -220,13 +220,13 @@
221221 * Read a binary structure from a file. An array of unsigned integers are read.
222222 * Large integers are upgraded to floating point on overflow.
223223 *
224 - * Format is big-endian as per Theora bit packing convention, this function
 224+ * Format is big-endian as per Theora bit packing convention, this function
225225 * won't work for Vorbis.
226226 *
227227 * @param resource $file
228228 * @param array $fields Associative array mapping name to length in bits
229229 */
230 - static function _readBigEndian($file, $fields)
 230+ static function _readBigEndian($file, $fields)
231231 {
232232 $bufferLength = ceil(array_sum($fields) / 8);
233233 $buffer = fread($file, $bufferLength);
@@ -359,6 +359,7 @@
360360
361361 // Exact granule position
362362 $abs_granule_pos = self::_littleEndianBin2Hex( substr($pageData, 6, 8));
 363+
363364 // Approximate (floating point) granule position
364365 $pos = unpack("Va/Vb", substr($pageData, 6, 8));
365366 $approx_granule_pos = $pos['a'] + $pos['b'] * pow(2, 32);
@@ -387,11 +388,11 @@
388389 'data_length' => $pageFinish - $pageOffset,
389390 'group' => $groupId,
390391 );
391 -
392 - $this->_streamList[$stream_serial['data']]['stream_page'][$page_sequence['data']] = $page;
 392+ $this->_streamList[$stream_serial['data']]['stream_page'][ $page_sequence['data'] ] = $page;
 393+ $pageData = null;
393394 return $page;
394395 }
395 -
 396+
396397 /**
397398 * @access private
398399 */
@@ -426,7 +427,8 @@
427428 }
428429
429430 $this_page_offset = $page['body_finish'];
430 - fseek($this->_filePointer, $this_page_offset, SEEK_SET);
 431+ fseek( $this->_filePointer, $this_page_offset, SEEK_SET );
 432+ unset( $pageData );
431433 }
432434 // Loop through the streams, and find out what type of stream is available.
433435 $groupLengths = array();
@@ -456,23 +458,23 @@
457459 if (isset($groupLengths[$group])) {
458460 $groupLengths[$group] = max($groupLengths[$group], $stream->getLength());
459461 } else {
460 - $groupLengths[$group] = $stream->getLength();
 462+ $groupLengths[$group] = $stream->getLength();
461463 }
462464 //just store the startOffset for the first stream:
463465 if( $this->_startOffset === false ){
464466 $this->_startOffset = $stream->getStartOffset();
465467 }
466 -
 468+
467469 }
468470 }
469471 $this->_groupLengths = $groupLengths;
470472 $this->_totalLength = array_sum( $groupLengths );
471473 unset($this->_streamList);
472474 }
473 -
 475+
474476 /**
475477 * Returns the overead percentage used by the Ogg headers.
476 - *
 478+ *
477479 * This function returns the percentage of the total stream size
478480 * used for Ogg headers.
479481 *
@@ -489,7 +491,7 @@
490492 }
491493 return sprintf("%0.2f", ($header_size / $stream_size) * 100);
492494 }
493 -
 495+
494496 /**
495497 * Returns the appropriate logical bitstream that corresponds to the provided serial.
496498 *
@@ -507,7 +509,7 @@
508510
509511 return $this->_streams[$streamSerial];
510512 }
511 -
 513+
512514 /**
513515 * This function returns true if a logical bitstream of the requested type can be found.
514516 *
@@ -526,7 +528,7 @@
527529 }
528530 return (false);
529531 }
530 -
 532+
531533 /**
532534 * Returns an array of logical streams inside this physical bitstream.
533535 *
@@ -563,7 +565,7 @@
564566 if (! isset($streams[$stream_type]))
565567 // Initialise the result list for this stream type.
566568 $streams[$stream_type] = array();
567 -
 569+
568570 $streams[$stream_type][] = $serial;
569571 }
570572
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Bitstream.php
@@ -61,7 +61,7 @@
6262 * @var int
6363 * @access private
6464 */
65 - var $_lastGranulePos;
 65+ var $_lastGranulePos;
6666
6767 /**
6868 * Constructor for a generic logical stream.
@@ -110,7 +110,7 @@
111111 {
112112 return ($this->_streamSerial);
113113 }
114 -
 114+
115115 /**
116116 * Gives the size (in bits) of this stream.
117117 *
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Theora.php
@@ -40,7 +40,7 @@
4141 * @version CVS: $Id: Theora.php,v 1.9 2005/11/16 20:43:27 djg Exp $
4242 */
4343 class File_Ogg_Theora extends File_Ogg_Media
44 -{
 44+{
4545 /**
4646 * @access private
4747 */
@@ -50,41 +50,37 @@
5151 $this->_decodeIdentificationHeader();
5252 $this->_decodeCommentsHeader();
5353 $endSec = $this->getSecondsFromGranulePos( $this->_lastGranulePos );
54 -
 54+
5555 $startSec = $this->getSecondsFromGranulePos( $this->_firstGranulePos );
56 -
 56+
5757 //make sure the offset is worth taking into account oggz_chop related hack
5858 if( $startSec > 1){
5959 $this->_streamLength = $endSec - $startSec;
60 - $this->_startOffset = $startSec;
 60+ $this->_startOffset = $startSec;
6161 }else{
6262 $this->_streamLength = $endSec;
6363 }
64 -
65 - /*print "last gran: $this->_lastGranulePos = $endSec \n
66 -first gran: $this->_firstGranulePos = $startSec \n
67 -stream len: $this->_streamLength;";*/
6864
6965 $this->_avgBitrate = $this->_streamLength ? ($this->_streamSize * 8) / $this->_streamLength : 0;
7066 }
7167 function getSecondsFromGranulePos($granulePos){
7268 // Calculate GranulePos seconds
7369 // First make some "numeric strings"
74 - // These might not fit into PHP's integer type, but they will fit into
 70+ // These might not fit into PHP's integer type, but they will fit into
7571 // the 53-bit mantissa of a double-precision number
7672 $topWord = floatval( base_convert( substr( $granulePos, 0, 8 ), 16, 10 ) );
7773 $bottomWord = floatval( base_convert( substr( $granulePos, 8, 8 ), 16, 10 ) );
7874 // Calculate the keyframe position by shifting right by KFGSHIFT
7975 // We don't use PHP's shift operators because they're terribly broken
8076 // This is made slightly simpler by the fact that KFGSHIFT < 32
81 - $keyFramePos = $topWord / pow(2, $this->_kfgShift - 32) +
 77+ $keyFramePos = $topWord / pow(2, $this->_kfgShift - 32) +
8278 floor( $bottomWord / pow(2, $this->_kfgShift) );
8379 // Calculate the frame offset by masking off the top 64-KFGSHIFT bits
8480 // This requires a bit of floating point trickery
8581 $offset = fmod( $bottomWord, pow(2, $this->_kfgShift) );
8682 // They didn't teach you that one at school did they?
8783 // Now put it together with the frame rate to calculate time in seconds
88 - return ( $keyFramePos + $offset ) / $this->_frameRate;
 84+ return ( $keyFramePos + $offset ) / $this->_frameRate;
8985 }
9086 /**
9187 * Get the 6-byte identification string expected in the common header
@@ -138,7 +134,7 @@
139135 }
140136 $this->_frameWidth = $h['FMBW'] * 16;
141137 $this->_frameHeight = $h['FMBH'] * 16;
142 -
 138+
143139 // Picture height/width
144140 if ( $h['PICW'] > $this->_frameWidth || $h['PICH'] > $this->_frameHeight ) {
145141 throw new PEAR_Exception("Stream is undecodable because the picture width is greater than the frame width.", OGG_ERROR_UNDECODABLE);
@@ -174,7 +170,7 @@
175171
176172 $this->_quality = $h['QUAL'];
177173 $this->_kfgShift = $h['KFGSHIFT'];
178 -
 174+
179175 $pixelFormats = array(
180176 0 => '4:2:0',
181177 1 => 'Unknown (reserved)',
@@ -184,25 +180,25 @@
185181 $this->_pixelFormat = $pixelFormats[$h['PF']];
186182
187183 switch ( $h['PF'] ) {
188 - case 0:
189 - $h['NSBS'] =
190 - floor( ($h['FMBW'] + 1) / 2 ) *
191 - floor( ($h['FMBH'] + 1) / 2 ) + 2 *
192 - floor( ($h['FMBW'] + 3) / 4 ) *
 184+ case 0:
 185+ $h['NSBS'] =
 186+ floor( ($h['FMBW'] + 1) / 2 ) *
 187+ floor( ($h['FMBH'] + 1) / 2 ) + 2 *
 188+ floor( ($h['FMBW'] + 3) / 4 ) *
193189 floor( ($h['FMBH'] + 3) / 4 );
194190 $h['NBS'] = 6 * $h['FMBW'] * $h['FMBH'];
195191 break;
196192 case 2:
197 - $h['NSBS'] =
198 - floor( ($h['FMBW'] + 1) / 2 ) *
199 - floor( ($h['FMBH'] + 1) / 2 ) + 2 *
200 - floor( ($h['FMBW'] + 3) / 4 ) *
 193+ $h['NSBS'] =
 194+ floor( ($h['FMBW'] + 1) / 2 ) *
 195+ floor( ($h['FMBH'] + 1) / 2 ) + 2 *
 196+ floor( ($h['FMBW'] + 3) / 4 ) *
201197 floor( ($h['FMBH'] + 1) / 2 );
202198 $h['NBS'] = 8 * $h['FMBW'] * $h['FMBH'];
203199 break;
204200 case 3:
205 - $h['NSBS'] =
206 - 3 * floor( ($h['FMBW'] + 1) / 2 ) *
 201+ $h['NSBS'] =
 202+ 3 * floor( ($h['FMBW'] + 1) / 2 ) *
207203 floor( ($h['FMBH'] + 1) / 2 );
208204 $h['NBS'] = 12 * $h['FMBW'] * $h['FMBH'];
209205 break;
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Vorbis.php
@@ -25,32 +25,32 @@
2626
2727 /**
2828 * Check number for the first header in a Vorbis stream.
29 - *
 29+ *
3030 * @access private
3131 */
3232 define("OGG_VORBIS_IDENTIFICATION_HEADER", 1);
3333 /**
3434 * Check number for the second header in a Vorbis stream.
35 - *
 35+ *
3636 * @access private
3737 */
3838 define("OGG_VORBIS_COMMENTS_HEADER", 3);
3939 /**
4040 * Check number for the third header in a Vorbis stream.
41 - *
 41+ *
4242 * @access private
4343 */
4444 define("OGG_VORBIS_SETUP_HEADER", 5);
4545 /**
4646 * Error thrown if the stream appears to be corrupted.
47 - *
 47+ *
4848 * @access private
4949 */
5050 define("OGG_VORBIS_ERROR_UNDECODABLE", OGG_ERROR_UNDECODABLE);
5151 /**
5252 * Error thrown if the user attempts to extract a comment using a comment key
5353 * that does not exist.
54 - *
 54+ *
5555 * @access private
5656 */
5757 define("OGG_VORBIS_ERROR_INVALID_COMMENT", 2);
@@ -61,7 +61,7 @@
6262 /**
6363 * Error thrown if the user attempts to write a comment containing an illegal
6464 * character
65 - *
 65+ *
6666 * @access private
6767 */
6868 define("OGG_VORBIS_ERROR_ILLEGAL_COMMENT", 3);
@@ -148,7 +148,7 @@
149149 * @access private
150150 * @var int
151151 */
152 - var $_streamLength;
 152+ var $_streamLength;
153153
154154 /**
155155 * the start offset of this stream in seconds
@@ -171,15 +171,10 @@
172172 parent::__construct($streamSerial, $streamData, $filePointer);
173173 $this->_decodeIdentificationHeader();
174174 $this->_decodeCommentsHeader(OGG_VORBIS_COMMENTS_HEADER, OGG_VORBIS_COMMENTS_PAGE_OFFSET);
175 - $endSec = (( '0x' . substr( $this->_lastGranulePos, 0, 8 ) ) * pow(2, 32)
176 - + ( '0x' . substr( $this->_lastGranulePos, 8, 8 ) ))
177 - / $this->_idHeader['audio_sample_rate'];
178 -
179 -
180 - $startSec = (( '0x' . substr( $this->_firstGranulePos, 0, 8 ) ) * pow(2, 32)
181 - + ( '0x' . substr( $this->_firstGranulePos, 8, 8 ) ))
182 - / $this->_idHeader['audio_sample_rate'];
183 -
 175+
 176+ $endSec = $this->getSecondsFromGranulePos( $this->_lastGranulePos );
 177+ $startSec = $this->getSecondsFromGranulePos( $this->_firstGranulePos );
 178+
184179 //make sure the offset is worth taking into account oggz_chop related hack
185180 if( $startSec > 1){
186181 $this->_streamLength = $endSec - $startSec;
@@ -187,16 +182,20 @@
188183 }else{
189184 $this->_streamLength = $endSec;
190185 }
191 -
 186+
192187 $this->_avgBitrate = $this->_streamLength ? ($this->_streamSize * 8) / $this->_streamLength : 0;
193188 }
194 -
 189+ function getSecondsFromGranulePos( $granulePos ){
 190+ return (( '0x' . substr( $granulePos, 0, 8 ) ) * pow(2, 32)
 191+ + ( '0x' . substr( $granulePos, 8, 8 ) ))
 192+ / $this->_idHeader['audio_sample_rate'];
 193+ }
195194 /**
196195 * Get a short string describing the type of the stream
197196 */
198 - function getType()
 197+ function getType()
199198 {
200 - return 'Vorbis';
 199+ return 'Vorbis';
201200 }
202201
203202 /**
@@ -230,42 +229,42 @@
231230 $this->_version = $h['vorbis_version'];
232231 else
233232 throw new PEAR_Exception("Stream is undecodable due to an invalid vorbis stream version.", OGG_VORBIS_ERROR_UNDECODABLE);
234 -
 233+
235234 // The number of channels MUST be greater than 0.
236235 if ($h['audio_channels'] == 0)
237236 throw new PEAR_Exception("Stream is undecodable due to zero channels.", OGG_VORBIS_ERROR_UNDECODABLE);
238237 else
239238 $this->_channels = $h['audio_channels'];
240 -
 239+
241240 // The sample rate MUST be greater than 0.
242241 if ($h['audio_sample_rate'] == 0)
243242 throw new PEAR_Exception("Stream is undecodable due to a zero sample rate.", OGG_VORBIS_ERROR_UNDECODABLE);
244243 else
245244 $this->_sampleRate = $h['audio_sample_rate'];
246 -
 245+
247246 // Extract the various bitrates
248247 $this->_maxBitrate = $h['bitrate_maximum'];
249248 $this->_nomBitrate = $h['bitrate_nominal'];
250249 $this->_minBitrate = $h['bitrate_minimum'];
251 -
 250+
252251 // Powers of two between 6 and 13 inclusive.
253252 $valid_block_sizes = array(64, 128, 256, 512, 1024, 2048, 4096, 8192);
254 -
 253+
255254 // blocksize_0 MUST be a valid blocksize.
256255 $blocksize_0 = pow(2, $h['blocksize_0']);
257256 if (FALSE == in_array($blocksize_0, $valid_block_sizes))
258257 throw new PEAR_Exception("Stream is undecodable because blocksize_0 is $blocksize_0, which is not a valid size.", OGG_VORBIS_ERROR_UNDECODABLE);
259 -
 258+
260259 // Extract bits 5 to 8 from the character data.
261260 // blocksize_1 MUST be a valid blocksize.
262261 $blocksize_1 = pow(2, $h['blocksize_1']);
263262 if (FALSE == in_array($blocksize_1, $valid_block_sizes))
264263 throw new PEAR_Exception("Stream is undecodable because blocksize_1 is not a valid size.", OGG_VORBIS_ERROR_UNDECODABLE);
265 -
 264+
266265 // blocksize 0 MUST be less than or equal to blocksize 1.
267266 if ($blocksize_0 > $blocksize_1)
268267 throw new PEAR_Exception("Stream is undecodable because blocksize_0 is not less than or equal to blocksize_1.", OGG_VORBIS_ERROR_UNDECODABLE);
269 -
 268+
270269 // The framing bit MUST be set to mark the end of the identification header.
271270 // Some encoders are broken though -- TS
272271 /*
@@ -298,7 +297,7 @@
299298 function getIdentificationString() {
300299 return OGG_STREAM_CAPTURE_VORBIS;
301300 }
302 -
 301+
303302 /**
304303 * Version of the Vorbis specification referred to in the encoding of this stream.
305304 *
@@ -407,7 +406,7 @@
408407 {
409408 return ($this->_channels == 1);
410409 }
411 -
 410+
412411 /**
413412 * States whether this logical stream was encoded in stereo.
414413 *
@@ -418,7 +417,7 @@
419418 {
420419 return ($this->_channels == 2);
421420 }
422 -
 421+
423422 /**
424423 * States whether this logical stream was encoded in quadrophonic sound.
425424 *
@@ -429,7 +428,7 @@
430429 {
431430 return ($this->_channels == 4);
432431 }
433 -
 432+
434433 /**
435434 * The title of this track, e.g. "What's Up Pussycat?".
436435 *
@@ -440,7 +439,7 @@
441440 {
442441 return ($this->getField("TITLE"));
443442 }
444 -
 443+
445444 /**
446445 * Set the title of this track.
447446 *
@@ -452,7 +451,7 @@
453452 {
454453 $this->setField("TITLE", $title, $replace);
455454 }
456 -
 455+
457456 /**
458457 * The version of the track, such as a remix.
459458 *
@@ -463,7 +462,7 @@
464463 {
465464 return $this->getField("VERSION");
466465 }
467 -
 466+
468467 /**
469468 * Set the version of this track.
470469 *
@@ -475,7 +474,7 @@
476475 {
477476 $this->setField("VERSION", $version, $replace);
478477 }
479 -
 478+
480479 /**
481480 * The album or collection from which this track comes.
482481 *
@@ -486,7 +485,7 @@
487486 {
488487 return ($this->getField("ALBUM"));
489488 }
490 -
 489+
491490 /**
492491 * Set the album or collection for this track.
493492 *
@@ -498,7 +497,7 @@
499498 {
500499 $this->setField("ALBUM", $album, $replace);
501500 }
502 -
 501+
503502 /**
504503 * The number of this track if it is part of a larger collection.
505504 *
@@ -509,7 +508,7 @@
510509 {
511510 return ($this->getField("TRACKNUMBER"));
512511 }
513 -
 512+
514513 /**
515514 * Set the number of this relative to the collection.
516515 *
@@ -521,7 +520,7 @@
522521 {
523522 $this->setField("TRACKNUMBER", $number, $replace);
524523 }
525 -
 524+
526525 /**
527526 * The artist responsible for this track.
528527 *
@@ -535,7 +534,7 @@
536535 {
537536 return ($this->getField("ARTIST"));
538537 }
539 -
 538+
540539 /**
541540 * Set the artist of this track.
542541 *
@@ -547,7 +546,7 @@
548547 {
549548 $this->setField("ARTIST", $artist, $replace = true);
550549 }
551 -
 550+
552551 /**
553552 * The performer of this track, such as an orchestra
554553 *
@@ -558,7 +557,7 @@
559558 {
560559 return ($this->getField("PERFORMER"));
561560 }
562 -
 561+
563562 /**
564563 * Set the performer of this track.
565564 *
@@ -570,7 +569,7 @@
571570 {
572571 $this->setField("PERFORMER", $performer, $replace);
573572 }
574 -
 573+
575574 /**
576575 * The copyright attribution for this track.
577576 *
@@ -581,7 +580,7 @@
582581 {
583582 return ($this->getField("COPYRIGHT"));
584583 }
585 -
 584+
586585 /**
587586 * Set the copyright attribution for this track.
588587 *
@@ -593,7 +592,7 @@
594593 {
595594 $this->setField("COPYRIGHT", $copyright, $replace);
596595 }
597 -
 596+
598597 /**
599598 * The rights of distribution for this track.
600599 *
@@ -607,7 +606,7 @@
608607 {
609608 return ($this->getField("LICENSE"));
610609 }
611 -
 610+
612611 /**
613612 * Set the distribution rights for this track.
614613 *
@@ -619,11 +618,11 @@
620619 {
621620 $this->setField("LICENSE", $license, $replace);
622621 }
623 -
 622+
624623 /**
625624 * The organisation responsible for this track.
626625 *
627 - * This function returns the name of the organisation responsible for
 626+ * This function returns the name of the organisation responsible for
628627 * the production of this track, such as the record label.
629628 *
630629 * @access public
@@ -633,7 +632,7 @@
634633 {
635634 return ($this->getField("ORGANIZATION"));
636635 }
637 -
 636+
638637 /**
639638 * Set the organisation responsible for this track.
640639 *
@@ -645,7 +644,7 @@
646645 {
647646 $this->setField("ORGANIZATION", $organization, $replace);
648647 }
649 -
 648+
650649 /**
651650 * A short description of the contents of this track.
652651 *
@@ -659,7 +658,7 @@
660659 {
661660 return ($this->getField("DESCRIPTION"));
662661 }
663 -
 662+
664663 /**
665664 * Set the description of this track.
666665 *
@@ -671,7 +670,7 @@
672671 {
673672 $this->setField("DESCRIPTION", $replace);
674673 }
675 -
 674+
676675 /**
677676 * The genre of this recording (e.g. Rock)
678677 *
@@ -685,7 +684,7 @@
686685 {
687686 return ($this->getField("GENRE"));
688687 }
689 -
 688+
690689 /**
691690 * Set the genre of this track.
692691 *
@@ -697,7 +696,7 @@
698697 {
699698 $this->setField("GENRE", $genre, $replace);
700699 }
701 -
 700+
702701 /**
703702 * The date of the recording of this track.
704703 *
@@ -711,7 +710,7 @@
712711 {
713712 return ($this->getField("DATE"));
714713 }
715 -
 714+
716715 /**
717716 * Set the date of recording for this track.
718717 *
@@ -723,7 +722,7 @@
724723 {
725724 $this->setField("DATE", $date, $replace);
726725 }
727 -
 726+
728727 /**
729728 * Where this recording was made.
730729 *
@@ -737,7 +736,7 @@
738737 {
739738 return ($this->getField("LOCATION"));
740739 }
741 -
 740+
742741 /**
743742 * Set the location of the recording of this track.
744743 *
@@ -749,7 +748,7 @@
750749 {
751750 $this->setField("LOCATION", $location, $replace);
752751 }
753 -
 752+
754753 /**
755754 * @access public
756755 * @return string
@@ -758,7 +757,7 @@
759758 {
760759 return ($this->getField("CONTACT"));
761760 }
762 -
 761+
763762 /**
764763 * Set the contact information for this track.
765764 *
@@ -770,7 +769,7 @@
771770 {
772771 $this->setField("CONTACT", $contact, $replace);
773772 }
774 -
 773+
775774 /**
776775 * International Standard Recording Code.
777776 *
@@ -784,7 +783,7 @@
785784 {
786785 return ($this->getField("ISRC"));
787786 }
788 -
 787+
789788 /**
790789 * Set the ISRC for this track.
791790 *
Index: trunk/extensions/OggHandler/OggHandler.php
@@ -62,6 +62,9 @@
6363 //Location of oggThumb binary (used over the ffmpeg version)
6464 $wgOggThumbLocation = '/usr/bin/oggThumb';
6565
 66+//the location of ffmpeg2theora
 67+$wgffmpeg2theoraPath ='/usr/bin/ffmpeg2theora';
 68+
6669 // Location of the FFmpeg binary
6770 $wgFFmpegLocation = '/usr/bin/ffmpeg';
6871

Follow-up revisions

RevisionCommit summaryAuthorDate
r58228* ffmpeg2theora support for metadata ( should have been part of r57933 )dale21:51, 27 October 2009
r60495* Removed buggy stopgap solution for bug #19476 (ffmpeg2theora shell call), s...tstarling08:56, 30 December 2009

Comments

#Comment by Mdale (talk | contribs)   23:22, 19 October 2009

forgot to tag the commit with the bug 19476

Status & tagging log