Statistics
| Branch: | Revision:

ffmpeg / libavformat / matroska.h @ 470bce2b

History | View | Annotate | Download (7.59 KB)

1 b061d892 David Conrad
/*
2
 * Matroska constants
3
 * Copyright (c) 2003-2004 The ffmpeg Project
4
 *
5
 * This file is part of FFmpeg.
6
 *
7
 * FFmpeg is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU Lesser General Public
9
 * License as published by the Free Software Foundation; either
10
 * version 2.1 of the License, or (at your option) any later version.
11
 *
12
 * FFmpeg is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 * Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with FFmpeg; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
 */
21
22 98790382 Stefano Sabatini
#ifndef AVFORMAT_MATROSKA_H
23
#define AVFORMAT_MATROSKA_H
24 b061d892 David Conrad
25 245976da Diego Biurrun
#include "libavcodec/avcodec.h"
26 b061d892 David Conrad
27
/* EBML version supported */
28
#define EBML_VERSION 1
29
30
/* top-level master-IDs */
31
#define EBML_ID_HEADER             0x1A45DFA3
32
33
/* IDs in the HEADER master */
34
#define EBML_ID_EBMLVERSION        0x4286
35
#define EBML_ID_EBMLREADVERSION    0x42F7
36
#define EBML_ID_EBMLMAXIDLENGTH    0x42F2
37
#define EBML_ID_EBMLMAXSIZELENGTH  0x42F3
38
#define EBML_ID_DOCTYPE            0x4282
39
#define EBML_ID_DOCTYPEVERSION     0x4287
40
#define EBML_ID_DOCTYPEREADVERSION 0x4285
41
42
/* general EBML types */
43
#define EBML_ID_VOID               0xEC
44 5df3cc6f Aurelien Jacobs
#define EBML_ID_CRC32              0xBF
45 b061d892 David Conrad
46
/*
47 95aad5d1 Diego Biurrun
 * Matroska element IDs, max. 32 bits
48 b061d892 David Conrad
 */
49
50
/* toplevel segment */
51
#define MATROSKA_ID_SEGMENT    0x18538067
52
53 5968d2dd Diego Biurrun
/* Matroska top-level master IDs */
54 b061d892 David Conrad
#define MATROSKA_ID_INFO       0x1549A966
55
#define MATROSKA_ID_TRACKS     0x1654AE6B
56
#define MATROSKA_ID_CUES       0x1C53BB6B
57
#define MATROSKA_ID_TAGS       0x1254C367
58
#define MATROSKA_ID_SEEKHEAD   0x114D9B74
59 f8d7c9d3 Evgeniy Stepanov
#define MATROSKA_ID_ATTACHMENTS 0x1941A469
60 b061d892 David Conrad
#define MATROSKA_ID_CLUSTER    0x1F43B675
61 f5275b3c Anton Khirnov
#define MATROSKA_ID_CHAPTERS   0x1043A770
62 b061d892 David Conrad
63
/* IDs in the info master */
64
#define MATROSKA_ID_TIMECODESCALE 0x2AD7B1
65
#define MATROSKA_ID_DURATION   0x4489
66
#define MATROSKA_ID_TITLE      0x7BA9
67
#define MATROSKA_ID_WRITINGAPP 0x5741
68
#define MATROSKA_ID_MUXINGAPP  0x4D80
69
#define MATROSKA_ID_DATEUTC    0x4461
70 bd35bdf1 David Conrad
#define MATROSKA_ID_SEGMENTUID 0x73A4
71 b061d892 David Conrad
72
/* ID in the tracks master */
73
#define MATROSKA_ID_TRACKENTRY 0xAE
74
75
/* IDs in the trackentry master */
76
#define MATROSKA_ID_TRACKNUMBER 0xD7
77
#define MATROSKA_ID_TRACKUID   0x73C5
78
#define MATROSKA_ID_TRACKTYPE  0x83
79
#define MATROSKA_ID_TRACKAUDIO 0xE1
80
#define MATROSKA_ID_TRACKVIDEO 0xE0
81
#define MATROSKA_ID_CODECID    0x86
82
#define MATROSKA_ID_CODECPRIVATE 0x63A2
83
#define MATROSKA_ID_CODECNAME  0x258688
84
#define MATROSKA_ID_CODECINFOURL 0x3B4040
85
#define MATROSKA_ID_CODECDOWNLOADURL 0x26B240
86 cdae8eec Anton Khirnov
#define MATROSKA_ID_CODECDECODEALL 0xAA
87 b061d892 David Conrad
#define MATROSKA_ID_TRACKNAME  0x536E
88
#define MATROSKA_ID_TRACKLANGUAGE 0x22B59C
89
#define MATROSKA_ID_TRACKFLAGENABLED 0xB9
90
#define MATROSKA_ID_TRACKFLAGDEFAULT 0x88
91 cdae8eec Anton Khirnov
#define MATROSKA_ID_TRACKFLAGFORCED 0x55AA
92 b061d892 David Conrad
#define MATROSKA_ID_TRACKFLAGLACING 0x9C
93
#define MATROSKA_ID_TRACKMINCACHE 0x6DE7
94
#define MATROSKA_ID_TRACKMAXCACHE 0x6DF8
95
#define MATROSKA_ID_TRACKDEFAULTDURATION 0x23E383
96 53a1e82b Aurelien Jacobs
#define MATROSKA_ID_TRACKCONTENTENCODINGS 0x6D80
97
#define MATROSKA_ID_TRACKCONTENTENCODING 0x6240
98 7ff97085 Anton Khirnov
#define MATROSKA_ID_TRACKTIMECODESCALE 0x23314F
99 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_TRACKMAXBLKADDID 0x55EE
100 b061d892 David Conrad
101
/* IDs in the trackvideo master */
102
#define MATROSKA_ID_VIDEOFRAMERATE 0x2383E3
103
#define MATROSKA_ID_VIDEODISPLAYWIDTH 0x54B0
104
#define MATROSKA_ID_VIDEODISPLAYHEIGHT 0x54BA
105
#define MATROSKA_ID_VIDEOPIXELWIDTH 0xB0
106
#define MATROSKA_ID_VIDEOPIXELHEIGHT 0xBA
107 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_VIDEOPIXELCROPB 0x54AA
108
#define MATROSKA_ID_VIDEOPIXELCROPT 0x54BB
109
#define MATROSKA_ID_VIDEOPIXELCROPL 0x54CC
110
#define MATROSKA_ID_VIDEOPIXELCROPR 0x54DD
111
#define MATROSKA_ID_VIDEODISPLAYUNIT 0x54B2
112 b061d892 David Conrad
#define MATROSKA_ID_VIDEOFLAGINTERLACED 0x9A
113
#define MATROSKA_ID_VIDEOSTEREOMODE 0x53B9
114
#define MATROSKA_ID_VIDEOASPECTRATIO 0x54B3
115 cedb83a6 Diego Biurrun
#define MATROSKA_ID_VIDEOCOLORSPACE 0x2EB524
116 b061d892 David Conrad
117
/* IDs in the trackaudio master */
118
#define MATROSKA_ID_AUDIOSAMPLINGFREQ 0xB5
119
#define MATROSKA_ID_AUDIOOUTSAMPLINGFREQ 0x78B5
120
121
#define MATROSKA_ID_AUDIOBITDEPTH 0x6264
122
#define MATROSKA_ID_AUDIOCHANNELS 0x9F
123
124 53a1e82b Aurelien Jacobs
/* IDs in the content encoding master */
125 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_ENCODINGORDER 0x5031
126 53a1e82b Aurelien Jacobs
#define MATROSKA_ID_ENCODINGSCOPE 0x5032
127
#define MATROSKA_ID_ENCODINGTYPE 0x5033
128
#define MATROSKA_ID_ENCODINGCOMPRESSION 0x5034
129
#define MATROSKA_ID_ENCODINGCOMPALGO 0x4254
130
#define MATROSKA_ID_ENCODINGCOMPSETTINGS 0x4255
131
132 b061d892 David Conrad
/* ID in the cues master */
133
#define MATROSKA_ID_POINTENTRY 0xBB
134
135
/* IDs in the pointentry master */
136
#define MATROSKA_ID_CUETIME    0xB3
137
#define MATROSKA_ID_CUETRACKPOSITION 0xB7
138
139
/* IDs in the cuetrackposition master */
140
#define MATROSKA_ID_CUETRACK   0xF7
141
#define MATROSKA_ID_CUECLUSTERPOSITION 0xF1
142 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_CUEBLOCKNUMBER 0x5378
143 b061d892 David Conrad
144
/* IDs in the tags master */
145 44015c56 Aurelien Jacobs
#define MATROSKA_ID_TAG                 0x7373
146
#define MATROSKA_ID_SIMPLETAG           0x67C8
147
#define MATROSKA_ID_TAGNAME             0x45A3
148
#define MATROSKA_ID_TAGSTRING           0x4487
149
#define MATROSKA_ID_TAGLANG             0x447A
150
#define MATROSKA_ID_TAGDEFAULT          0x44B4
151
#define MATROSKA_ID_TAGTARGETS          0x63C0
152 b061d892 David Conrad
153
/* IDs in the seekhead master */
154
#define MATROSKA_ID_SEEKENTRY  0x4DBB
155
156
/* IDs in the seekpoint master */
157
#define MATROSKA_ID_SEEKID     0x53AB
158
#define MATROSKA_ID_SEEKPOSITION 0x53AC
159
160
/* IDs in the cluster master */
161
#define MATROSKA_ID_CLUSTERTIMECODE 0xE7
162 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_CLUSTERPOSITION 0xA7
163
#define MATROSKA_ID_CLUSTERPREVSIZE 0xAB
164 b061d892 David Conrad
#define MATROSKA_ID_BLOCKGROUP 0xA0
165
#define MATROSKA_ID_SIMPLEBLOCK 0xA3
166
167
/* IDs in the blockgroup master */
168
#define MATROSKA_ID_BLOCK      0xA1
169
#define MATROSKA_ID_BLOCKDURATION 0x9B
170
#define MATROSKA_ID_BLOCKREFERENCE 0xFB
171
172 f8d7c9d3 Evgeniy Stepanov
/* IDs in the attachments master */
173
#define MATROSKA_ID_ATTACHEDFILE        0x61A7
174 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_FILEDESC            0x467E
175 f8d7c9d3 Evgeniy Stepanov
#define MATROSKA_ID_FILENAME            0x466E
176
#define MATROSKA_ID_FILEMIMETYPE        0x4660
177
#define MATROSKA_ID_FILEDATA            0x465C
178
#define MATROSKA_ID_FILEUID             0x46AE
179
180 f5275b3c Anton Khirnov
/* IDs in the chapters master */
181
#define MATROSKA_ID_EDITIONENTRY        0x45B9
182
#define MATROSKA_ID_CHAPTERATOM         0xB6
183
#define MATROSKA_ID_CHAPTERTIMESTART    0x91
184
#define MATROSKA_ID_CHAPTERTIMEEND      0x92
185
#define MATROSKA_ID_CHAPTERDISPLAY      0x80
186
#define MATROSKA_ID_CHAPSTRING          0x85
187 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_CHAPLANG            0x437C
188 f5275b3c Anton Khirnov
#define MATROSKA_ID_EDITIONUID          0x45BC
189
#define MATROSKA_ID_EDITIONFLAGHIDDEN   0x45BD
190 cdae8eec Anton Khirnov
#define MATROSKA_ID_EDITIONFLAGDEFAULT  0x45DB
191 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_EDITIONFLAGORDERED  0x45DD
192 f5275b3c Anton Khirnov
#define MATROSKA_ID_CHAPTERUID          0x73C4
193
#define MATROSKA_ID_CHAPTERFLAGHIDDEN   0x98
194 5df3cc6f Aurelien Jacobs
#define MATROSKA_ID_CHAPTERFLAGENABLED  0x4598
195
#define MATROSKA_ID_CHAPTERPHYSEQUIV    0x63C3
196 f5275b3c Anton Khirnov
197 b061d892 David Conrad
typedef enum {
198 e3227b3f Carl Eugen Hoyos
  MATROSKA_TRACK_TYPE_NONE     = 0x0,
199 b061d892 David Conrad
  MATROSKA_TRACK_TYPE_VIDEO    = 0x1,
200
  MATROSKA_TRACK_TYPE_AUDIO    = 0x2,
201
  MATROSKA_TRACK_TYPE_COMPLEX  = 0x3,
202
  MATROSKA_TRACK_TYPE_LOGO     = 0x10,
203
  MATROSKA_TRACK_TYPE_SUBTITLE = 0x11,
204
  MATROSKA_TRACK_TYPE_CONTROL  = 0x20,
205
} MatroskaTrackType;
206
207
typedef enum {
208 53a1e82b Aurelien Jacobs
  MATROSKA_TRACK_ENCODING_COMP_ZLIB        = 0,
209
  MATROSKA_TRACK_ENCODING_COMP_BZLIB       = 1,
210
  MATROSKA_TRACK_ENCODING_COMP_LZO         = 2,
211
  MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP = 3,
212
} MatroskaTrackEncodingCompAlgo;
213
214 b061d892 David Conrad
/*
215 5968d2dd Diego Biurrun
 * Matroska Codec IDs, strings
216 b061d892 David Conrad
 */
217
218
typedef struct CodecTags{
219 d3d265b2 Aurelien Jacobs
    char str[20];
220 b061d892 David Conrad
    enum CodecID id;
221
}CodecTags;
222
223 f8d7c9d3 Evgeniy Stepanov
typedef struct CodecMime{
224
    char str[32];
225
    enum CodecID id;
226
}CodecMime;
227
228 b061d892 David Conrad
/* max. depth in the EBML tree structure */
229
#define EBML_MAX_DEPTH 16
230
231 73a727f3 Reimar Döffinger
extern const CodecTags ff_mkv_codec_tags[];
232 f8d7c9d3 Evgeniy Stepanov
extern const CodecMime ff_mkv_mime_tags[];
233 b061d892 David Conrad
234 98790382 Stefano Sabatini
#endif /* AVFORMAT_MATROSKA_H */