Skip to content

Commit 058375d

Browse files
authored
Save presentation profile regardless of conformance in previous tests for further processing (#674)
1 parent 260e754 commit 058375d

2 files changed

Lines changed: 20 additions & 28 deletions

File tree

CTAWAVE/impl/CTACheckPresentation.php

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
for ($adaptationIndex = 0; $adaptationIndex < $adaptationCount; $adaptationIndex++) {
2222
$switchingSetMediaProfiles = array();
2323
$encryptedTracks = array();
24-
if(is_null($periodIndex)) {
24+
if (is_null($periodIndex)) {
2525
$periodIndex = $mpdHandler->getSelectedPeriod();
2626
}
2727
$location = $session->getAdaptationDir($periodIndex, $adaptationIndex);
@@ -108,6 +108,7 @@
108108

109109

110110
$presentationProfileArray = array();
111+
$conforms = false;
111112
if ($videoSelectionSetFound) {
112113
$conforms = $logger->test(
113114
"CTAWAVE",
@@ -119,14 +120,11 @@
119120
"Switching set found",
120121
"Switching set not found"
121122
);
122-
if ($conforms) {
123-
array_push(
124-
$presentationProfileArray,
125-
$this->getPresentationProfile($encryptedTrackFound, $cencSwSetFound, $cbcsSwSetFound)
126-
);
127-
} else {
128-
array_push($presentationProfileArray, "");
129-
}
123+
124+
array_push(
125+
$presentationProfileArray,
126+
$this->getPresentationProfile($encryptedTrackFound, $cencSwSetFound, $cbcsSwSetFound));
127+
130128
}
131129
if ($audioSelectionSetFound) {
132130
$conforms = $logger->test(
@@ -139,14 +137,12 @@
139137
"Switching set found",
140138
"Switching set not found"
141139
);
142-
if ($conforms) {
143-
array_push(
144-
$presentationProfileArray,
145-
$this->getPresentationProfile($encryptedTrackFound, $cencSwSetFound, $cbcsSwSetFound)
146-
);
147-
} else {
148-
array_push($presentationProfileArray, "");
149-
}
140+
141+
array_push(
142+
$presentationProfileArray,
143+
$this->getPresentationProfile($encryptedTrackFound, $cencSwSetFound, $cbcsSwSetFound)
144+
);
145+
150146
}
151147
if ($subtitleSelectionSetFound) {
152148
$conforms = $logger->test(
@@ -159,14 +155,10 @@
159155
"Switching set found",
160156
"Switching set not found"
161157
);
162-
if ($conforms) {
163-
array_push(
164-
$presentationProfileArray,
165-
$this->getPresentationProfile($encryptedTrackFound, $cencSwSetFound, $cbcsSwSetFound)
166-
);
167-
} else {
168-
array_push($presentationProfileArray, "");
169-
}
158+
array_push(
159+
$presentationProfileArray,
160+
$this->getPresentationProfile($encryptedTrackFound, $cencSwSetFound, $cbcsSwSetFound)
161+
);
170162
}
171163

172164

@@ -179,8 +171,8 @@
179171
}
180172

181173

182-
if ($presentationProfile != ""){
183-
$logger->message("Stream found to conform to a CMAF Presentation Profile: $presentationProfile");
174+
if ($presentationProfile != "" && $conforms) {
175+
$logger->message("Stream found to conform to a CMAF Presentation Profile: $presentationProfile");
184176
}
185177

186178
$this->presentationProfile = $presentationProfile;

CTAWAVE/impl/checkCMFHDBaselineConstraints.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
$this->presentationProfile == "CMFHD",
1111
"FAIL",
1212
"All CMAF Switching sets are CMFHD conformant",
13-
"Not all CMAF Switching sets are CMFHD conformant, found $presentationProfile"
13+
"Not all CMAF Switching sets are CMFHD conformant, found $this->presentationProfile"
1414
);

0 commit comments

Comments
 (0)