Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
28 | public static function initialize(string $path, string $binary = 'mediainfo'): StreamCollection |
||
29 | { |
||
30 | $media_info = json_decode(static::getJsonOutPut(new Process($binary), $path), true); |
||
31 | |||
32 | $streams = $media_info["media"]["track"]; |
||
33 | $stream_collection = []; |
||
34 | |||
35 | foreach ($streams as $stream){ |
||
36 | $stream_collection[] = new Stream($stream); |
||
37 | } |
||
38 | |||
39 | return new StreamCollection($stream_collection); |
||
40 | } |
||
52 | } |