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

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

Issue 260963002: Support parsing of sgpd and sbgp boxes (Closed) Base URL: http://git.chromium.org/chromium/src.git@temp
Patch Set: Created 6 years, 7 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 // Returns the SampleDependsOn value for the |i|'th value 359 // Returns the SampleDependsOn value for the |i|'th value
360 // in the track. If no data was parsed for the |i|'th sample, 360 // in the track. If no data was parsed for the |i|'th sample,
361 // then |kSampleDependsOnUnknown| is returned. 361 // then |kSampleDependsOnUnknown| is returned.
362 SampleDependsOn sample_depends_on(size_t i) const; 362 SampleDependsOn sample_depends_on(size_t i) const;
363 363
364 private: 364 private:
365 std::vector<SampleDependsOn> sample_depends_on_; 365 std::vector<SampleDependsOn> sample_depends_on_;
366 }; 366 };
367 367
368 struct MEDIA_EXPORT CencSampleEncryptionInfoEntry {
369 CencSampleEncryptionInfoEntry();
370 ~CencSampleEncryptionInfoEntry();
371
372 bool is_encrypted;
373 uint8 iv_size;
374 std::vector<uint8> key_id;
375 };
376
377 struct MEDIA_EXPORT SampleGroupDescription : Box { // 'sgpd'.
378 DECLARE_BOX_METHODS(SampleGroupDescription);
379
380 uint32 grouping_type;
381 std::vector<CencSampleEncryptionInfoEntry> entries;
382 };
383
384 struct MEDIA_EXPORT SampleToGroupEntry {
385 enum GroupDescriptionIndexBase {
386 kTrackGroupDescriptionIndexBase = 0,
387 kFragmentGroupDescriptionIndexBase = 0x10000,
388 };
389
390 uint32 sample_count;
391 uint32 group_description_index;
392 };
393
394 struct MEDIA_EXPORT SampleToGroup : Box { // 'sbgp'.
395 DECLARE_BOX_METHODS(SampleToGroup);
396
397 uint32 grouping_type;
398 uint32 grouping_type_parameter; // Version 1 only.
399 std::vector<SampleToGroupEntry> entries;
400 };
401
368 struct MEDIA_EXPORT TrackFragment : Box { 402 struct MEDIA_EXPORT TrackFragment : Box {
369 DECLARE_BOX_METHODS(TrackFragment); 403 DECLARE_BOX_METHODS(TrackFragment);
370 404
371 TrackFragmentHeader header; 405 TrackFragmentHeader header;
372 std::vector<TrackFragmentRun> runs; 406 std::vector<TrackFragmentRun> runs;
373 TrackFragmentDecodeTime decode_time; 407 TrackFragmentDecodeTime decode_time;
374 SampleAuxiliaryInformationOffset auxiliary_offset; 408 SampleAuxiliaryInformationOffset auxiliary_offset;
375 SampleAuxiliaryInformationSize auxiliary_size; 409 SampleAuxiliaryInformationSize auxiliary_size;
376 IndependentAndDisposableSamples sdtp; 410 IndependentAndDisposableSamples sdtp;
411 SampleGroupDescription sample_group_description;
412 SampleToGroup sample_to_group;
377 }; 413 };
378 414
379 struct MEDIA_EXPORT MovieFragment : Box { 415 struct MEDIA_EXPORT MovieFragment : Box {
380 DECLARE_BOX_METHODS(MovieFragment); 416 DECLARE_BOX_METHODS(MovieFragment);
381 417
382 MovieFragmentHeader header; 418 MovieFragmentHeader header;
383 std::vector<TrackFragment> tracks; 419 std::vector<TrackFragment> tracks;
384 std::vector<ProtectionSystemSpecificHeader> pssh; 420 std::vector<ProtectionSystemSpecificHeader> pssh;
385 }; 421 };
386 422
387 #undef DECLARE_BOX 423 #undef DECLARE_BOX
388 424
389 } // namespace mp4 425 } // namespace mp4
390 } // namespace media 426 } // namespace media
391 427
392 #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_ 428 #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