|
21 | 21 | for ($adaptationIndex = 0; $adaptationIndex < $adaptationCount; $adaptationIndex++) { |
22 | 22 | $switchingSetMediaProfiles = array(); |
23 | 23 | $encryptedTracks = array(); |
24 | | - if(is_null($periodIndex)) { |
| 24 | + if (is_null($periodIndex)) { |
25 | 25 | $periodIndex = $mpdHandler->getSelectedPeriod(); |
26 | 26 | } |
27 | 27 | $location = $session->getAdaptationDir($periodIndex, $adaptationIndex); |
|
108 | 108 |
|
109 | 109 |
|
110 | 110 | $presentationProfileArray = array(); |
| 111 | +$conforms = false; |
111 | 112 | if ($videoSelectionSetFound) { |
112 | 113 | $conforms = $logger->test( |
113 | 114 | "CTAWAVE", |
|
119 | 120 | "Switching set found", |
120 | 121 | "Switching set not found" |
121 | 122 | ); |
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 | + |
130 | 128 | } |
131 | 129 | if ($audioSelectionSetFound) { |
132 | 130 | $conforms = $logger->test( |
|
139 | 137 | "Switching set found", |
140 | 138 | "Switching set not found" |
141 | 139 | ); |
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 | + |
150 | 146 | } |
151 | 147 | if ($subtitleSelectionSetFound) { |
152 | 148 | $conforms = $logger->test( |
|
159 | 155 | "Switching set found", |
160 | 156 | "Switching set not found" |
161 | 157 | ); |
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 | + ); |
170 | 162 | } |
171 | 163 |
|
172 | 164 |
|
|
179 | 171 | } |
180 | 172 |
|
181 | 173 |
|
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"); |
184 | 176 | } |
185 | 177 |
|
186 | 178 | $this->presentationProfile = $presentationProfile; |
|
0 commit comments