ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FFMpegEngine.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26class FFMpegEngine implements Engine
27{
28 use PHPMemoryLimit;
29
30 protected array $supported = [
31 'mp4',
32 'webm',
33 'mov',
34 'avi',
35 'flv',
36 'wmv',
37 'mkv',
38 'm4v',
39 ];
40
41 public function __construct()
42 {
43 }
44
45 public function supports(string $suffix): bool
46 {
47 if (!$this->isRunning()) {
48 return false;
49 }
50 return in_array(strtolower($suffix), $this->supported, true);
51 }
52
53 public function isRunning(): bool
54 {
55 return defined('PATH_TO_FFMPEG');
56 }
57
58}