Passed
Push — master ( 3ee3fe...b14545 )
by Amin
04:48
created

Video::getExtraParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the PHP-FFmpeg-video-streaming package.
5
 *
6
 * (c) Amin Yazdanpanah <[email protected]>
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 Streaming\Format;
13
14
use FFMpeg\Format\Audio\DefaultAudio;
15
16
abstract class Video extends DefaultAudio
17
{
18
    /** @var string */
19
    protected $videoCodec;
20
21
    protected $audioKiloBitrate = null;
22
23
    /**
24
     * @return string
25
     */
26
    public function getVideoCodec(): string
27
    {
28
        return $this->videoCodec;
29
    }
30
31
    /**
32
     * @param string $videoCodec
33
     */
34
    public function setVideoCodec(string $videoCodec): void
35
    {
36
        $this->videoCodec = $videoCodec;
37
    }
38
39
    /**
40
     * Returns an array of extra parameters to add to ffmpeg commandline.
41
     *
42
     * @return array()
43
     */
44
    public function getExtraParams()
45
    {
46
        return [
47
            '-c:v',
48
            $this->getVideoCodec()
49
        ];
50
    }
51
}