| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/formats/mp4/track_run_iterator.h" | 5 #include "media/formats/mp4/track_run_iterator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 case 'O': | 202 case 'O': |
| 203 sample_depends_on = kSampleDependsOnOthers; | 203 sample_depends_on = kSampleDependsOnOthers; |
| 204 break; | 204 break; |
| 205 case 'N': | 205 case 'N': |
| 206 sample_depends_on = kSampleDependsOnNoOther; | 206 sample_depends_on = kSampleDependsOnNoOther; |
| 207 break; | 207 break; |
| 208 case 'R': | 208 case 'R': |
| 209 sample_depends_on = kSampleDependsOnReserved; | 209 sample_depends_on = kSampleDependsOnReserved; |
| 210 break; | 210 break; |
| 211 default: | 211 default: |
| 212 CHECK(false) << "Invalid sample dependency character '" | 212 // Invalid sample dependency character. |
| 213 << str[0] << "'"; | 213 CHECK(false); |
| 214 break; | 214 break; |
| 215 } | 215 } |
| 216 | 216 |
| 217 switch(str[1]) { | 217 switch(str[1]) { |
| 218 case 'S': | 218 case 'S': |
| 219 is_non_sync_sample = false; | 219 is_non_sync_sample = false; |
| 220 break; | 220 break; |
| 221 case 'N': | 221 case 'N': |
| 222 is_non_sync_sample = true; | 222 is_non_sync_sample = true; |
| 223 break; | 223 break; |
| 224 default: | 224 default: |
| 225 CHECK(false) << "Invalid sync sample character '" | 225 // Invalid sync sample character. |
| 226 << str[1] << "'"; | 226 CHECK(false); |
| 227 break; | 227 break; |
| 228 } | 228 } |
| 229 uint32_t flags = static_cast<uint32_t>(sample_depends_on) << 24; | 229 uint32_t flags = static_cast<uint32_t>(sample_depends_on) << 24; |
| 230 if (is_non_sync_sample) | 230 if (is_non_sync_sample) |
| 231 flags |= kSampleIsNonSyncSample; | 231 flags |= kSampleIsNonSyncSample; |
| 232 return flags; | 232 return flags; |
| 233 } | 233 } |
| 234 | 234 |
| 235 void SetFlagsOnSamples(const std::string& sample_info, | 235 void SetFlagsOnSamples(const std::string& sample_info, |
| 236 TrackFragmentRun* trun) { | 236 TrackFragmentRun* trun) { |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 // The remaining samples should be associated with the default values | 1076 // The remaining samples should be associated with the default values |
| 1077 // specified in TrackEncryption Box. | 1077 // specified in TrackEncryption Box. |
| 1078 EXPECT_TRUE(iter_->is_encrypted()); | 1078 EXPECT_TRUE(iter_->is_encrypted()); |
| 1079 EXPECT_EQ(track_encryption_iv, iter_->GetDecryptConfig()->iv()); | 1079 EXPECT_EQ(track_encryption_iv, iter_->GetDecryptConfig()->iv()); |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 #endif | 1082 #endif |
| 1083 | 1083 |
| 1084 } // namespace mp4 | 1084 } // namespace mp4 |
| 1085 } // namespace media | 1085 } // namespace media |
| OLD | NEW |