Passed
Push — master ( 220de3...37ea2e )
by Amin
13:48
created

DASH::getSegDuration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 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;
13
14
use Streaming\Filters\DASHFilter;
15
use Streaming\Filters\Filter;
16
17
class DASH extends Streaming
18
{
19
    /** @var string */
20
    private $adaption;
21
22
    /** @var string */
23
    private $seg_duration = 10;
24
25
    /**
26
     * @return mixed
27
     */
28
    public function getAdaption()
29
    {
30
        return $this->adaption;
31
    }
32
33
    /**
34
     * @param mixed $adaption
35
     * @return DASH
36
     */
37
    public function setAdaption(string $adaption): DASH
38
    {
39
        $this->adaption = $adaption;
40
        return $this;
41
    }
42
43
    /**
44
     * @param string $seg_duration
45
     * @return DASH
46
     */
47
    public function setSegDuration(string $seg_duration): DASH
48
    {
49
        $this->seg_duration = $seg_duration;
50
        return $this;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getSegDuration(): string
57
    {
58
        return $this->seg_duration;
59
    }
60
61
    /**
62
     * @return Filter
63
     */
64
    protected function getFilter(): Filter
65
    {
66
        return new DASHFilter($this);
67
    }
68
69
    /**
70
     * @return string
71
     */
72
    protected function getPath(): string
73
    {
74
        return implode(".", [$this->getFilePath(), "mpd"]);
75
    }
76
}