ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
FFMpegEngine.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 class 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 }