[Ffmpeg-cvslog] CVS: ffmpeg/libavformat mov.h, NONE, 1.1 mov.c, 1.102, 1.103 movenc.c, 1.51, 1.52
Michael Niedermayer CVS
michael
Sat Feb 11 19:28:00 CET 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv27350
Modified Files:
mov.c movenc.c
Added Files:
mov.h
Log Message:
mp4 codecs objecttype handling patch by (Baptiste COUDURIER <baptiste.coudurier smartjog com)
--- NEW FILE: mov.h ---
#ifndef FFMPEG_MOV_H
#define FFMPEG_MOV_H
/* mov.c */
extern const CodecTag ff_mov_obj_type[];
#endif /* FFMPEG_MOV_H */
Index: mov.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/mov.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- mov.c 2 Feb 2006 20:56:35 -0000 1.102
+++ mov.c 11 Feb 2006 18:27:57 -0000 1.103
@@ -21,6 +21,7 @@
#include "avformat.h"
#include "avi.h"
+#include "mov.h"
#ifdef CONFIG_ZLIB
#include <zlib.h>
@@ -82,6 +83,35 @@
/* getting rid of these */
#define CODEC_TYPE_MOV_OTHER (enum CodecType) 2
+/* http://gpac.sourceforge.net/tutorial/mediatypes.htm */
+const CodecTag ff_mov_obj_type[] = {
+ { CODEC_ID_MPEG4 , 32 },
+ { CODEC_ID_H264 , 33 },
+ { CODEC_ID_AAC , 64 },
+ { CODEC_ID_MPEG2VIDEO, 96 }, /* MPEG2 Simple */
+ { CODEC_ID_MPEG2VIDEO, 97 }, /* MPEG2 Main */
+ { CODEC_ID_MPEG2VIDEO, 98 }, /* MPEG2 SNR */
+ { CODEC_ID_MPEG2VIDEO, 99 }, /* MPEG2 Spatial */
+ { CODEC_ID_MPEG2VIDEO, 100 }, /* MPEG2 High */
+ { CODEC_ID_MPEG2VIDEO, 101 }, /* MPEG2 422 */
+ { CODEC_ID_AAC , 102 }, /* MPEG2 AAC Main */
+ { CODEC_ID_AAC , 103 }, /* MPEG2 AAC Low */
+ { CODEC_ID_AAC , 104 }, /* MPEG2 AAC SSR */
+ { CODEC_ID_MP3 , 105 },
+ { CODEC_ID_MPEG1VIDEO, 106 },
+ { CODEC_ID_MP2 , 107 },
+ { CODEC_ID_MJPEG , 108 },
+ { CODEC_ID_PCM_S16LE , 224 },
+ { CODEC_ID_VORBIS , 225 },
+ { CODEC_ID_AC3 , 226 },
+ { CODEC_ID_PCM_ALAW , 227 },
+ { CODEC_ID_PCM_MULAW , 228 },
+ { CODEC_ID_PCM_S16BE , 230 },
+ { CODEC_ID_H263 , 242 },
+ { CODEC_ID_H261 , 243 },
+ { 0, 0 },
+};
+
static const CodecTag mov_video_tags[] = {
/* { CODEC_ID_, MKTAG('c', 'v', 'i', 'd') }, *//* Cinepak */
/* { CODEC_ID_H263, MKTAG('r', 'a', 'w', ' ') }, *//* Uncompressed RGB */
@@ -656,6 +686,7 @@
sc->esds.max_bitrate = get_be32(pb);
sc->esds.avg_bitrate = get_be32(pb);
+ st->codec->codec_id= codec_get_id(ff_mov_obj_type, sc->esds.object_type_id);
len = mov_mp4_read_descr(pb, &tag);
//av_log(NULL, AV_LOG_DEBUG, "LEN %d TAG %d m:%d a:%d\n", len, tag, sc->esds.max_bitrate, sc->esds.avg_bitrate);
if (tag == MP4DecSpecificDescrTag) {
Index: movenc.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/movenc.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- movenc.c 24 Jan 2006 08:03:41 -0000 1.51
+++ movenc.c 11 Feb 2006 18:27:57 -0000 1.52
@@ -20,6 +20,7 @@
#include "avformat.h"
#include "avi.h"
#include "avio.h"
+#include "mov.h"
#undef NDEBUG
#include <assert.h>
@@ -77,26 +78,6 @@
/* output language code from iso639 language name */
extern int ff_mov_iso639_to_lang(const char *lang, int mp4);
-const CodecTag ff_mov_obj_type[] = {
- { CODEC_ID_MPEG4 , 32 },
- { CODEC_ID_AAC , 64 },
- { CODEC_ID_MPEG1VIDEO, 106 },
- { CODEC_ID_MPEG2VIDEO, 96 },//mpeg2 profiles
- { CODEC_ID_MP2 , 107 },//FIXME mpeg2 mpeg audio -> 105
- { CODEC_ID_MP3 , 107 },//FIXME mpeg2 mpeg audio -> 105
- { CODEC_ID_H264 , 33 },
- { CODEC_ID_H263 , 242 },
- { CODEC_ID_H261 , 243 },
- { CODEC_ID_MJPEG , 108 },
- { CODEC_ID_PCM_S16LE , 224 },
- { CODEC_ID_VORBIS , 225 },
- { CODEC_ID_AC3 , 226 },
- { CODEC_ID_PCM_ALAW , 227 },
- { CODEC_ID_PCM_MULAW , 228 },
- { CODEC_ID_PCM_S16BE , 230 },
- { 0,0 },
-};
-
//FIXME supprt 64bit varaint with wide placeholders
static offset_t updateSize (ByteIOContext *pb, offset_t pos)
{
More information about the ffmpeg-cvslog
mailing list