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

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

Issue 264743016: Change H264AnnexBBitstreamConverter to use AVCDecoderConfigurationRecord. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address CR comments. 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
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 struct MEDIA_EXPORT HandlerReference : Box { 144 struct MEDIA_EXPORT HandlerReference : Box {
145 DECLARE_BOX_METHODS(HandlerReference); 145 DECLARE_BOX_METHODS(HandlerReference);
146 146
147 TrackType type; 147 TrackType type;
148 }; 148 };
149 149
150 struct MEDIA_EXPORT AVCDecoderConfigurationRecord : Box { 150 struct MEDIA_EXPORT AVCDecoderConfigurationRecord : Box {
151 DECLARE_BOX_METHODS(AVCDecoderConfigurationRecord); 151 DECLARE_BOX_METHODS(AVCDecoderConfigurationRecord);
152 152
153 // Parses AVCDecoderConfigurationRecord data encoded in |data|.
154 // Note: This method is intended to parse data outside the MP4StreamParser
155 // context and therefore the box header is not expected to be present
156 // in |data|.
157 // Returns true if |data| was successfully parsed.
158 bool Parse(const uint8* data, int data_size);
159
153 uint8 version; 160 uint8 version;
154 uint8 profile_indication; 161 uint8 profile_indication;
155 uint8 profile_compatibility; 162 uint8 profile_compatibility;
156 uint8 avc_level; 163 uint8 avc_level;
157 uint8 length_size; 164 uint8 length_size;
158 165
159 typedef std::vector<uint8> SPS; 166 typedef std::vector<uint8> SPS;
160 typedef std::vector<uint8> PPS; 167 typedef std::vector<uint8> PPS;
161 168
162 std::vector<SPS> sps_list; 169 std::vector<SPS> sps_list;
163 std::vector<PPS> pps_list; 170 std::vector<PPS> pps_list;
171
172 private:
173 bool ParseInternal(BufferReader* reader);
164 }; 174 };
165 175
166 struct MEDIA_EXPORT PixelAspectRatioBox : Box { 176 struct MEDIA_EXPORT PixelAspectRatioBox : Box {
167 DECLARE_BOX_METHODS(PixelAspectRatioBox); 177 DECLARE_BOX_METHODS(PixelAspectRatioBox);
168 178
169 uint32 h_spacing; 179 uint32 h_spacing;
170 uint32 v_spacing; 180 uint32 v_spacing;
171 }; 181 };
172 182
173 struct MEDIA_EXPORT VideoSampleEntry : Box { 183 struct MEDIA_EXPORT VideoSampleEntry : Box {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 std::vector<TrackFragment> tracks; 383 std::vector<TrackFragment> tracks;
374 std::vector<ProtectionSystemSpecificHeader> pssh; 384 std::vector<ProtectionSystemSpecificHeader> pssh;
375 }; 385 };
376 386
377 #undef DECLARE_BOX 387 #undef DECLARE_BOX
378 388
379 } // namespace mp4 389 } // namespace mp4
380 } // namespace media 390 } // namespace media
381 391
382 #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_ 392 #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_
OLDNEW
« no previous file with comments | « media/filters/h264_to_annex_b_bitstream_converter_unittest.cc ('k') | media/formats/mp4/box_definitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698