Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler.php |
— | — | @@ -5,18 +5,18 @@ |
6 | 6 | exit( 1 ); |
7 | 7 | } |
8 | 8 | |
9 | | -if( !class_exists( 'MwEmbedResourceManager' ) ){ |
| 9 | +if( !class_exists( 'MwEmbedResourceManager' ) ) { |
10 | 10 | echo "TimedMediaHandler requires the MwEmbedSupport extension.\n"; |
11 | 11 | exit( 1 ); |
12 | 12 | } |
13 | 13 | |
14 | 14 | // 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) |
17 | 17 | $wgAutoloadClasses['WebVideoTranscode'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscode.php"; |
18 | 18 | |
19 | 19 | // Add the rest transcode right: |
20 | | -$wgAvailableRights[] = 'transcode-reset'; |
| 20 | +$wgAvailableRights[] = 'transcode-reset'; |
21 | 21 | |
22 | 22 | /******************* CONFIGURATION STARTS HERE **********************/ |
23 | 23 | |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | // Show a warning to the user if they are not using an html5 browser with high quality ogg support |
26 | 26 | $wgMwEmbedModuleConfig['EmbedPlayer.DirectFileLinkWarning'] = true; |
27 | 27 | |
28 | | -// The text interface should always be shown |
| 28 | +// The text interface should always be shown |
29 | 29 | // ( even if there are no text tracks for that asset at render time ) |
30 | 30 | $wgMwEmbedModuleConfig['TimedText.ShowInterface'] = 'always'; |
31 | 31 | |
— | — | @@ -41,77 +41,77 @@ |
42 | 42 | $wgMediaVideoTypes = array( 'Theora', 'VP8' ); |
43 | 43 | $wgMediaAudioTypes = array( 'Vorbis', 'Speex', 'FLAC' ); |
44 | 44 | |
45 | | -// Default skin for mwEmbed player ( class attribute of video tag ) |
| 45 | +// Default skin for mwEmbed player (class attribute of video tag) |
46 | 46 | $wgVideoPlayerSkin = 'kskin'; |
47 | 47 | |
48 | | -// Support iframe for remote embedding |
| 48 | +// Support iframe for remote embedding |
49 | 49 | $wgEnableIframeEmbed = true; |
50 | 50 | |
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. |
54 | 54 | $wgEnableTranscode = true; |
55 | 55 | |
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 |
57 | 57 | // 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 |
60 | 60 | // php blocking shell exec command. |
61 | 61 | $wgEnableNiceBackgroundTranscodeJobs = true; |
62 | 62 | |
63 | | -// The priority to be used with the nice transcode commands. |
| 63 | +// The priority to be used with the nice transcode commands. |
64 | 64 | $wgTranscodeBackgroundPriority = 19; |
65 | 65 | |
66 | | -// The total amout of time a transcoding shell command can take: |
| 66 | +// The total amout of time a transcoding shell command can take: |
67 | 67 | $wgTranscodeBackgroundTimeLimit = 3600 * 4; |
68 | 68 | |
69 | | -// The location of ffmpeg2theora ( transcoding ) |
| 69 | +// The location of ffmpeg2theora (transcoding) |
70 | 70 | $wgFFmpeg2theoraLocation = '/usr/bin/ffmpeg2theora'; |
71 | 71 | |
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) |
73 | 73 | $wgFFmpegLocation = '/usr/bin/ffmpeg'; |
74 | 74 | |
75 | | -// The NS for TimedText ( registered on mediawiki.org ) |
| 75 | +// The NS for TimedText (registered on MediaWiki.org) |
76 | 76 | // 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 |
78 | 78 | $wgTimedTextNS = 700; |
79 | 79 | |
80 | | -/** |
81 | | - * Default enabled transcodes |
82 | | - * |
| 80 | +/** |
| 81 | + * Default enabled transcodes |
| 82 | + * |
83 | 83 | * -If set to empty array, no derivatives will be created |
84 | 84 | * -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. |
87 | 87 | * -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 |
89 | 89 | * -Derivative jobs are added to the MediaWiki JobQueue the first time the asset is displayed |
90 | 90 | * -Derivative should be listed min to max |
91 | 91 | */ |
92 | 92 | $wgEnabledTranscodeSet = array( |
93 | | - // Cover accessibility for low bandwidth / low resources clients: |
| 93 | + // Cover accessibility for low bandwidth / low resources clients: |
94 | 94 | WebVideoTranscode::ENC_OGV_160P, |
95 | | - |
96 | | - // A high end web streamable ogg video |
| 95 | + |
| 96 | + // A high end web streamable ogg video |
97 | 97 | WebVideoTranscode::ENC_OGV_480P, |
98 | | - |
99 | | - // A web streamable WebM video |
| 98 | + |
| 99 | + // A web streamable WebM video |
100 | 100 | WebVideoTranscode::ENC_WEBM_480P, |
101 | | - |
102 | | - // A high quality WebM stream |
| 101 | + |
| 102 | + // A high quality WebM stream |
103 | 103 | WebVideoTranscode::ENC_WEBM_720P, |
104 | 104 | ); |
105 | 105 | /******************* CONFIGURATION ENDS HERE **********************/ |
106 | 106 | |
107 | 107 | |
108 | 108 | |
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 |
111 | 111 | $wgTmhFileExtensions = array( 'ogg', 'ogv', 'oga', 'webm'); |
112 | 112 | |
113 | 113 | $wgFileExtensions = array_merge( $wgFileExtensions, $wgTmhFileExtensions ); |
114 | 114 | |
115 | | -// Timed Media Handler AutoLoad Classes: |
| 115 | +// Timed Media Handler AutoLoad Classes: |
116 | 116 | $wgAutoloadClasses['TimedMediaHandler'] = "$timedMediaDir/TimedMediaHandler_body.php"; |
117 | 117 | $wgAutoloadClasses['TimedMediaHandlerHooks'] = "$timedMediaDir/TimedMediaHandler.hooks.php"; |
118 | 118 | $wgAutoloadClasses['TimedMediaTransformOutput'] = "$timedMediaDir/TimedMediaTransformOutput.php"; |
— | — | @@ -120,11 +120,11 @@ |
121 | 121 | // Transcode Page |
122 | 122 | $wgAutoloadClasses['TranscodeStatusTable'] = "$timedMediaDir/TranscodeStatusTable.php"; |
123 | 123 | |
124 | | -// Testing: |
| 124 | +// Testing: |
125 | 125 | $wgAutoloadClasses['ApiTestCaseVideoUpload'] = "$timedMediaDir/tests/phpunit/ApiTestCaseVideoUpload.php"; |
126 | 126 | |
127 | 127 | // Ogg Handler |
128 | | -$wgAutoloadClasses['OggHandler'] = "$timedMediaDir/handlers/OggHandler/OggHandler.php"; |
| 128 | +$wgAutoloadClasses['OggHandler'] = "$timedMediaDir/handlers/OggHandler/OggHandler.php"; |
129 | 129 | ini_set( 'include_path', |
130 | 130 | "$timedMediaDir/handlers/OggHandler/PEAR/File_Ogg" . |
131 | 131 | PATH_SEPARATOR . |
— | — | @@ -132,33 +132,32 @@ |
133 | 133 | |
134 | 134 | // WebM Handler |
135 | 135 | $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"; |
137 | 137 | |
138 | | -// Text handler |
| 138 | +// Text handler |
139 | 139 | $wgAutoloadClasses['TextHandler'] = "$timedMediaDir/handlers/TextHandler/TextHandler.php"; |
140 | 140 | $wgAutoloadClasses['TimedTextPage'] = "$timedMediaDir/TimedTextPage.php"; |
141 | 141 | |
142 | 142 | // Transcode support |
143 | 143 | $wgAutoloadClasses['WebVideoTranscodeJob'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscodeJob.php"; |
144 | 144 | |
145 | | -// Api modules: |
| 145 | +// API modules: |
146 | 146 | $wgAutoloadClasses['ApiQueryVideoInfo'] = "$timedMediaDir/ApiQueryVideoInfo.php"; |
147 | | -$wgAPIPropModules ['videoinfo'] = 'ApiQueryVideoInfo'; |
| 147 | +$wgAPIPropModules['videoinfo'] = 'ApiQueryVideoInfo'; |
148 | 148 | |
149 | 149 | $wgAutoloadClasses['ApiTranscodeStatus'] = "$timedMediaDir/ApiTranscodeStatus.php"; |
150 | | -$wgAPIPropModules ['transcodestatus'] = 'ApiTranscodeStatus'; |
| 150 | +$wgAPIPropModules['transcodestatus'] = 'ApiTranscodeStatus'; |
151 | 151 | |
152 | 152 | $wgAutoloadClasses['ApiTranscodeReset'] = "$timedMediaDir/ApiTranscodeReset.php"; |
153 | 153 | $wgAPIModules['transcodereset'] = 'ApiTranscodeReset'; |
154 | 154 | |
155 | | - |
156 | | -// Localization |
| 155 | +// Localization |
157 | 156 | $wgExtensionMessagesFiles['TimedMediaHandler'] = "$timedMediaDir/TimedMediaHandler.i18n.php"; |
158 | 157 | $wgExtensionMessagesFiles['TimedMediaHandlerMagic'] = "$timedMediaDir/TimedMediaHandler.i18n.magic.php"; |
159 | 158 | |
160 | 159 | // 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 |
163 | 162 | $wgHooks['SetupAfterCache'][] = 'TimedMediaHandlerHooks::register'; |
164 | 163 | |
165 | 164 | // Extension Credits |