scratch – Blame information for rev 120
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
120 | 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 | namespace FFMpeg\Filters\Video; |
||
12 | |||
13 | use FFMpeg\Format\VideoInterface; |
||
14 | use FFMpeg\Media\Video; |
||
15 | |||
16 | class CustomFilter implements VideoFilterInterface |
||
17 | { |
||
18 | /** @var string */ |
||
19 | private $filter; |
||
20 | /** @var integer */ |
||
21 | private $priority; |
||
22 | |||
23 | /** |
||
24 | * A custom filter, useful if you want to build complex filters |
||
25 | * |
||
26 | * @param string $filter |
||
27 | * @param int $priority |
||
28 | */ |
||
29 | public function __construct($filter, $priority = 0) |
||
30 | { |
||
31 | $this->filter = $filter; |
||
32 | $this->priority = $priority; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function getPriority() |
||
39 | { |
||
40 | return $this->priority; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function apply(Video $video, VideoInterface $format) |
||
47 | { |
||
48 | $commands = array('-vf', $this->filter); |
||
49 | |||
50 | return $commands; |
||
51 | } |
||
52 | } |