scratch – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
115 | office | 1 | <?php |
2 | |||
3 | /* |
||
4 | * This file is part of PHP-FFmpeg. |
||
5 | * |
||
6 | * (c) Alchemy <info@alchemy.fr> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace FFMpeg\Format\Video; |
||
13 | |||
14 | /** |
||
15 | * The X264 video format |
||
16 | */ |
||
17 | class X264 extends DefaultVideo |
||
18 | { |
||
19 | /** @var boolean */ |
||
20 | private $bframesSupport = true; |
||
21 | |||
22 | /** @var integer */ |
||
23 | private $passes = 2; |
||
24 | |||
25 | public function __construct($audioCodec = 'libfaac', $videoCodec = 'libx264') |
||
26 | { |
||
27 | $this |
||
28 | ->setAudioCodec($audioCodec) |
||
29 | ->setVideoCodec($videoCodec); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * {@inheritDoc} |
||
34 | */ |
||
35 | public function supportBFrames() |
||
36 | { |
||
37 | return $this->bframesSupport; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param $support |
||
42 | * |
||
43 | * @return X264 |
||
44 | */ |
||
45 | public function setBFramesSupport($support) |
||
46 | { |
||
47 | $this->bframesSupport = $support; |
||
48 | |||
49 | return $this; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * {@inheritDoc} |
||
54 | */ |
||
55 | public function getAvailableAudioCodecs() |
||
56 | { |
||
57 | return array('aac', 'libvo_aacenc', 'libfaac', 'libmp3lame', 'libfdk_aac'); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | */ |
||
63 | public function getAvailableVideoCodecs() |
||
64 | { |
||
65 | return array('libx264'); |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @param $passes |
||
70 | * |
||
71 | * @return X264 |
||
72 | */ |
||
73 | public function setPasses($passes) |
||
74 | { |
||
75 | $this->passes = $passes; |
||
76 | return $this; |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * {@inheritDoc} |
||
81 | */ |
||
82 | public function getPasses() |
||
83 | { |
||
84 | return $this->passes; |
||
85 | } |
||
86 | |||
87 | /** |
||
88 | * @return int |
||
89 | */ |
||
90 | public function getModulus() |
||
91 | { |
||
92 | return 2; |
||
93 | } |
||
94 | } |