-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #705 from Dash-Industry-Forum/bugfix/isoSegmentWar…
…nings Fix IsoSegmentValidator issues - Bypassing review due to > 1m of inactivity.
- Loading branch information
Showing
11 changed files
with
129 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,34 @@ | ||
<?php | ||
|
||
global $session, $MediaProfDatabase, $logger; | ||
global $session, $MediaProfDatabase, $logger, $mpdHandler; | ||
|
||
$periodCount = sizeof($MediaProfDatabase); | ||
$adaptationCount = sizeof($MediaProfDatabase[0]); | ||
for ($i = 0; $i < ($periodCount - 1); $i++) { | ||
for ($adapt = 0; $adapt < $adaptationCount; $adapt++) { | ||
$dir1 = $session->getRepresentationDir($i, $adapt, 0); | ||
$xml1 = DASHIF\Utility\parseDOM($dir1 . '/atomInfo.xml', 'atomlist'); | ||
if ($xml1) { | ||
$hdlr = $xml1->getElementsByTagName("hdlr")->item(0)->getAttribute("handler_type"); | ||
if ($hdlr == "vide") { | ||
$framerate_p1 = $this->getFrameRate($xml1); | ||
} | ||
if ($mpdHandler->getContentType($i, $adapt) != "video") { | ||
continue; | ||
} | ||
$dir2 = $session->getRepresentationDir($i + 1, $adapt, 0); | ||
$xml2 = DASHIF\Utility\parseDOM($dir2 . '/atomInfo.xml', 'atomlist'); | ||
if ($xml2) { | ||
$hdlr = $xml2->getElementsByTagName("hdlr")->item(0)->getAttribute("handler_type"); | ||
if ($hdlr == "vide") { | ||
$framerate_p2 = $this->getFrameRate($xml2); | ||
if ($mpdHandler->getContentType($i + 1, $adapt) != "video") { | ||
continue; | ||
} | ||
$framerate_p1 = $mpdHandler->getFrameRate($i, $adapt, 0); | ||
$framerate_p2 = $mpdHandler->getFrameRate($i + 1, $adapt, 0); | ||
|
||
|
||
$remainder = ($framerate_p1 > $framerate_p2 ? | ||
($framerate_p1 % $framerate_p2) : | ||
($framerate_p2 % $framerate_p1)); | ||
$remainder = ($framerate_p1 > $framerate_p2 ? | ||
($framerate_p1 % $framerate_p2) : | ||
($framerate_p2 % $framerate_p1)); | ||
|
||
|
||
$logger->test( | ||
"WAVE Content Spec 2018Ed", | ||
"Section 7.2.2", | ||
"Frame rate Should be the same between Sequential Sw Sets at the Splice point", | ||
$remainder == 0, | ||
"WARN", | ||
"Correct for Sw set $adapt between presentations $i and " . ($i + 1), | ||
"Invalid for Sw set $adapt between presentations $i and " . ($i + 1), | ||
); | ||
} | ||
} | ||
$logger->test( | ||
"WAVE Content Spec 2018Ed", | ||
"Section 7.2.2", | ||
"Frame rate Should be the same between Sequential Sw Sets at the Splice point", | ||
$remainder == 0, | ||
"WARN", | ||
"Correct for Sw set $adapt between presentations $i and " . ($i + 1), | ||
"Invalid for Sw set $adapt between presentations $i and " . ($i + 1), | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$period = ($periodIndex == null ? $this->getSelectedPeriod() : $periodIndex); | ||
$adaptation = ($adaptationIndex == null ? $this->getSelectedAdaptationSet() : $adaptationIndex); | ||
|
||
$periods = $mpdHandler->getElementsByTagName("Period"); | ||
|
||
if ($period >= count($periods)) { | ||
return null; | ||
} | ||
|
||
$thisPeriod = $periods->item($period); | ||
|
||
$adaptationSets = $thisPeriod->getElementsByTagName("AdaptationSet"); | ||
if ($adaptation >= count($adaptationSets)) { | ||
return null; | ||
} | ||
|
||
|
||
return $adaptationSets->item($adaptation)->getAttribute("contentType"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
$period = ($periodIndex == null ? $this->getSelectedPeriod() : $periodIndex); | ||
$adaptation = ($adaptationIndex == null ? $this->getSelectedAdaptationSet() : $adaptationIndex); | ||
$representation = ($representationIndex == null ? $this->getSelectedRepresentation() : $representationIndex); | ||
|
||
$framerate = 0; | ||
|
||
$periods = $mpdHandler->getElementsByTagName("Period"); | ||
|
||
if ($period >= count($periods)) { | ||
return null; | ||
} | ||
|
||
$thisPeriod = $periods->item($period); | ||
|
||
if ($thisPeriod->hasAttribute('frameRate')) { | ||
$framerate = $thisPeriod->getAttribute('frameRate'); | ||
} | ||
|
||
$adaptationSets = $thisPeriod->getElementsByTagName("AdaptationSet"); | ||
if ($adaptation >= count($adaptationSets)) { | ||
return null; | ||
} | ||
|
||
$thisAdaptation = $adaptationSets->item($adaptation); | ||
|
||
if ($thisAdaptation->hasAttribute('frameRate')) { | ||
$framerate = $thisAdaptation->getAttribute('frameRate'); | ||
} | ||
|
||
$representations = $thisAdaptation->getElementsByTagName("Representation"); | ||
|
||
if ($representation >= count($representations)) { | ||
return null; | ||
} | ||
|
||
$thisRepresentation = $representations->item($representation); | ||
|
||
if ($thisRepresentation->hasAttribute('frameRate')) { | ||
$framerate = $thisRepresentation->getAttribute('frameRate'); | ||
} | ||
|
||
return $framerate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters