Chromium Code Reviews| 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/box_definitions.h" | 5 #include "media/formats/mp4/box_definitions.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1204 FourCC TrackFragment::BoxType() const { return FOURCC_TRAF; } | 1204 FourCC TrackFragment::BoxType() const { return FOURCC_TRAF; } |
| 1205 | 1205 |
| 1206 bool TrackFragment::Parse(BoxReader* reader) { | 1206 bool TrackFragment::Parse(BoxReader* reader) { |
| 1207 RCHECK(reader->ScanChildren() && | 1207 RCHECK(reader->ScanChildren() && |
| 1208 reader->ReadChild(&header) && | 1208 reader->ReadChild(&header) && |
| 1209 // Media Source specific: 'tfdt' required | 1209 // Media Source specific: 'tfdt' required |
| 1210 reader->ReadChild(&decode_time) && | 1210 reader->ReadChild(&decode_time) && |
| 1211 reader->MaybeReadChildren(&runs) && | 1211 reader->MaybeReadChildren(&runs) && |
| 1212 reader->MaybeReadChild(&auxiliary_offset) && | 1212 reader->MaybeReadChild(&auxiliary_offset) && |
| 1213 reader->MaybeReadChild(&auxiliary_size) && | 1213 reader->MaybeReadChild(&auxiliary_size) && |
| 1214 reader->MaybeReadChild(&sdtp)); | 1214 reader->MaybeReadChild(&sdtp) && |
| 1215 reader->MaybeReadChild(&sample_encryption)); | |
|
kqyang
2016/09/15 22:06:32
This line loads 'senc' box if it is present.
It
| |
| 1215 | 1216 |
| 1216 // There could be multiple SampleGroupDescription and SampleToGroup boxes with | 1217 // There could be multiple SampleGroupDescription and SampleToGroup boxes with |
| 1217 // different grouping types. For common encryption, the relevant grouping type | 1218 // different grouping types. For common encryption, the relevant grouping type |
| 1218 // is 'seig'. Continue reading until 'seig' is found, or until running out of | 1219 // is 'seig'. Continue reading until 'seig' is found, or until running out of |
| 1219 // child boxes. | 1220 // child boxes. |
| 1220 while (reader->HasChild(&sample_group_description)) { | 1221 while (reader->HasChild(&sample_group_description)) { |
| 1221 RCHECK(reader->ReadChild(&sample_group_description)); | 1222 RCHECK(reader->ReadChild(&sample_group_description)); |
| 1222 if (sample_group_description.grouping_type == FOURCC_SEIG) | 1223 if (sample_group_description.grouping_type == FOURCC_SEIG) |
| 1223 break; | 1224 break; |
| 1224 sample_group_description.entries.clear(); | 1225 sample_group_description.entries.clear(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1274 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( | 1275 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( |
| 1275 size_t i) const { | 1276 size_t i) const { |
| 1276 if (i >= sample_depends_on_.size()) | 1277 if (i >= sample_depends_on_.size()) |
| 1277 return kSampleDependsOnUnknown; | 1278 return kSampleDependsOnUnknown; |
| 1278 | 1279 |
| 1279 return sample_depends_on_[i]; | 1280 return sample_depends_on_[i]; |
| 1280 } | 1281 } |
| 1281 | 1282 |
| 1282 } // namespace mp4 | 1283 } // namespace mp4 |
| 1283 } // namespace media | 1284 } // namespace media |
| OLD | NEW |