Tawara  0.1.0
el_ids.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011, 2012, Geoffrey Biggs, geoffrey.biggs@aist.go.jp
5  * RT-Synthesis Research Group
6  * Intelligent Systems Research Institute,
7  * National Institute of Advanced Industrial Science and Technology (AIST),
8  * Japan
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  *
15  * * Redistributions of source code must retain the above copyright
16  * notice, this list of conditions and the following disclaimer.
17  * * Redistributions in binary form must reproduce the above
18  * copyright notice, this list of conditions and the following
19  * disclaimer in the documentation and/or other materials provided
20  * with the distribution.
21  * * Neither the name of Geoffrey Biggs nor AIST, nor the names of its
22  * contributors may be used to endorse or promote products derived
23  * from this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  * POSSIBILITY OF SUCH DAMAGE.
37  */
38 
39 #if !defined(TAWARA_EL_IDS_H_)
40 #define TAWARA_EL_IDS_H_
41 
42 #include <ios>
43 #include <stdint.h>
44 #include <vector>
45 
48 
49 namespace tawara
50 {
58  namespace ids
59  {
60  typedef uint32_t ID;
61 
62  const ID Null(0x80);
63 
64  const ID Void(0xEC);
65  const ID CRC32(0xBF);
66 
67  const ID EBML(0x1A45DFA3);
68  const ID EBMLVersion(0x4286);
69  const ID EBMLReadVersion(0x42F7);
70  const ID EBMLMaxIDLength(0x42F2);
71  const ID EBMLMaxSizeLength(0x42F3);
72  const ID DocType(0x4282);
73  const ID DocTypeVersion(0x4287);
74  const ID DocTypeReadVersion(0x4285);
75 
76  const ID Segment(0x18538067);
77 
78  const ID SeekHead(0x114D9B74);
79  const ID Seek(0x4DBB);
80  const ID SeekID(0x53AB);
81  const ID SeekPosition(0x53AC);
82 
83  const ID Info(0x1549A966);
84  const ID SegmentUID(0x73A4);
85  const ID SegmentFileName(0x7384);
86  const ID PrevUID(0x3CB923);
87  const ID PrevFileName(0x3C83AB);
88  const ID NextUID(0x3EB923);
89  const ID NextFileName(0x3E83AB);
90  const ID SegmentFamily(0x4444);
91  const ID TimecodeScale(0x2AD7B1);
92  const ID Duration(0x4489);
93  const ID DateUTC(0x4461);
94  const ID Title(0x7BA9);
95  const ID MuxingApp(0x4D80);
96  const ID WritingApp(0x5741);
97 
98  const ID Cluster(0x1F43B675);
99  const ID Timecode(0xE7);
100  const ID SilentTracks(0x5854);
101  const ID SilentTrackNumber(0x58D7);
102  const ID Position(0xA7);
103  const ID PrevSize(0xAB);
104  const ID SimpleBlock(0xA3);
105  const ID BlockGroup(0xA0);
106  const ID Block(0xA1);
107  const ID BlockAdditions(0x75A1);
108  const ID BlockMore(0xA6);
109  const ID BlockAddID(0xEE);
110  const ID BlockAdditional(0xA5);
111  const ID BlockDuration(0x9B);
112  const ID ReferencePriority(0xFA);
113  const ID ReferenceBlock(0xFB);
114  const ID CodecState(0xA4);
115 
116  const ID Tracks(0x1654AE6B);
117  const ID TrackEntry(0xAE);
118  const ID TrackNumber(0xD7);
119  const ID TrackUID(0x73C5);
120  const ID TrackType(0x83);
121  const ID FlagEnabled(0xB9);
122  const ID FlagDefault(0x88);
123  const ID FlagForced(0x55AA);
124  const ID FlagLacing(0x9C);
125  const ID MinCache(0x6DE7);
126  const ID MaxCache(0x6DF8);
127  const ID DefaultDuration(0x23E383);
128  const ID TrackTimecodeScale(0x23314F);
129  const ID MaxBlockAdditionID(0x55EE);
130  const ID Name(0x536E);
131  const ID CodecID(0x86);
132  const ID CodecPrivate(0x63A2);
133  const ID CodecName(0x258688);
134  const ID AttachmentLink(0x7446);
135  const ID CodecDecodeAll(0xAA);
136  const ID TrackOverlay(0x6F24);
137  const ID TrackOperation(0xE2);
138  const ID TrackJoinBlocks(0xE9);
139  const ID TrackJoinUID(0xED);
140 
141  const ID Cues(0x1C53BB6B);
142  const ID CuePoint(0xBB);
143  const ID CueTime(0xB3);
144  const ID CueTrackPosition(0xB7);
145  const ID CueTrack(0xF7);
146  const ID CueClusterPosition(0xF1);
147  const ID CueBlockNumber(0x5378);
148  const ID CueCodecState(0xEA);
149  const ID CueReference(0xDB);
150  const ID CueRefTime(0x96);
151 
152  const ID Attachments(0x1941A469);
153  const ID AttachedFile(0x61A7);
154  const ID FileDescription(0x467E);
155  const ID FileName(0x466E);
156  const ID FileMimeType(0x4660);
157  const ID FileData(0x465C);
158  const ID FileUID(0x46AE);
159 
160  const ID Chapters(0x1043A770);
161  const ID EditionEntry(0x45B9);
162  const ID EditionUID(0x45BC);
163  const ID EditionFlagHidden(0x45BD);
164  const ID EditionFlagDefault(0x45DB);
165  const ID EditionFlagOrdered(0x45DD);
166  const ID ChapterAtom(0xB6);
167  const ID ChapterUID(0x73C4);
168  const ID ChapterTimeStart(0x91);
169  const ID ChapterTimeEnd(0x92);
170  const ID ChapterFlagHidden(0x98);
171  const ID ChapterFlagEnabled(0x4598);
172  const ID ChapterSegmentUID(0x6E67);
173  const ID ChapterTrack(0x8F);
174  const ID ChapterTrackNumber(0x89);
175  const ID ChapterDisplay(0x80);
176  const ID ChapString(0x85);
177  const ID ChapLanguage(0x437C);
178  const ID ChapCountry(0x437E);
179 
180  const ID Tags(0x1254C367);
181  const ID Tag(0x7373);
182  const ID Targets(0x63C0);
183  const ID TagTrackUID(0x63C5);
184  const ID TagEditionUID(0x63C9);
185  const ID TagChapterUID(0x63C4);
186  const ID TagAttachmentUID(0x63C6);
187  const ID SimpleTag(0x67C8);
188  const ID TagName(0x45A3);
189  const ID TagLanguage(0x447A);
190  const ID TagDefault(0x4484);
191  const ID TagString(0x4487);
192  const ID TagBinary(0x4485);
193 
204  std::streamsize size(ID id);
205 
216  std::vector<char> encode(ID integer);
217 
222  typedef std::pair<uint64_t, std::vector<char>::const_iterator>
224 
238  DecodeResult decode(std::vector<char> const& buffer);
239 
251  std::streamsize write(ID id, std::ostream& output);
252 
256  typedef std::pair<ID, std::streamsize> ReadResult;
257 
270  ReadResult read(std::istream& input);
271  }; // namespace ids
272 }; // namespace tawara
273 
275 
276 #endif // TAWARA_EL_IDS_H_
277 
const ID SeekID(0x53AB)
const ID Block(0xA1)
const ID AttachmentLink(0x7446)
const ID TrackType(0x83)
const ID NextUID(0x3EB923)
std::streamsize write(ID id, std::ostream &output)
Write an ID to an output stream.
const ID Tracks(0x1654AE6B)
const ID TrackOperation(0xE2)
const ID TagName(0x45A3)
const ID ChapString(0x85)
const ID FileDescription(0x467E)
const ID TagEditionUID(0x63C9)
const ID CueTime(0xB3)
const ID CodecDecodeAll(0xAA)
const ID Targets(0x63C0)
const ID CodecPrivate(0x63A2)
const ID MinCache(0x6DE7)
const ID CueBlockNumber(0x5378)
const ID FlagForced(0x55AA)
std::streamsize size(ID id)
Get the number of bytes required by an ID.
const ID TrackEntry(0xAE)
const ID ReferenceBlock(0xFB)
const ID EditionFlagDefault(0x45DB)
const ID CodecID(0x86)
const ID CueReference(0xDB)
const ID TagDefault(0x4484)
const ID SilentTracks(0x5854)
const ID Void(0xEC)
const ID Seek(0x4DBB)
const ID SegmentFamily(0x4444)
const ID DocType(0x4282)
const ID PrevSize(0xAB)
const ID ChapterTimeEnd(0x92)
const ID EditionFlagOrdered(0x45DD)
const ID ChapterDisplay(0x80)
DecodeResult decode(std::vector< char > const &buffer)
Decode an ID from a buffer.
const ID TagBinary(0x4485)
const ID TagTrackUID(0x63C5)
const ID TagString(0x4487)
const ID ChapterTrackNumber(0x89)
const ID BlockMore(0xA6)
const ID FileUID(0x46AE)
ReadResult read(std::istream &input)
Read an ID from an input stream.
const ID CueCodecState(0xEA)
const ID TagChapterUID(0x63C4)
const ID PrevUID(0x3CB923)
const ID BlockAdditional(0xA5)
const ID ChapterFlagEnabled(0x4598)
const ID EBMLMaxSizeLength(0x42F3)
const ID CueTrackPosition(0xB7)
const ID DateUTC(0x4461)
const ID CuePoint(0xBB)
const ID BlockGroup(0xA0)
const ID SimpleBlock(0xA3)
const ID EBMLVersion(0x4286)
const ID CodecState(0xA4)
const ID MaxBlockAdditionID(0x55EE)
uint32_t ID
Definition: el_ids.h:60
const ID Timecode(0xE7)
const ID CodecName(0x258688)
const ID Tags(0x1254C367)
const ID EBML(0x1A45DFA3)
const ID TrackOverlay(0x6F24)
const ID Duration(0x4489)
const ID Null(0x80)
const ID TrackUID(0x73C5)
const ID ChapCountry(0x437E)
const ID FlagLacing(0x9C)
const ID Cues(0x1C53BB6B)
const ID Attachments(0x1941A469)
const ID EBMLMaxIDLength(0x42F2)
const ID TrackJoinUID(0xED)
const ID CRC32(0xBF)
const ID CueTrack(0xF7)
const ID BlockAddID(0xEE)
const ID CueRefTime(0x96)
const ID BlockDuration(0x9B)
const ID ChapterFlagHidden(0x98)
const ID EditionUID(0x45BC)
const ID ChapLanguage(0x437C)
const ID NextFileName(0x3E83AB)
const ID Chapters(0x1043A770)
const ID DocTypeVersion(0x4287)
const ID SegmentFileName(0x7384)
const ID SilentTrackNumber(0x58D7)
const ID TrackNumber(0xD7)
const ID FileData(0x465C)
const ID Name(0x536E)
const ID WritingApp(0x5741)
std::pair< uint64_t, std::vector< char >::const_iterator > DecodeResult
The result of a decode operation is a pair of the ID decoded and an iterator pointing to the first el...
Definition: el_ids.h:223
const ID TrackTimecodeScale(0x23314F)
const ID ReferencePriority(0xFA)
const ID ChapterSegmentUID(0x6E67)
const ID FileName(0x466E)
const ID Segment(0x18538067)
const ID MaxCache(0x6DF8)
const ID TrackJoinBlocks(0xE9)
const ID CueClusterPosition(0xF1)
const ID TagLanguage(0x447A)
const ID ChapterAtom(0xB6)
const ID TimecodeScale(0x2AD7B1)
const ID SeekPosition(0x53AC)
const ID Title(0x7BA9)
const ID FlagDefault(0x88)
const ID Tag(0x7373)
const ID SimpleTag(0x67C8)
const ID TagAttachmentUID(0x63C6)
const ID EditionFlagHidden(0x45BD)
const ID ChapterTrack(0x8F)
const ID SegmentUID(0x73A4)
const ID AttachedFile(0x61A7)
const ID EBMLReadVersion(0x42F7)
const ID BlockAdditions(0x75A1)
const ID Cluster(0x1F43B675)
const ID Position(0xA7)
const ID FlagEnabled(0xB9)
std::vector< char > encode(ID integer)
Encode an unsigned integer into a buffer.
const ID SeekHead(0x114D9B74)
const ID MuxingApp(0x4D80)
const ID EditionEntry(0x45B9)
const ID PrevFileName(0x3C83AB)
const ID Info(0x1549A966)
const ID DocTypeReadVersion(0x4285)
const ID DefaultDuration(0x23E383)
const ID FileMimeType(0x4660)
const ID ChapterTimeStart(0x91)
const ID ChapterUID(0x73C4)
std::pair< ID, std::streamsize > ReadResult
The result of a read operation is a pair of the ID read and the number of bytes read.
Definition: el_ids.h:256