scratch – Blame information for rev 115
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
115 | office | 1 | <?php |
2 | |||
3 | /* |
||
4 | * This file is part of PHP-FFmpeg. |
||
5 | * |
||
6 | * (c) Alchemy <dev.team@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\Filters\Audio; |
||
13 | |||
14 | use FFMpeg\Format\AudioInterface; |
||
15 | use FFMpeg\Media\Audio; |
||
16 | |||
17 | class AudioResamplableFilter implements AudioFilterInterface |
||
18 | { |
||
19 | /** @var string */ |
||
20 | private $rate; |
||
21 | /** @var integer */ |
||
22 | private $priority; |
||
23 | |||
24 | public function __construct($rate, $priority = 0) |
||
25 | { |
||
26 | $this->rate = $rate; |
||
27 | $this->priority = $priority; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function getPriority() |
||
34 | { |
||
35 | return $this->priority; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | * @return Integer |
||
41 | */ |
||
42 | public function getRate() |
||
43 | { |
||
44 | return $this->rate; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function apply(Audio $audio, AudioInterface $format) |
||
51 | { |
||
52 | return array('-ac', 2, '-ar', $this->rate); |
||
53 | } |
||
54 | } |