Total Complexity | 4 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
18 | class FFMpeg |
||
19 | { |
||
20 | /** @var BFFMpeg */ |
||
21 | protected $ffmpeg; |
||
22 | |||
23 | /** |
||
24 | * FFMpegInstance constructor. |
||
25 | * @param $ffmpeg |
||
26 | */ |
||
27 | public function __construct(BFFMpeg $ffmpeg) |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param $path |
||
34 | * @return Media |
||
35 | */ |
||
36 | public function open($path): Media |
||
37 | { |
||
38 | return new Media($this->ffmpeg->open($path), $path); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param $method |
||
43 | * @param $parameters |
||
44 | * @return mixed |
||
45 | */ |
||
46 | public function __call($method, $parameters) |
||
47 | { |
||
48 | return call_user_func_array([$this->ffmpeg, $method], $parameters); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @param array $config |
||
53 | * @param LoggerInterface $logger |
||
54 | * @param FFProbe|null $probe |
||
55 | * @return FFMpeg |
||
56 | */ |
||
57 | public static function create($config = array(), LoggerInterface $logger = null, FFProbe $probe = null) |
||
60 | } |
||
61 | } |
||
62 |