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

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

Issue 1319813002: Fix mp4 keyframe parsing, removing unused stss parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix sizeof nit Created 5 years, 3 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/formats/mp4/box_definitions.cc » ('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 #ifndef MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_ 5 #ifndef MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_
6 #define MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_ 6 #define MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 }; 233 };
234 234
235 struct MEDIA_EXPORT SampleDescription : Box { 235 struct MEDIA_EXPORT SampleDescription : Box {
236 DECLARE_BOX_METHODS(SampleDescription); 236 DECLARE_BOX_METHODS(SampleDescription);
237 237
238 TrackType type; 238 TrackType type;
239 std::vector<VideoSampleEntry> video_entries; 239 std::vector<VideoSampleEntry> video_entries;
240 std::vector<AudioSampleEntry> audio_entries; 240 std::vector<AudioSampleEntry> audio_entries;
241 }; 241 };
242 242
243 struct MEDIA_EXPORT SyncSample : Box {
244 DECLARE_BOX_METHODS(SyncSample);
245
246 // Returns true if the |k|th sample is a sync sample (aka a random
247 // access point). Returns false if sample |k| is not a sync sample.
248 bool IsSyncSample(size_t k) const;
249
250 bool is_present;
251 std::vector<uint32> entries;
252 };
253
254 struct MEDIA_EXPORT CencSampleEncryptionInfoEntry { 243 struct MEDIA_EXPORT CencSampleEncryptionInfoEntry {
255 CencSampleEncryptionInfoEntry(); 244 CencSampleEncryptionInfoEntry();
256 ~CencSampleEncryptionInfoEntry(); 245 ~CencSampleEncryptionInfoEntry();
257 246
258 bool is_encrypted; 247 bool is_encrypted;
259 uint8 iv_size; 248 uint8 iv_size;
260 std::vector<uint8> key_id; 249 std::vector<uint8> key_id;
261 }; 250 };
262 251
263 struct MEDIA_EXPORT SampleGroupDescription : Box { // 'sgpd'. 252 struct MEDIA_EXPORT SampleGroupDescription : Box { // 'sgpd'.
264 DECLARE_BOX_METHODS(SampleGroupDescription); 253 DECLARE_BOX_METHODS(SampleGroupDescription);
265 254
266 uint32 grouping_type; 255 uint32 grouping_type;
267 std::vector<CencSampleEncryptionInfoEntry> entries; 256 std::vector<CencSampleEncryptionInfoEntry> entries;
268 }; 257 };
269 258
270 struct MEDIA_EXPORT SampleTable : Box { 259 struct MEDIA_EXPORT SampleTable : Box {
271 DECLARE_BOX_METHODS(SampleTable); 260 DECLARE_BOX_METHODS(SampleTable);
272 261
273 // Media Source specific: we ignore many of the sub-boxes in this box, 262 // Media Source specific: we ignore many of the sub-boxes in this box,
274 // including some that are required to be present in the BMFF spec. This 263 // including some that are required to be present in the BMFF spec. This
275 // includes the 'stts', 'stsc', and 'stco' boxes, which must contain no 264 // includes the 'stts', 'stsc', and 'stco' boxes, which must contain no
276 // samples in order to be compliant files. 265 // samples in order to be compliant files.
277 SampleDescription description; 266 SampleDescription description;
278 SyncSample sync_sample;
279 SampleGroupDescription sample_group_description; 267 SampleGroupDescription sample_group_description;
280 }; 268 };
281 269
282 struct MEDIA_EXPORT MediaHeader : Box { 270 struct MEDIA_EXPORT MediaHeader : Box {
283 DECLARE_BOX_METHODS(MediaHeader); 271 DECLARE_BOX_METHODS(MediaHeader);
284 272
285 uint64 creation_time; 273 uint64 creation_time;
286 uint64 modification_time; 274 uint64 modification_time;
287 uint32 timescale; 275 uint32 timescale;
288 uint64 duration; 276 uint64 duration;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 std::vector<TrackFragment> tracks; 428 std::vector<TrackFragment> tracks;
441 std::vector<ProtectionSystemSpecificHeader> pssh; 429 std::vector<ProtectionSystemSpecificHeader> pssh;
442 }; 430 };
443 431
444 #undef DECLARE_BOX 432 #undef DECLARE_BOX
445 433
446 } // namespace mp4 434 } // namespace mp4
447 } // namespace media 435 } // namespace media
448 436
449 #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_ 437 #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_
OLDNEW
« no previous file with comments | « no previous file | media/formats/mp4/box_definitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698