/*
* ISO Media common code
- * Copyright (c) 2001 Fabrice Bellard.
+ * Copyright (c) 2001 Fabrice Bellard
* Copyright (c) 2002 Francois Revol <revol@free.fr>
* Copyright (c) 2006 Baptiste Coudurier <baptiste.coudurier@free.fr>
*
/* http://www.mp4ra.org */
/* ordered by muxing preference */
const AVCodecTag ff_mp4_obj_type[] = {
+ { CODEC_ID_MOV_TEXT , 0x08 },
{ CODEC_ID_MPEG4 , 0x20 },
{ CODEC_ID_H264 , 0x21 },
{ CODEC_ID_AAC , 0x40 },
{ CODEC_ID_AAC , 0x66 }, /* MPEG2 AAC Main */
{ CODEC_ID_AAC , 0x67 }, /* MPEG2 AAC Low */
{ CODEC_ID_AAC , 0x68 }, /* MPEG2 AAC SSR */
- { CODEC_ID_MP3 , 0x6B }, /* 11172-3 */
- { CODEC_ID_MP2 , 0x6B }, /* 11172-3 */
{ CODEC_ID_MP3 , 0x69 }, /* 13818-3 */
+ { CODEC_ID_MP2 , 0x69 }, /* 11172-3 */
{ CODEC_ID_MPEG1VIDEO, 0x6A }, /* 11172-2 */
+ { CODEC_ID_MP3 , 0x6B }, /* 11172-3 */
{ CODEC_ID_MJPEG , 0x6C }, /* 10918-1 */
{ CODEC_ID_PNG , 0x6D },
{ CODEC_ID_JPEG2000 , 0x6E }, /* 15444-1 */
{ CODEC_ID_VC1 , 0xA3 },
+ { CODEC_ID_DIRAC , 0xA4 },
{ CODEC_ID_AC3 , 0xA5 },
{ CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */
{ CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */
{ CODEC_ID_MSRLE, MKTAG('W', 'R', 'L', 'E') },
{ CODEC_ID_QDRAW, MKTAG('q', 'd', 'r', 'w') }, /* QuickDraw */
+ { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
+
{ CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
{ CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
{ CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'f') }, /* XDCAM EX 1080p30 VBR */
{ CODEC_ID_MPEG2VIDEO, MKTAG('A', 'V', 'm', 'p') }, /* AVID IMX PAL */
- //{ CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, /* JPEG 2000 produced by FCP */
+ { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, /* JPEG 2000 produced by FCP */
{ CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, /* Truevision Targa */
{ CODEC_ID_TIFF, MKTAG('t', 'i', 'f', 'f') }, /* TIFF embedded in MOV */
{ CODEC_ID_VC1, MKTAG('v', 'c', '-', '1') }, /* SMPTE RP 2025 */
{ CODEC_ID_CAVS, MKTAG('a', 'v', 's', '2') },
+ { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },
{ CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n') }, /* AVID DNxHD */
{ CODEC_ID_SGI, MKTAG('s', 'g', 'i', ' ') }, /* SGI */
/* cf. QTFileFormat.pdf p253, qtff.pdf p205 */
/* http://developer.apple.com/documentation/mac/Text/Text-368.html */
/* deprecated by putting the code as 3*5bit ascii */
-static const char *mov_mdhd_language_map[] = {
+static const char * const mov_mdhd_language_map[] = {
/* 0-9 */
"eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",
"heb", "jpn", "ara", "fin", "gre", "ice", "mlt", "tur", "hr "/*scr*/, "chi"/*ace?*/,
int i, code = 0;
/* old way, only for QT? */
- for (i = 0; !mp4 && (i < (sizeof(mov_mdhd_language_map)/sizeof(char *))); i++) {
+ for (i = 0; !mp4 && i < FF_ARRAY_ELEMS(mov_mdhd_language_map); i++) {
if (mov_mdhd_language_map[i] && !strcmp(lang, mov_mdhd_language_map[i]))
return i;
}
return code;
}
-int ff_mov_lang_to_iso639(int code, char *to)
+int ff_mov_lang_to_iso639(unsigned code, char *to)
{
int i;
/* is it the mangled iso code? */
return 1;
}
/* old fashion apple lang code */
- if (code >= (sizeof(mov_mdhd_language_map)/sizeof(char *)))
+ if (code >= FF_ARRAY_ELEMS(mov_mdhd_language_map))
return 0;
if (!mov_mdhd_language_map[code])
return 0;