Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1223)

Side by Side Diff: media/formats/mp4/box_definitions.cc

Issue 2320043005: Read directly from 'senc' box when 'senc' box is present (Closed)
Patch Set: git cl format Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/test/data/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 } 1197 }
1198 return true; 1198 return true;
1199 } 1199 }
1200 1200
1201 TrackFragment::TrackFragment() {} 1201 TrackFragment::TrackFragment() {}
1202 TrackFragment::TrackFragment(const TrackFragment& other) = default; 1202 TrackFragment::TrackFragment(const TrackFragment& other) = default;
1203 TrackFragment::~TrackFragment() {} 1203 TrackFragment::~TrackFragment() {}
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() && reader->ReadChild(&header) &&
1208 reader->ReadChild(&header) &&
1209 // Media Source specific: 'tfdt' required 1208 // Media Source specific: 'tfdt' required
1210 reader->ReadChild(&decode_time) && 1209 reader->ReadChild(&decode_time) && reader->MaybeReadChildren(&runs) &&
1211 reader->MaybeReadChildren(&runs) &&
1212 reader->MaybeReadChild(&auxiliary_offset) && 1210 reader->MaybeReadChild(&auxiliary_offset) &&
1213 reader->MaybeReadChild(&auxiliary_size) && 1211 reader->MaybeReadChild(&auxiliary_size) &&
1214 reader->MaybeReadChild(&sdtp)); 1212 reader->MaybeReadChild(&sdtp) &&
1213 reader->MaybeReadChild(&sample_encryption));
1215 1214
1216 // There could be multiple SampleGroupDescription and SampleToGroup boxes with 1215 // There could be multiple SampleGroupDescription and SampleToGroup boxes with
1217 // different grouping types. For common encryption, the relevant grouping type 1216 // different grouping types. For common encryption, the relevant grouping type
1218 // is 'seig'. Continue reading until 'seig' is found, or until running out of 1217 // is 'seig'. Continue reading until 'seig' is found, or until running out of
1219 // child boxes. 1218 // child boxes.
1220 while (reader->HasChild(&sample_group_description)) { 1219 while (reader->HasChild(&sample_group_description)) {
1221 RCHECK(reader->ReadChild(&sample_group_description)); 1220 RCHECK(reader->ReadChild(&sample_group_description));
1222 if (sample_group_description.grouping_type == FOURCC_SEIG) 1221 if (sample_group_description.grouping_type == FOURCC_SEIG)
1223 break; 1222 break;
1224 sample_group_description.entries.clear(); 1223 sample_group_description.entries.clear();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( 1273 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on(
1275 size_t i) const { 1274 size_t i) const {
1276 if (i >= sample_depends_on_.size()) 1275 if (i >= sample_depends_on_.size())
1277 return kSampleDependsOnUnknown; 1276 return kSampleDependsOnUnknown;
1278 1277
1279 return sample_depends_on_[i]; 1278 return sample_depends_on_[i];
1280 } 1279 }
1281 1280
1282 } // namespace mp4 1281 } // namespace mp4
1283 } // namespace media 1282 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/test/data/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698