Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -267,6 +267,19 @@ |
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
| 271 | + * Get the duration of a media file in seconds |
| 272 | + */ |
| 273 | + public function isVectorized() { |
| 274 | + $handler = $this->getHandler(); |
| 275 | + if ( $handler ) { |
| 276 | + return $handler->isVectorized( $this ); |
| 277 | + } else { |
| 278 | + return false; |
| 279 | + } |
| 280 | + } |
| 281 | + |
| 282 | + |
| 283 | + /** |
271 | 284 | * Get handler-specific metadata |
272 | 285 | * Overridden by LocalFile, UnregisteredLocalFile |
273 | 286 | * STUB |
Index: trunk/phase3/includes/media/Generic.php |
— | — | @@ -162,6 +162,10 @@ |
163 | 163 | */ |
164 | 164 | function pageCount( $file ) { return false; } |
165 | 165 | /** |
| 166 | + * The material is vectorized and thus scaling is lossless |
| 167 | + */ |
| 168 | + function isVectorized( $file ) { return false; } |
| 169 | + /** |
166 | 170 | * False if the handler is disabled for all files |
167 | 171 | */ |
168 | 172 | function isEnabled() { return true; } |
Index: trunk/phase3/includes/media/SVG.php |
— | — | @@ -26,6 +26,10 @@ |
27 | 27 | return true; |
28 | 28 | } |
29 | 29 | |
| 30 | + function isVectorized( $file ) { |
| 31 | + return true; |
| 32 | + } |
| 33 | + |
30 | 34 | function normaliseParams( $image, &$params ) { |
31 | 35 | global $wgSVGMaxSize; |
32 | 36 | if ( !parent::normaliseParams( $image, $params ) ) { |