Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 9679324

Browse files
author
jaw-sh
committed
Matroska file detection.
1 parent a330b45 commit 9679324

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+56
-1
lines changed

.gitignore

100755100644
File mode changed.

LICENSE

100755100644
File mode changed.

README.md

100755100644
File mode changed.

composer.json

100755100644
File mode changed.

phpunit.xml

100755100644
File mode changed.

src/Contracts/DetectiveContract.php

100755100644
File mode changed.

src/Detectives/ImageGDDetective.php

100755100644
File mode changed.

src/Detectives/ffmpegDetective.php

100755100644
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,54 @@ protected function leadMP4()
225225
return null;
226226
}
227227

228+
/**
229+
* Checks if the file is a MKA.
230+
*
231+
* @return boolean|null
232+
*/
233+
protected function leadMKA()
234+
{
235+
$lead = $this->ffprobeFormat("matroska", "webm");
236+
237+
if ($lead === true)
238+
{
239+
if ($this->ffprobeHasAudio() !== false)
240+
{
241+
return $this->closeCase("mka", "audio/x-matroska", $this->metadata);
242+
}
243+
else
244+
{
245+
return false;
246+
}
247+
}
248+
249+
return null;
250+
}
251+
252+
/**
253+
* Checks if the file is a MKV.
254+
*
255+
* @return boolean|null
256+
*/
257+
protected function leadMKV()
258+
{
259+
$lead = $this->ffprobeFormat("matroska", "webm");
260+
261+
if ($lead === true)
262+
{
263+
if ($this->ffprobeHasVideo() !== false)
264+
{
265+
return $this->closeCase("mkv", "video/x-matroska", $this->metadata);
266+
}
267+
else
268+
{
269+
return false;
270+
}
271+
}
272+
273+
return null;
274+
}
275+
228276
/**
229277
* Checks if the file is a OGG Audio-only (OGA).
230278
*

src/Detectives/svgDetective.php

100755100644
File mode changed.

src/Exceptions/CaseNotSolved.php

100755100644
File mode changed.

0 commit comments

Comments
 (0)