yuv4mpeg: split the demuxer and muxer into separate files
[ffmpeg.git] / libavformat / matroska.c
1 /*
2  * Matroska common data
3  * Copyright (c) 2003-2004 The ffmpeg Project
4  *
5  * This file is part of Libav.
6  *
7  * Libav 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  * Libav 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 Libav; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21
22 #include "matroska.h"
23
24 const CodecTags ff_mkv_codec_tags[]={
25     {"A_AAC"            , AV_CODEC_ID_AAC},
26     {"A_AC3"            , AV_CODEC_ID_AC3},
27     {"A_ALAC"           , AV_CODEC_ID_ALAC},
28     {"A_DTS"            , AV_CODEC_ID_DTS},
29     {"A_EAC3"           , AV_CODEC_ID_EAC3},
30     {"A_FLAC"           , AV_CODEC_ID_FLAC},
31     {"A_MLP"            , AV_CODEC_ID_MLP},
32     {"A_MPEG/L2"        , AV_CODEC_ID_MP2},
33     {"A_MPEG/L1"        , AV_CODEC_ID_MP2},
34     {"A_MPEG/L3"        , AV_CODEC_ID_MP3},
35     {"A_OPUS"           , AV_CODEC_ID_OPUS},
36     {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F32LE},
37     {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F64LE},
38     {"A_PCM/INT/BIG"    , AV_CODEC_ID_PCM_S16BE},
39     {"A_PCM/INT/BIG"    , AV_CODEC_ID_PCM_S24BE},
40     {"A_PCM/INT/BIG"    , AV_CODEC_ID_PCM_S32BE},
41     {"A_PCM/INT/LIT"    , AV_CODEC_ID_PCM_S16LE},
42     {"A_PCM/INT/LIT"    , AV_CODEC_ID_PCM_S24LE},
43     {"A_PCM/INT/LIT"    , AV_CODEC_ID_PCM_S32LE},
44     {"A_PCM/INT/LIT"    , AV_CODEC_ID_PCM_U8},
45     {"A_QUICKTIME/QDM2" , AV_CODEC_ID_QDM2},
46     {"A_REAL/14_4"      , AV_CODEC_ID_RA_144},
47     {"A_REAL/28_8"      , AV_CODEC_ID_RA_288},
48     {"A_REAL/ATRC"      , AV_CODEC_ID_ATRAC3},
49     {"A_REAL/COOK"      , AV_CODEC_ID_COOK},
50     {"A_REAL/SIPR"      , AV_CODEC_ID_SIPR},
51     {"A_TRUEHD"         , AV_CODEC_ID_TRUEHD},
52     {"A_TTA1"           , AV_CODEC_ID_TTA},
53     {"A_VORBIS"         , AV_CODEC_ID_VORBIS},
54     {"A_WAVPACK4"       , AV_CODEC_ID_WAVPACK},
55
56     {"S_TEXT/UTF8"      , AV_CODEC_ID_TEXT},
57     {"S_TEXT/UTF8"      , AV_CODEC_ID_SRT},
58     {"S_TEXT/ASCII"     , AV_CODEC_ID_TEXT},
59     {"S_TEXT/ASS"       , AV_CODEC_ID_SSA},
60     {"S_TEXT/SSA"       , AV_CODEC_ID_SSA},
61     {"S_ASS"            , AV_CODEC_ID_SSA},
62     {"S_SSA"            , AV_CODEC_ID_SSA},
63     {"S_VOBSUB"         , AV_CODEC_ID_DVD_SUBTITLE},
64     {"S_HDMV/PGS"       , AV_CODEC_ID_HDMV_PGS_SUBTITLE},
65
66     {"V_DIRAC"          , AV_CODEC_ID_DIRAC},
67     {"V_MJPEG"          , AV_CODEC_ID_MJPEG},
68     {"V_MPEG1"          , AV_CODEC_ID_MPEG1VIDEO},
69     {"V_MPEG2"          , AV_CODEC_ID_MPEG2VIDEO},
70     {"V_MPEG4/ISO/ASP"  , AV_CODEC_ID_MPEG4},
71     {"V_MPEG4/ISO/AP"   , AV_CODEC_ID_MPEG4},
72     {"V_MPEG4/ISO/SP"   , AV_CODEC_ID_MPEG4},
73     {"V_MPEG4/ISO/AVC"  , AV_CODEC_ID_H264},
74     {"V_MPEGH/ISO/HEVC" , AV_CODEC_ID_HEVC},
75     {"V_MPEG4/MS/V3"    , AV_CODEC_ID_MSMPEG4V3},
76     {"V_PRORES"         , AV_CODEC_ID_PRORES},
77     {"V_REAL/RV10"      , AV_CODEC_ID_RV10},
78     {"V_REAL/RV20"      , AV_CODEC_ID_RV20},
79     {"V_REAL/RV30"      , AV_CODEC_ID_RV30},
80     {"V_REAL/RV40"      , AV_CODEC_ID_RV40},
81     {"V_THEORA"         , AV_CODEC_ID_THEORA},
82     {"V_UNCOMPRESSED"   , AV_CODEC_ID_RAWVIDEO},
83     {"V_VP8"            , AV_CODEC_ID_VP8},
84     {"V_VP9"            , AV_CODEC_ID_VP9},
85
86     {""                 , AV_CODEC_ID_NONE}
87 };
88
89 const CodecMime ff_mkv_mime_tags[] = {
90     {"text/plain"                 , AV_CODEC_ID_TEXT},
91     {"image/gif"                  , AV_CODEC_ID_GIF},
92     {"image/jpeg"                 , AV_CODEC_ID_MJPEG},
93     {"image/png"                  , AV_CODEC_ID_PNG},
94     {"image/tiff"                 , AV_CODEC_ID_TIFF},
95     {"application/x-truetype-font", AV_CODEC_ID_TTF},
96     {"application/x-font"         , AV_CODEC_ID_TTF},
97
98     {""                           , AV_CODEC_ID_NONE}
99 };
100
101 const AVMetadataConv ff_mkv_metadata_conv[] = {
102     { "LEAD_PERFORMER", "performer" },
103     { "PART_NUMBER"   , "track"  },
104     { 0 }
105 };