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 #include "media/webm/webm_parser.h" | 5 #include "media/webm/webm_parser.h" |
6 | 6 |
7 // This file contains code to parse WebM file elements. It was created | 7 // This file contains code to parse WebM file elements. It was created |
8 // from information in the Matroska spec. | 8 // from information in the Matroska spec. |
9 // http://www.matroska.org/technical/specs/index.html | 9 // http://www.matroska.org/technical/specs/index.html |
10 // This file contains code for encrypted WebM. Current WebM | 10 // This file contains code for encrypted WebM. Current WebM |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 }; | 112 }; |
113 | 113 |
114 static const ElementIdInfo kBlockGroupIds[] = { | 114 static const ElementIdInfo kBlockGroupIds[] = { |
115 {BINARY, kWebMIdBlock}, | 115 {BINARY, kWebMIdBlock}, |
116 {LIST, kWebMIdBlockAdditions}, | 116 {LIST, kWebMIdBlockAdditions}, |
117 {UINT, kWebMIdBlockDuration}, | 117 {UINT, kWebMIdBlockDuration}, |
118 {UINT, kWebMIdReferencePriority}, | 118 {UINT, kWebMIdReferencePriority}, |
119 {BINARY, kWebMIdReferenceBlock}, | 119 {BINARY, kWebMIdReferenceBlock}, |
120 {BINARY, kWebMIdCodecState}, | 120 {BINARY, kWebMIdCodecState}, |
121 {LIST, kWebMIdSlices}, | 121 {LIST, kWebMIdSlices}, |
122 {UINT, kWebMIdDiscardPadding}, | |
fgalligan1
2013/08/26 21:10:06
DiscardPadding should come after CodecState.
vignesh
2013/08/26 21:44:23
Done.
| |
122 }; | 123 }; |
123 | 124 |
124 static const ElementIdInfo kBlockAdditionsIds[] = { | 125 static const ElementIdInfo kBlockAdditionsIds[] = { |
125 {LIST, kWebMIdBlockMore}, | 126 {LIST, kWebMIdBlockMore}, |
126 }; | 127 }; |
127 | 128 |
128 static const ElementIdInfo kBlockMoreIds[] = { | 129 static const ElementIdInfo kBlockMoreIds[] = { |
129 {UINT, kWebMIdBlockAddID}, | 130 {UINT, kWebMIdBlockAddID}, |
130 {BINARY, kWebMIdBlockAdditional}, | 131 {BINARY, kWebMIdBlockAdditional}, |
131 }; | 132 }; |
(...skipping 21 matching lines...) Expand all Loading... | |
153 {UINT, kWebMIdMinCache}, | 154 {UINT, kWebMIdMinCache}, |
154 {UINT, kWebMIdMaxCache}, | 155 {UINT, kWebMIdMaxCache}, |
155 {UINT, kWebMIdDefaultDuration}, | 156 {UINT, kWebMIdDefaultDuration}, |
156 {FLOAT, kWebMIdTrackTimecodeScale}, | 157 {FLOAT, kWebMIdTrackTimecodeScale}, |
157 {UINT, kWebMIdMaxBlockAdditionId}, | 158 {UINT, kWebMIdMaxBlockAdditionId}, |
158 {STRING, kWebMIdName}, | 159 {STRING, kWebMIdName}, |
159 {STRING, kWebMIdLanguage}, | 160 {STRING, kWebMIdLanguage}, |
160 {STRING, kWebMIdCodecID}, | 161 {STRING, kWebMIdCodecID}, |
161 {BINARY, kWebMIdCodecPrivate}, | 162 {BINARY, kWebMIdCodecPrivate}, |
162 {STRING, kWebMIdCodecName}, | 163 {STRING, kWebMIdCodecName}, |
164 {UINT, kWebMIdSeekPreRoll}, | |
fgalligan1
2013/08/26 21:10:06
These should be switched according to the spec lay
vignesh
2013/08/26 21:44:23
Done.
| |
165 {UINT, kWebMIdCodecDelay}, | |
163 {UINT, kWebMIdAttachmentLink}, | 166 {UINT, kWebMIdAttachmentLink}, |
164 {UINT, kWebMIdCodecDecodeAll}, | 167 {UINT, kWebMIdCodecDecodeAll}, |
165 {UINT, kWebMIdTrackOverlay}, | 168 {UINT, kWebMIdTrackOverlay}, |
166 {LIST, kWebMIdTrackTranslate}, | 169 {LIST, kWebMIdTrackTranslate}, |
167 {LIST, kWebMIdVideo}, | 170 {LIST, kWebMIdVideo}, |
168 {LIST, kWebMIdAudio}, | 171 {LIST, kWebMIdAudio}, |
169 {LIST, kWebMIdTrackOperation}, | 172 {LIST, kWebMIdTrackOperation}, |
170 {LIST, kWebMIdContentEncodings}, | 173 {LIST, kWebMIdContentEncodings}, |
171 }; | 174 }; |
172 | 175 |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
934 if (kSegmentIds[i].id_ == id_b) | 937 if (kSegmentIds[i].id_ == id_b) |
935 return true; | 938 return true; |
936 } | 939 } |
937 } | 940 } |
938 | 941 |
939 // kWebMIdSegment siblings. | 942 // kWebMIdSegment siblings. |
940 return ((id_b == kWebMIdSegment) || (id_b == kWebMIdEBMLHeader)); | 943 return ((id_b == kWebMIdSegment) || (id_b == kWebMIdEBMLHeader)); |
941 } | 944 } |
942 | 945 |
943 } // namespace media | 946 } // namespace media |
OLD | NEW |