| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MP4_BOX_DEFINITIONS_H_ | 5 #ifndef MEDIA_MP4_BOX_DEFINITIONS_H_ |
| 6 #define MEDIA_MP4_BOX_DEFINITIONS_H_ | 6 #define MEDIA_MP4_BOX_DEFINITIONS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
| 14 #include "media/mp4/aac.h" |
| 14 #include "media/mp4/avc.h" | 15 #include "media/mp4/avc.h" |
| 15 #include "media/mp4/box_reader.h" | 16 #include "media/mp4/box_reader.h" |
| 16 #include "media/mp4/fourccs.h" | 17 #include "media/mp4/fourccs.h" |
| 17 | 18 |
| 18 namespace media { | 19 namespace media { |
| 19 namespace mp4 { | 20 namespace mp4 { |
| 20 | 21 |
| 21 enum TrackType { | 22 enum TrackType { |
| 22 kInvalid = 0, | 23 kInvalid = 0, |
| 23 kVideo, | 24 kVideo, |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 uint16 width; | 178 uint16 width; |
| 178 uint16 height; | 179 uint16 height; |
| 179 | 180 |
| 180 PixelAspectRatioBox pixel_aspect; | 181 PixelAspectRatioBox pixel_aspect; |
| 181 ProtectionSchemeInfo sinf; | 182 ProtectionSchemeInfo sinf; |
| 182 | 183 |
| 183 // Currently expected to be present regardless of format. | 184 // Currently expected to be present regardless of format. |
| 184 AVCDecoderConfigurationRecord avcc; | 185 AVCDecoderConfigurationRecord avcc; |
| 185 }; | 186 }; |
| 186 | 187 |
| 188 struct ElementaryStreamDescriptor : Box { |
| 189 DECLARE_BOX_METHODS(ElementaryStreamDescriptor); |
| 190 |
| 191 uint8 object_type; |
| 192 AAC aac; |
| 193 }; |
| 194 |
| 187 struct AudioSampleEntry : Box { | 195 struct AudioSampleEntry : Box { |
| 188 DECLARE_BOX_METHODS(AudioSampleEntry); | 196 DECLARE_BOX_METHODS(AudioSampleEntry); |
| 189 | 197 |
| 190 FourCC format; | 198 FourCC format; |
| 191 uint16 data_reference_index; | 199 uint16 data_reference_index; |
| 192 uint16 channelcount; | 200 uint16 channelcount; |
| 193 uint16 samplesize; | 201 uint16 samplesize; |
| 194 uint32 samplerate; | 202 uint32 samplerate; |
| 195 | 203 |
| 196 ProtectionSchemeInfo sinf; | 204 ProtectionSchemeInfo sinf; |
| 205 ElementaryStreamDescriptor esds; |
| 197 }; | 206 }; |
| 198 | 207 |
| 199 struct SampleDescription : Box { | 208 struct SampleDescription : Box { |
| 200 DECLARE_BOX_METHODS(SampleDescription); | 209 DECLARE_BOX_METHODS(SampleDescription); |
| 201 | 210 |
| 202 TrackType type; | 211 TrackType type; |
| 203 std::vector<VideoSampleEntry> video_entries; | 212 std::vector<VideoSampleEntry> video_entries; |
| 204 std::vector<AudioSampleEntry> audio_entries; | 213 std::vector<AudioSampleEntry> audio_entries; |
| 205 }; | 214 }; |
| 206 | 215 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 std::vector<TrackFragment> tracks; | 338 std::vector<TrackFragment> tracks; |
| 330 std::vector<ProtectionSystemSpecificHeader> pssh; | 339 std::vector<ProtectionSystemSpecificHeader> pssh; |
| 331 }; | 340 }; |
| 332 | 341 |
| 333 #undef DECLARE_BOX | 342 #undef DECLARE_BOX |
| 334 | 343 |
| 335 } // namespace mp4 | 344 } // namespace mp4 |
| 336 } // namespace media | 345 } // namespace media |
| 337 | 346 |
| 338 #endif // MEDIA_MP4_BOX_DEFINITIONS_H_ | 347 #endif // MEDIA_MP4_BOX_DEFINITIONS_H_ |
| OLD | NEW |