Revision e60b4ced

View differences:

libavformat/mov.c
21 21

  
22 22
#include "avformat.h"
23 23
#include "avi.h"
24
#include "mov.h"
24 25

  
25 26
#ifdef CONFIG_ZLIB
26 27
#include <zlib.h>
......
82 83
/* getting rid of these */
83 84
#define CODEC_TYPE_MOV_OTHER    (enum CodecType) 2
84 85

  
86
/* http://gpac.sourceforge.net/tutorial/mediatypes.htm */
87
const CodecTag ff_mov_obj_type[] = {
88
    { CODEC_ID_MPEG4     ,  32 },
89
    { CODEC_ID_H264      ,  33 },
90
    { CODEC_ID_AAC       ,  64 },
91
    { CODEC_ID_MPEG2VIDEO,  96 }, /* MPEG2 Simple */
92
    { CODEC_ID_MPEG2VIDEO,  97 }, /* MPEG2 Main */
93
    { CODEC_ID_MPEG2VIDEO,  98 }, /* MPEG2 SNR */
94
    { CODEC_ID_MPEG2VIDEO,  99 }, /* MPEG2 Spatial */
95
    { CODEC_ID_MPEG2VIDEO, 100 }, /* MPEG2 High */
96
    { CODEC_ID_MPEG2VIDEO, 101 }, /* MPEG2 422 */
97
    { CODEC_ID_AAC       , 102 }, /* MPEG2 AAC Main */
98
    { CODEC_ID_AAC       , 103 }, /* MPEG2 AAC Low */
99
    { CODEC_ID_AAC       , 104 }, /* MPEG2 AAC SSR */
100
    { CODEC_ID_MP3       , 105 },
101
    { CODEC_ID_MPEG1VIDEO, 106 },
102
    { CODEC_ID_MP2       , 107 },
103
    { CODEC_ID_MJPEG     , 108 },
104
    { CODEC_ID_PCM_S16LE , 224 },
105
    { CODEC_ID_VORBIS    , 225 },
106
    { CODEC_ID_AC3       , 226 },
107
    { CODEC_ID_PCM_ALAW  , 227 },
108
    { CODEC_ID_PCM_MULAW , 228 },
109
    { CODEC_ID_PCM_S16BE , 230 },
110
    { CODEC_ID_H263      , 242 },
111
    { CODEC_ID_H261      , 243 },
112
    { 0, 0 },
113
};
114

  
85 115
static const CodecTag mov_video_tags[] = {
86 116
/*  { CODEC_ID_, MKTAG('c', 'v', 'i', 'd') }, *//* Cinepak */
87 117
/*  { CODEC_ID_H263, MKTAG('r', 'a', 'w', ' ') }, *//* Uncompressed RGB */
......
656 686
        sc->esds.max_bitrate = get_be32(pb);
657 687
        sc->esds.avg_bitrate = get_be32(pb);
658 688

  
689
        st->codec->codec_id= codec_get_id(ff_mov_obj_type, sc->esds.object_type_id);
659 690
        len = mov_mp4_read_descr(pb, &tag);
660 691
        //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);
661 692
        if (tag == MP4DecSpecificDescrTag) {
libavformat/mov.h
1
#ifndef FFMPEG_MOV_H
2
#define FFMPEG_MOV_H
3

  
4
/* mov.c */
5
extern const CodecTag ff_mov_obj_type[];
6

  
7
#endif /* FFMPEG_MOV_H */
libavformat/movenc.c
20 20
#include "avformat.h"
21 21
#include "avi.h"
22 22
#include "avio.h"
23
#include "mov.h"
23 24

  
24 25
#undef NDEBUG
25 26
#include <assert.h>
......
77 78
/* output language code from iso639 language name */
78 79
extern int ff_mov_iso639_to_lang(const char *lang, int mp4);
79 80

  
80
const CodecTag ff_mov_obj_type[] = {
81
    { CODEC_ID_MPEG4     ,  32 },
82
    { CODEC_ID_AAC       ,  64 },
83
    { CODEC_ID_MPEG1VIDEO, 106 },
84
    { CODEC_ID_MPEG2VIDEO,  96 },//mpeg2 profiles
85
    { CODEC_ID_MP2       , 107 },//FIXME mpeg2 mpeg audio -> 105
86
    { CODEC_ID_MP3       , 107 },//FIXME mpeg2 mpeg audio -> 105
87
    { CODEC_ID_H264      ,  33 },
88
    { CODEC_ID_H263      , 242 },
89
    { CODEC_ID_H261      , 243 },
90
    { CODEC_ID_MJPEG     , 108 },
91
    { CODEC_ID_PCM_S16LE , 224 },
92
    { CODEC_ID_VORBIS    , 225 },
93
    { CODEC_ID_AC3       , 226 },
94
    { CODEC_ID_PCM_ALAW  , 227 },
95
    { CODEC_ID_PCM_MULAW , 228 },
96
    { CODEC_ID_PCM_S16BE , 230 },
97
    { 0,0  },
98
};
99

  
100 81
//FIXME supprt 64bit varaint with wide placeholders
101 82
static offset_t updateSize (ByteIOContext *pb, offset_t pos)
102 83
{

Also available in: Unified diff