r84061 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84060‎ | r84061 | r84062 >
Date:22:23, 15 March 2011
Author:dale
Status:deferred
Tags:
Comment:
update codec to videoCodec
Modified paths:
  • /trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php
@@ -47,11 +47,11 @@
4848 }
4949 $options = WebVideoTranscode::$derivativeSettings[ $transcodeKey ];
5050
51 - $this->output( "Encoding to codec: " . $options['codec'] );
 51+ $this->output( "Encoding to codec: " . $options['videoCodec'] );
5252 // Check the codec see which encode method to call;
53 - if( $options['codec'] == 'theora' ){
 53+ if( $options['videoCodec'] == 'theora' ){
5454 $status = $this->ffmpeg2TheoraEncode( $file, $destinationFile, $options );
55 - } else if( $options['codec'] == 'vp8' ){
 55+ } else if( $options['videoCodec'] == 'vp8' ){
5656 // Check for twopass:
5757 if( isset( $options['twopass'] ) ){
5858 // ffmpeg requires manual two pass
Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php
@@ -59,7 +59,7 @@
6060 'twopass' => 'true',
6161 'keyframeInterval' => '64',
6262 'bufDelay' => '128',
63 - 'codec' => 'theora',
 63+ 'videoCodec' => 'theora',
6464 ),
6565 WebVideoTranscode::ENC_OGV_4MBS =>
6666 array(
@@ -70,7 +70,7 @@
7171 'twopass' => 'true',
7272 'keyframeInterval' => '128',
7373 'bufDelay' => '256',
74 - 'codec' => 'theora',
 74+ 'videoCodec' => 'theora',
7575 ),
7676 WebVideoTranscode::ENC_OGV_6MBS =>
7777 array(
@@ -81,7 +81,7 @@
8282 'twopass' => 'true',
8383 'keyframeInterval' => '128',
8484 'bufDelay' => '256',
85 - 'codec' => 'theora',
 85+ 'videoCodec' => 'theora',
8686 ),
8787
8888 WebVideoTranscode::ENC_OGV_HQ_VBR =>
@@ -91,7 +91,7 @@
9292 'audioQuality' => 3,
9393 'noUpscaling' => 'true',
9494 'keyframeInterval' => '128',
95 - 'codec' => 'theora',
 95+ 'videoCodec' => 'theora',
9696 ),
9797
9898 // WebM transcode:
@@ -104,7 +104,7 @@
105105 'twopass' => 'true',
106106 'keyframeInterval' => '128',
107107 'bufDelay' => '256',
108 - 'codec' => 'vp8',
 108+ 'videoCodec' => 'vp8',
109109 ),
110110 WebVideoTranscode::ENC_WEBM_HQ_VBR =>
111111 array(
@@ -112,7 +112,7 @@
113113 'videoQuality' => 7,
114114 'audioQuality' => 3,
115115 'noUpscaling' => 'true',
116 - 'codec' => 'vp8',
 116+ 'videoCodec' => 'vp8',
117117 )
118118 );
119119
@@ -214,7 +214,7 @@
215215
216216 foreach( $wgEnabledTranscodeSet as $transcodeKey ){
217217 $derivativeFile = self::getDerivativeFilePath( $file, $transcodeKey);
218 - $codec = self::$derivativeSettings[$transcodeKey]['codec'];
 218+ $codec = self::$derivativeSettings[$transcodeKey]['videoCodec'];
219219 // Check if we should add derivative to job queue
220220 // Skip if we have both an Ogg & WebM and if target encode larger than source
221221 if( self::isTargetLargerThanFile( $file, self::$derivativeSettings[$transcodeKey]['maxSize']) ){
@@ -233,11 +233,11 @@
234234 // Make sure we got at least one ogg and webm encode
235235 if( !$addOggFlag || !$addWebMFlag){
236236 foreach( $wgEnabledTranscodeSet as $transcodeKey ){
237 - if( !$addOggFlag && self::$derivativeSettings[$transcodeKey]['codec'] == 'theora' ){
 237+ if( !$addOggFlag && self::$derivativeSettings[$transcodeKey]['videoCodec'] == 'theora' ){
238238 self::tryAddSource( $file, $sources, $transcodeKey, $dataPrefix );
239239 $addOggFlag = true;
240240 }
241 - if( !$addWebMFlag && self::$derivativeSettings[$transcodeKey]['codec'] == 'vp8' ){
 241+ if( !$addWebMFlag && self::$derivativeSettings[$transcodeKey]['videoCodec'] == 'vp8' ){
242242 self::tryAddSource( $file, $sources, $transcodeKey, $dataPrefix );
243243 $addWebMFlag = true;
244244 }

Status & tagging log