1 | <?php |
||
10 | class MediaInfo |
||
11 | { |
||
12 | /** |
||
13 | * @var MediaInfoCommandRunner|null |
||
14 | */ |
||
15 | private $mediaInfoCommandRunnerAsync = null; |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | private $configuration = [ |
||
21 | 'command' => null, |
||
22 | 'use_oldxml_mediainfo_output_format' => true, |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * @param $filePath |
||
27 | * @param bool $ignoreUnknownTrackTypes Optional parameter used to skip unknown track types by passing true. The |
||
28 | * default behavior (false) is throw an exception on unknown track types. |
||
29 | * |
||
30 | * @throws \Mhor\MediaInfo\Exception\UnknownTrackTypeException |
||
31 | * |
||
32 | * @return MediaInfoContainer |
||
33 | */ |
||
34 | public function getInfo($filePath, $ignoreUnknownTrackTypes = false): MediaInfoContainer |
||
44 | |||
45 | /** |
||
46 | * Call to start asynchronous process. |
||
47 | * |
||
48 | * Make call to MediaInfo::getInfoWaitAsync() afterwards to received MediaInfoContainer object. |
||
49 | * |
||
50 | * @param $filePath |
||
51 | */ |
||
52 | public function getInfoStartAsync($filePath): void |
||
61 | |||
62 | /** |
||
63 | * @param bool $ignoreUnknownTrackTypes Optional parameter used to skip unknown track types by passing true. The |
||
64 | * default behavior (false) is throw an exception on unknown track types. |
||
65 | * |
||
66 | * @throws \Exception If this function is called before getInfoStartAsync() |
||
67 | * @throws \Mhor\MediaInfo\Exception\UnknownTrackTypeException |
||
68 | * |
||
69 | * @return MediaInfoContainer |
||
70 | */ |
||
71 | public function getInfoWaitAsync($ignoreUnknownTrackTypes = false): MediaInfoContainer |
||
85 | |||
86 | /** |
||
87 | * @param string $key |
||
88 | * @param string $value |
||
89 | * |
||
90 | * @throws \Exception |
||
91 | */ |
||
92 | 1 | public function setConfig($key, $value) |
|
102 | } |
||
103 |