00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVFORMAT_MATROSKA_H
00023 #define AVFORMAT_MATROSKA_H
00024
00025 #include "libavcodec/avcodec.h"
00026 #include "metadata.h"
00027
00028
00029 #define EBML_VERSION 1
00030
00031
00032 #define EBML_ID_HEADER 0x1A45DFA3
00033
00034
00035 #define EBML_ID_EBMLVERSION 0x4286
00036 #define EBML_ID_EBMLREADVERSION 0x42F7
00037 #define EBML_ID_EBMLMAXIDLENGTH 0x42F2
00038 #define EBML_ID_EBMLMAXSIZELENGTH 0x42F3
00039 #define EBML_ID_DOCTYPE 0x4282
00040 #define EBML_ID_DOCTYPEVERSION 0x4287
00041 #define EBML_ID_DOCTYPEREADVERSION 0x4285
00042
00043
00044 #define EBML_ID_VOID 0xEC
00045 #define EBML_ID_CRC32 0xBF
00046
00047
00048
00049
00050
00051
00052 #define MATROSKA_ID_SEGMENT 0x18538067
00053
00054
00055 #define MATROSKA_ID_INFO 0x1549A966
00056 #define MATROSKA_ID_TRACKS 0x1654AE6B
00057 #define MATROSKA_ID_CUES 0x1C53BB6B
00058 #define MATROSKA_ID_TAGS 0x1254C367
00059 #define MATROSKA_ID_SEEKHEAD 0x114D9B74
00060 #define MATROSKA_ID_ATTACHMENTS 0x1941A469
00061 #define MATROSKA_ID_CLUSTER 0x1F43B675
00062 #define MATROSKA_ID_CHAPTERS 0x1043A770
00063
00064
00065 #define MATROSKA_ID_TIMECODESCALE 0x2AD7B1
00066 #define MATROSKA_ID_DURATION 0x4489
00067 #define MATROSKA_ID_TITLE 0x7BA9
00068 #define MATROSKA_ID_WRITINGAPP 0x5741
00069 #define MATROSKA_ID_MUXINGAPP 0x4D80
00070 #define MATROSKA_ID_DATEUTC 0x4461
00071 #define MATROSKA_ID_SEGMENTUID 0x73A4
00072
00073
00074 #define MATROSKA_ID_TRACKENTRY 0xAE
00075
00076
00077 #define MATROSKA_ID_TRACKNUMBER 0xD7
00078 #define MATROSKA_ID_TRACKUID 0x73C5
00079 #define MATROSKA_ID_TRACKTYPE 0x83
00080 #define MATROSKA_ID_TRACKAUDIO 0xE1
00081 #define MATROSKA_ID_TRACKVIDEO 0xE0
00082 #define MATROSKA_ID_CODECID 0x86
00083 #define MATROSKA_ID_CODECPRIVATE 0x63A2
00084 #define MATROSKA_ID_CODECNAME 0x258688
00085 #define MATROSKA_ID_CODECINFOURL 0x3B4040
00086 #define MATROSKA_ID_CODECDOWNLOADURL 0x26B240
00087 #define MATROSKA_ID_CODECDECODEALL 0xAA
00088 #define MATROSKA_ID_TRACKNAME 0x536E
00089 #define MATROSKA_ID_TRACKLANGUAGE 0x22B59C
00090 #define MATROSKA_ID_TRACKFLAGENABLED 0xB9
00091 #define MATROSKA_ID_TRACKFLAGDEFAULT 0x88
00092 #define MATROSKA_ID_TRACKFLAGFORCED 0x55AA
00093 #define MATROSKA_ID_TRACKFLAGLACING 0x9C
00094 #define MATROSKA_ID_TRACKMINCACHE 0x6DE7
00095 #define MATROSKA_ID_TRACKMAXCACHE 0x6DF8
00096 #define MATROSKA_ID_TRACKDEFAULTDURATION 0x23E383
00097 #define MATROSKA_ID_TRACKCONTENTENCODINGS 0x6D80
00098 #define MATROSKA_ID_TRACKCONTENTENCODING 0x6240
00099 #define MATROSKA_ID_TRACKTIMECODESCALE 0x23314F
00100 #define MATROSKA_ID_TRACKMAXBLKADDID 0x55EE
00101
00102
00103 #define MATROSKA_ID_VIDEOFRAMERATE 0x2383E3
00104 #define MATROSKA_ID_VIDEODISPLAYWIDTH 0x54B0
00105 #define MATROSKA_ID_VIDEODISPLAYHEIGHT 0x54BA
00106 #define MATROSKA_ID_VIDEOPIXELWIDTH 0xB0
00107 #define MATROSKA_ID_VIDEOPIXELHEIGHT 0xBA
00108 #define MATROSKA_ID_VIDEOPIXELCROPB 0x54AA
00109 #define MATROSKA_ID_VIDEOPIXELCROPT 0x54BB
00110 #define MATROSKA_ID_VIDEOPIXELCROPL 0x54CC
00111 #define MATROSKA_ID_VIDEOPIXELCROPR 0x54DD
00112 #define MATROSKA_ID_VIDEODISPLAYUNIT 0x54B2
00113 #define MATROSKA_ID_VIDEOFLAGINTERLACED 0x9A
00114 #define MATROSKA_ID_VIDEOSTEREOMODE 0x53B9
00115 #define MATROSKA_ID_VIDEOASPECTRATIO 0x54B3
00116 #define MATROSKA_ID_VIDEOCOLORSPACE 0x2EB524
00117
00118
00119 #define MATROSKA_ID_AUDIOSAMPLINGFREQ 0xB5
00120 #define MATROSKA_ID_AUDIOOUTSAMPLINGFREQ 0x78B5
00121
00122 #define MATROSKA_ID_AUDIOBITDEPTH 0x6264
00123 #define MATROSKA_ID_AUDIOCHANNELS 0x9F
00124
00125
00126 #define MATROSKA_ID_ENCODINGORDER 0x5031
00127 #define MATROSKA_ID_ENCODINGSCOPE 0x5032
00128 #define MATROSKA_ID_ENCODINGTYPE 0x5033
00129 #define MATROSKA_ID_ENCODINGCOMPRESSION 0x5034
00130 #define MATROSKA_ID_ENCODINGCOMPALGO 0x4254
00131 #define MATROSKA_ID_ENCODINGCOMPSETTINGS 0x4255
00132
00133
00134 #define MATROSKA_ID_POINTENTRY 0xBB
00135
00136
00137 #define MATROSKA_ID_CUETIME 0xB3
00138 #define MATROSKA_ID_CUETRACKPOSITION 0xB7
00139
00140
00141 #define MATROSKA_ID_CUETRACK 0xF7
00142 #define MATROSKA_ID_CUECLUSTERPOSITION 0xF1
00143 #define MATROSKA_ID_CUEBLOCKNUMBER 0x5378
00144
00145
00146 #define MATROSKA_ID_TAG 0x7373
00147 #define MATROSKA_ID_SIMPLETAG 0x67C8
00148 #define MATROSKA_ID_TAGNAME 0x45A3
00149 #define MATROSKA_ID_TAGSTRING 0x4487
00150 #define MATROSKA_ID_TAGLANG 0x447A
00151 #define MATROSKA_ID_TAGDEFAULT 0x44B4
00152 #define MATROSKA_ID_TAGTARGETS 0x63C0
00153 #define MATROSKA_ID_TAGTARGETS_TYPE 0x63CA
00154 #define MATROSKA_ID_TAGTARGETS_TYPEVALUE 0x68CA
00155 #define MATROSKA_ID_TAGTARGETS_TRACKUID 0x63C5
00156 #define MATROSKA_ID_TAGTARGETS_CHAPTERUID 0x63C4
00157 #define MATROSKA_ID_TAGTARGETS_ATTACHUID 0x63C6
00158
00159
00160 #define MATROSKA_ID_SEEKENTRY 0x4DBB
00161
00162
00163 #define MATROSKA_ID_SEEKID 0x53AB
00164 #define MATROSKA_ID_SEEKPOSITION 0x53AC
00165
00166
00167 #define MATROSKA_ID_CLUSTERTIMECODE 0xE7
00168 #define MATROSKA_ID_CLUSTERPOSITION 0xA7
00169 #define MATROSKA_ID_CLUSTERPREVSIZE 0xAB
00170 #define MATROSKA_ID_BLOCKGROUP 0xA0
00171 #define MATROSKA_ID_SIMPLEBLOCK 0xA3
00172
00173
00174 #define MATROSKA_ID_BLOCK 0xA1
00175 #define MATROSKA_ID_BLOCKDURATION 0x9B
00176 #define MATROSKA_ID_BLOCKREFERENCE 0xFB
00177
00178
00179 #define MATROSKA_ID_ATTACHEDFILE 0x61A7
00180 #define MATROSKA_ID_FILEDESC 0x467E
00181 #define MATROSKA_ID_FILENAME 0x466E
00182 #define MATROSKA_ID_FILEMIMETYPE 0x4660
00183 #define MATROSKA_ID_FILEDATA 0x465C
00184 #define MATROSKA_ID_FILEUID 0x46AE
00185
00186
00187 #define MATROSKA_ID_EDITIONENTRY 0x45B9
00188 #define MATROSKA_ID_CHAPTERATOM 0xB6
00189 #define MATROSKA_ID_CHAPTERTIMESTART 0x91
00190 #define MATROSKA_ID_CHAPTERTIMEEND 0x92
00191 #define MATROSKA_ID_CHAPTERDISPLAY 0x80
00192 #define MATROSKA_ID_CHAPSTRING 0x85
00193 #define MATROSKA_ID_CHAPLANG 0x437C
00194 #define MATROSKA_ID_EDITIONUID 0x45BC
00195 #define MATROSKA_ID_EDITIONFLAGHIDDEN 0x45BD
00196 #define MATROSKA_ID_EDITIONFLAGDEFAULT 0x45DB
00197 #define MATROSKA_ID_EDITIONFLAGORDERED 0x45DD
00198 #define MATROSKA_ID_CHAPTERUID 0x73C4
00199 #define MATROSKA_ID_CHAPTERFLAGHIDDEN 0x98
00200 #define MATROSKA_ID_CHAPTERFLAGENABLED 0x4598
00201 #define MATROSKA_ID_CHAPTERPHYSEQUIV 0x63C3
00202
00203 typedef enum {
00204 MATROSKA_TRACK_TYPE_NONE = 0x0,
00205 MATROSKA_TRACK_TYPE_VIDEO = 0x1,
00206 MATROSKA_TRACK_TYPE_AUDIO = 0x2,
00207 MATROSKA_TRACK_TYPE_COMPLEX = 0x3,
00208 MATROSKA_TRACK_TYPE_LOGO = 0x10,
00209 MATROSKA_TRACK_TYPE_SUBTITLE = 0x11,
00210 MATROSKA_TRACK_TYPE_CONTROL = 0x20,
00211 } MatroskaTrackType;
00212
00213 typedef enum {
00214 MATROSKA_TRACK_ENCODING_COMP_ZLIB = 0,
00215 MATROSKA_TRACK_ENCODING_COMP_BZLIB = 1,
00216 MATROSKA_TRACK_ENCODING_COMP_LZO = 2,
00217 MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP = 3,
00218 } MatroskaTrackEncodingCompAlgo;
00219
00220
00221
00222
00223
00224 typedef struct CodecTags{
00225 char str[20];
00226 enum CodecID id;
00227 }CodecTags;
00228
00229 typedef struct CodecMime{
00230 char str[32];
00231 enum CodecID id;
00232 }CodecMime;
00233
00234
00235 #define EBML_MAX_DEPTH 16
00236
00237 extern const CodecTags ff_mkv_codec_tags[];
00238 extern const CodecMime ff_mkv_mime_tags[];
00239 extern const AVMetadataConv ff_mkv_metadata_conv[];
00240
00241 #endif