Total Complexity | 6 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | final class VP9 extends StreamFormat |
||
18 | { |
||
19 | private const MODULUS = 2; |
||
20 | |||
21 | /** |
||
22 | * VP9 constructor. |
||
23 | * @param string $video_codec |
||
24 | * @param string|null $audio_codec |
||
25 | * @param bool $default_init_opts |
||
26 | */ |
||
27 | public function __construct(string $video_codec = 'libvpx-vp9', string $audio_codec = 'aac', bool $default_init_opts = true) |
||
28 | { |
||
29 | $this |
||
30 | ->setVideoCodec($video_codec) |
||
31 | ->setAudioCodec($audio_codec); |
||
32 | |||
33 | /** |
||
34 | * set the default value of h265 codec options |
||
35 | * see https://ffmpeg.org/ffmpeg-codecs.html#Options-26 for more information about options |
||
36 | */ |
||
37 | if ($default_init_opts) { |
||
38 | //@TODO: add default vp9 |
||
39 | } |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * {@inheritDoc} |
||
44 | */ |
||
45 | public function getAvailableAudioCodecs() |
||
46 | { |
||
47 | return ['libvorbis']; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * {@inheritDoc} |
||
52 | */ |
||
53 | public function getAvailableVideoCodecs(): array |
||
54 | { |
||
55 | return ['libvpx', 'libvpx-vp9']; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return int |
||
60 | */ |
||
61 | public function getModulus() |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Returns true if the current format supports B-Frames. |
||
68 | * |
||
69 | * @see https://wikipedia.org/wiki/Video_compression_picture_types |
||
70 | * |
||
71 | * @return Boolean |
||
72 | */ |
||
73 | public function supportBFrames() |
||
78 |