Skip to content

Commit

Permalink
MOD: AnalyzeDcp.php AnalyzeDcpTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cinemapub committed Sep 13, 2024
1 parent 252596e commit 174d6e3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
11 changes: 1 addition & 10 deletions src/Folders/AnalyzeDcp.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,8 @@ private static function detectType(DcpFile $dcpFile): Type
if (stripos($dcpFile->name, 'pcm') !== false) {
return Type::Sound;
}
if (stripos($dcpFile->name, 'video') !== false) {
return Type::Picture;
}
if (stripos($dcpFile->name, 'image') !== false) {
return Type::Picture;
}
if (stripos($dcpFile->name, 'j2c') !== false) {
return Type::Picture;
}

return Type::Picture;

}
if ($extension === 'cpl') {
return Type::CPL;
Expand Down
16 changes: 16 additions & 0 deletions tests/Folders/AnalyzeDcpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,20 @@ public function testSimple()
$this->assertNotEmpty($dcpObject->AssetMap);
$this->assertNotEmpty($dcpObject->VolIndex);
}

/**
* @throws InputMissingException
*/
public function testWeirdCase1()
{
$dcpFolder = '/mnt/c/Users/forretp/Dropbox/Spottix/Ingest/Examples/Brightfish/DCP_LargoWinch3';
$dcpObject = AnalyzeDcp::simple($dcpFolder);
$this->assertNotEmpty($dcpObject->mxfVideo);
$this->assertNotEmpty($dcpObject->mxfAudio);
$this->assertNotEmpty($dcpObject->cplFile);
$this->assertNotEmpty($dcpObject->pklFile);
$this->assertNotEmpty($dcpObject->AssetMap);
$this->assertNotEmpty($dcpObject->VolIndex);

}
}

0 comments on commit 174d6e3

Please sign in to comment.