| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 {UINT, kWebMIdSilentTrackNumber}, | 111 {UINT, kWebMIdSilentTrackNumber}, |
| 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 {UINT, kWebMIdDiscardPadding}, |
| 121 {LIST, kWebMIdSlices}, | 122 {LIST, kWebMIdSlices}, |
| 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}, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 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}, |
| 163 {UINT, kWebMIdAttachmentLink}, | 164 {UINT, kWebMIdAttachmentLink}, |
| 164 {UINT, kWebMIdCodecDecodeAll}, | 165 {UINT, kWebMIdCodecDecodeAll}, |
| 165 {UINT, kWebMIdTrackOverlay}, | 166 {UINT, kWebMIdTrackOverlay}, |
| 167 {UINT, kWebMIdCodecDelay}, |
| 168 {UINT, kWebMIdSeekPreRoll}, |
| 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 |
| 173 static const ElementIdInfo kTrackTranslateIds[] = { | 176 static const ElementIdInfo kTrackTranslateIds[] = { |
| 174 {UINT, kWebMIdTrackTranslateEditionUID}, | 177 {UINT, kWebMIdTrackTranslateEditionUID}, |
| 175 {UINT, kWebMIdTrackTranslateCodec}, | 178 {UINT, kWebMIdTrackTranslateCodec}, |
| (...skipping 758 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 |