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

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

Issue 1149023002: Combine 'pssh' parsing routines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: size_t Created 5 years, 6 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 | « media/cdm/cenc_utils_unittest.cc ('k') | 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 26 matching lines...) Expand all
37 bool Parse(BoxReader* reader) override; \ 37 bool Parse(BoxReader* reader) override; \
38 FourCC BoxType() const override; 38 FourCC BoxType() const override;
39 39
40 struct MEDIA_EXPORT FileType : Box { 40 struct MEDIA_EXPORT FileType : Box {
41 DECLARE_BOX_METHODS(FileType); 41 DECLARE_BOX_METHODS(FileType);
42 42
43 FourCC major_brand; 43 FourCC major_brand;
44 uint32 minor_version; 44 uint32 minor_version;
45 }; 45 };
46 46
47 // If only copying the 'pssh' boxes, use ProtectionSystemSpecificHeader.
48 // If access to the individual fields is needed, use
49 // FullProtectionSystemSpecificHeader.
47 struct MEDIA_EXPORT ProtectionSystemSpecificHeader : Box { 50 struct MEDIA_EXPORT ProtectionSystemSpecificHeader : Box {
48 DECLARE_BOX_METHODS(ProtectionSystemSpecificHeader); 51 DECLARE_BOX_METHODS(ProtectionSystemSpecificHeader);
49 52
53 std::vector<uint8> raw_box;
54 };
55
56 struct MEDIA_EXPORT FullProtectionSystemSpecificHeader : Box {
57 DECLARE_BOX_METHODS(FullProtectionSystemSpecificHeader);
58
50 std::vector<uint8> system_id; 59 std::vector<uint8> system_id;
51 std::vector<uint8> raw_box; 60 std::vector<std::vector<uint8>> key_ids;
61 std::vector<uint8> data;
52 }; 62 };
53 63
54 struct MEDIA_EXPORT SampleAuxiliaryInformationOffset : Box { 64 struct MEDIA_EXPORT SampleAuxiliaryInformationOffset : Box {
55 DECLARE_BOX_METHODS(SampleAuxiliaryInformationOffset); 65 DECLARE_BOX_METHODS(SampleAuxiliaryInformationOffset);
56 66
57 std::vector<uint64> offsets; 67 std::vector<uint64> offsets;
58 }; 68 };
59 69
60 struct MEDIA_EXPORT SampleAuxiliaryInformationSize : Box { 70 struct MEDIA_EXPORT SampleAuxiliaryInformationSize : Box {
61 DECLARE_BOX_METHODS(SampleAuxiliaryInformationSize); 71 DECLARE_BOX_METHODS(SampleAuxiliaryInformationSize);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 std::vector<TrackFragment> tracks; 439 std::vector<TrackFragment> tracks;
430 std::vector<ProtectionSystemSpecificHeader> pssh; 440 std::vector<ProtectionSystemSpecificHeader> pssh;
431 }; 441 };
432 442
433 #undef DECLARE_BOX 443 #undef DECLARE_BOX
434 444
435 } // namespace mp4 445 } // namespace mp4
436 } // namespace media 446 } // namespace media
437 447
438 #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_ 448 #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_
OLDNEW
« no previous file with comments | « media/cdm/cenc_utils_unittest.cc ('k') | media/formats/mp4/box_definitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698