r97548 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97547‎ | r97548 | r97549 >
Date:20:07, 19 September 2011
Author:ashley
Status:ok
Tags:
Comment:
TimedMediaHandler: doc/whitespace tweaks
Modified paths:
  • /trunk/extensions/TimedMediaHandler/TimedMediaHandler.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler.php
@@ -5,18 +5,18 @@
66 exit( 1 );
77 }
88
9 -if( !class_exists( 'MwEmbedResourceManager' ) ){
 9+if( !class_exists( 'MwEmbedResourceManager' ) ) {
1010 echo "TimedMediaHandler requires the MwEmbedSupport extension.\n";
1111 exit( 1 );
1212 }
1313
1414 // Set up the timed media handler dir:
15 -$timedMediaDir = dirname(__FILE__);
16 -// Include WebVideoTranscode ( prior to config so that its defined transcode keys can be used in configuration )
 15+$timedMediaDir = dirname( __FILE__ );
 16+// Include WebVideoTranscode (prior to config so that its defined transcode keys can be used in configuration)
1717 $wgAutoloadClasses['WebVideoTranscode'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscode.php";
1818
1919 // Add the rest transcode right:
20 -$wgAvailableRights[] = 'transcode-reset';
 20+$wgAvailableRights[] = 'transcode-reset';
2121
2222 /******************* CONFIGURATION STARTS HERE **********************/
2323
@@ -24,7 +24,7 @@
2525 // Show a warning to the user if they are not using an html5 browser with high quality ogg support
2626 $wgMwEmbedModuleConfig['EmbedPlayer.DirectFileLinkWarning'] = true;
2727
28 -// The text interface should always be shown
 28+// The text interface should always be shown
2929 // ( even if there are no text tracks for that asset at render time )
3030 $wgMwEmbedModuleConfig['TimedText.ShowInterface'] = 'always';
3131
@@ -41,77 +41,77 @@
4242 $wgMediaVideoTypes = array( 'Theora', 'VP8' );
4343 $wgMediaAudioTypes = array( 'Vorbis', 'Speex', 'FLAC' );
4444
45 -// Default skin for mwEmbed player ( class attribute of video tag )
 45+// Default skin for mwEmbed player (class attribute of video tag)
4646 $wgVideoPlayerSkin = 'kskin';
4747
48 -// Support iframe for remote embedding
 48+// Support iframe for remote embedding
4949 $wgEnableIframeEmbed = true;
5050
51 -// If transcoding is enabled for this wiki ( if disabled, no transcode jobs are added and no
52 -// transcode status is displayed. Note if remote embedding an asset we will still check if
53 -// the remote repo has transcoding enabled and associated flavors for that media embed.
 51+// If transcoding is enabled for this wiki (if disabled, no transcode jobs are added and no
 52+// transcode status is displayed). Note if remote embedding an asset we will still check if
 53+// the remote repo has transcoding enabled and associated flavors for that media embed.
5454 $wgEnableTranscode = true;
5555
56 -// If the job runner should run transcode commands in a background thread and monitor the
 56+// If the job runner should run transcode commands in a background thread and monitor the
5757 // transcoding progress. This enables more fine grain control of the transcoding process, wraps
58 -// encoding commands in a lower priority 'nice' call, and kills long running transcodes that are
59 -// not making any progress. If set to false, the job runner will use the more compatible
 58+// encoding commands in a lower priority 'nice' call, and kills long running transcodes that are
 59+// not making any progress. If set to false, the job runner will use the more compatible
6060 // php blocking shell exec command.
6161 $wgEnableNiceBackgroundTranscodeJobs = true;
6262
63 -// The priority to be used with the nice transcode commands.
 63+// The priority to be used with the nice transcode commands.
6464 $wgTranscodeBackgroundPriority = 19;
6565
66 -// The total amout of time a transcoding shell command can take:
 66+// The total amout of time a transcoding shell command can take:
6767 $wgTranscodeBackgroundTimeLimit = 3600 * 4;
6868
69 -// The location of ffmpeg2theora ( transcoding )
 69+// The location of ffmpeg2theora (transcoding)
7070 $wgFFmpeg2theoraLocation = '/usr/bin/ffmpeg2theora';
7171
72 -// Location of the FFmpeg binary ( used to encode WebM and for thumbnails )
 72+// Location of the FFmpeg binary (used to encode WebM and for thumbnails)
7373 $wgFFmpegLocation = '/usr/bin/ffmpeg';
7474
75 -// The NS for TimedText ( registered on mediawiki.org )
 75+// The NS for TimedText (registered on MediaWiki.org)
7676 // http://www.mediawiki.org/wiki/Extension_namespace_registration
77 -// Note commons pre-dates TimedMediaHandler and should set $wgTimedTextNS = 102 in localSettings.php
 77+// Note commons pre-dates TimedMediaHandler and should set $wgTimedTextNS = 102 in LocalSettings.php
7878 $wgTimedTextNS = 700;
7979
80 -/**
81 - * Default enabled transcodes
82 - *
 80+/**
 81+ * Default enabled transcodes
 82+ *
8383 * -If set to empty array, no derivatives will be created
8484 * -Derivative keys encode settings are defined in WebVideoTranscode.php
85 - *
86 - * -These transcodes are *in addition to* the source file.
 85+ *
 86+ * -These transcodes are *in addition to* the source file.
8787 * -Only derivatives with smaller width than the source asset size will be created
88 - * -Regardless of source size at least one WebM and Ogg source will be created from the $wgEnabledTranscodeSet
 88+ * -Regardless of source size at least one WebM and Ogg source will be created from the $wgEnabledTranscodeSet
8989 * -Derivative jobs are added to the MediaWiki JobQueue the first time the asset is displayed
9090 * -Derivative should be listed min to max
9191 */
9292 $wgEnabledTranscodeSet = array(
93 - // Cover accessibility for low bandwidth / low resources clients:
 93+ // Cover accessibility for low bandwidth / low resources clients:
9494 WebVideoTranscode::ENC_OGV_160P,
95 -
96 - // A high end web streamable ogg video
 95+
 96+ // A high end web streamable ogg video
9797 WebVideoTranscode::ENC_OGV_480P,
98 -
99 - // A web streamable WebM video
 98+
 99+ // A web streamable WebM video
100100 WebVideoTranscode::ENC_WEBM_480P,
101 -
102 - // A high quality WebM stream
 101+
 102+ // A high quality WebM stream
103103 WebVideoTranscode::ENC_WEBM_720P,
104104 );
105105 /******************* CONFIGURATION ENDS HERE **********************/
106106
107107
108108
109 -// List of extensions handled by Timed Media Handler since its referenced in a few places.
110 -// you should not modify this variable
 109+// List of extensions handled by Timed Media Handler since its referenced in a few places.
 110+// you should not modify this variable
111111 $wgTmhFileExtensions = array( 'ogg', 'ogv', 'oga', 'webm');
112112
113113 $wgFileExtensions = array_merge( $wgFileExtensions, $wgTmhFileExtensions );
114114
115 -// Timed Media Handler AutoLoad Classes:
 115+// Timed Media Handler AutoLoad Classes:
116116 $wgAutoloadClasses['TimedMediaHandler'] = "$timedMediaDir/TimedMediaHandler_body.php";
117117 $wgAutoloadClasses['TimedMediaHandlerHooks'] = "$timedMediaDir/TimedMediaHandler.hooks.php";
118118 $wgAutoloadClasses['TimedMediaTransformOutput'] = "$timedMediaDir/TimedMediaTransformOutput.php";
@@ -120,11 +120,11 @@
121121 // Transcode Page
122122 $wgAutoloadClasses['TranscodeStatusTable'] = "$timedMediaDir/TranscodeStatusTable.php";
123123
124 -// Testing:
 124+// Testing:
125125 $wgAutoloadClasses['ApiTestCaseVideoUpload'] = "$timedMediaDir/tests/phpunit/ApiTestCaseVideoUpload.php";
126126
127127 // Ogg Handler
128 -$wgAutoloadClasses['OggHandler'] = "$timedMediaDir/handlers/OggHandler/OggHandler.php";
 128+$wgAutoloadClasses['OggHandler'] = "$timedMediaDir/handlers/OggHandler/OggHandler.php";
129129 ini_set( 'include_path',
130130 "$timedMediaDir/handlers/OggHandler/PEAR/File_Ogg" .
131131 PATH_SEPARATOR .
@@ -132,33 +132,32 @@
133133
134134 // WebM Handler
135135 $wgAutoloadClasses['WebMHandler'] = "$timedMediaDir/handlers/WebMHandler/WebMHandler.php";
136 -$wgAutoloadClasses['getID3' ] = "$timedMediaDir/handlers/WebMHandler/getid3/getid3.php";
 136+$wgAutoloadClasses['getID3'] = "$timedMediaDir/handlers/WebMHandler/getid3/getid3.php";
137137
138 -// Text handler
 138+// Text handler
139139 $wgAutoloadClasses['TextHandler'] = "$timedMediaDir/handlers/TextHandler/TextHandler.php";
140140 $wgAutoloadClasses['TimedTextPage'] = "$timedMediaDir/TimedTextPage.php";
141141
142142 // Transcode support
143143 $wgAutoloadClasses['WebVideoTranscodeJob'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscodeJob.php";
144144
145 -// Api modules:
 145+// API modules:
146146 $wgAutoloadClasses['ApiQueryVideoInfo'] = "$timedMediaDir/ApiQueryVideoInfo.php";
147 -$wgAPIPropModules ['videoinfo'] = 'ApiQueryVideoInfo';
 147+$wgAPIPropModules['videoinfo'] = 'ApiQueryVideoInfo';
148148
149149 $wgAutoloadClasses['ApiTranscodeStatus'] = "$timedMediaDir/ApiTranscodeStatus.php";
150 -$wgAPIPropModules ['transcodestatus'] = 'ApiTranscodeStatus';
 150+$wgAPIPropModules['transcodestatus'] = 'ApiTranscodeStatus';
151151
152152 $wgAutoloadClasses['ApiTranscodeReset'] = "$timedMediaDir/ApiTranscodeReset.php";
153153 $wgAPIModules['transcodereset'] = 'ApiTranscodeReset';
154154
155 -
156 -// Localization
 155+// Localization
157156 $wgExtensionMessagesFiles['TimedMediaHandler'] = "$timedMediaDir/TimedMediaHandler.i18n.php";
158157 $wgExtensionMessagesFiles['TimedMediaHandlerMagic'] = "$timedMediaDir/TimedMediaHandler.i18n.magic.php";
159158
160159 // Register all Timed Media Handler hooks right after the cache check.
161 -// This way if you set a variable like $wgTimedTextNS in LocalSettings.php after you include TimedMediaHandler
162 -// we can still read the variable values
 160+// This way if you set a variable like $wgTimedTextNS in LocalSettings.php after you include TimedMediaHandler
 161+// we can still read the variable values
163162 $wgHooks['SetupAfterCache'][] = 'TimedMediaHandlerHooks::register';
164163
165164 // Extension Credits

Status & tagging log