aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/gxfenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-07 22:45:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-07 22:45:46 +0200
commit7a72695c05f12f21a62dc99fa64d1726fc11b236 (patch)
treee8f1a2813c4cd1fd8bd0ac5f764c7fd676ab85af /libavformat/gxfenc.c
parent49440853d0c1e740daee0e2df1e65d5e67b1ad6b (diff)
parent36ef5369ee9b336febc2c270f8718cec4476cb85 (diff)
downloadffmpeg-7a72695c05f12f21a62dc99fa64d1726fc11b236.tar.gz
Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/gxfenc.c')
-rw-r--r--libavformat/gxfenc.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index c1a2bb599c..7c6b4cc6e7 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -97,22 +97,22 @@ static const struct {
};
static const AVCodecTag gxf_media_types[] = {
- { CODEC_ID_MJPEG , 3 }, /* NTSC */
- { CODEC_ID_MJPEG , 4 }, /* PAL */
- { CODEC_ID_PCM_S24LE , 9 },
- { CODEC_ID_PCM_S16LE , 10 },
- { CODEC_ID_MPEG2VIDEO, 11 }, /* NTSC */
- { CODEC_ID_MPEG2VIDEO, 12 }, /* PAL */
- { CODEC_ID_DVVIDEO , 13 }, /* NTSC */
- { CODEC_ID_DVVIDEO , 14 }, /* PAL */
- { CODEC_ID_DVVIDEO , 15 }, /* 50M NTSC */
- { CODEC_ID_DVVIDEO , 16 }, /* 50M PAL */
- { CODEC_ID_AC3 , 17 },
- //{ CODEC_ID_NONE, , 18 }, /* Non compressed 24 bit audio */
- { CODEC_ID_MPEG2VIDEO, 20 }, /* MPEG HD */
- { CODEC_ID_MPEG1VIDEO, 22 }, /* NTSC */
- { CODEC_ID_MPEG1VIDEO, 23 }, /* PAL */
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MJPEG , 3 }, /* NTSC */
+ { AV_CODEC_ID_MJPEG , 4 }, /* PAL */
+ { AV_CODEC_ID_PCM_S24LE , 9 },
+ { AV_CODEC_ID_PCM_S16LE , 10 },
+ { AV_CODEC_ID_MPEG2VIDEO, 11 }, /* NTSC */
+ { AV_CODEC_ID_MPEG2VIDEO, 12 }, /* PAL */
+ { AV_CODEC_ID_DVVIDEO , 13 }, /* NTSC */
+ { AV_CODEC_ID_DVVIDEO , 14 }, /* PAL */
+ { AV_CODEC_ID_DVVIDEO , 15 }, /* 50M NTSC */
+ { AV_CODEC_ID_DVVIDEO , 16 }, /* 50M PAL */
+ { AV_CODEC_ID_AC3 , 17 },
+ //{ AV_CODEC_ID_NONE, , 18 }, /* Non compressed 24 bit audio */
+ { AV_CODEC_ID_MPEG2VIDEO, 20 }, /* MPEG HD */
+ { AV_CODEC_ID_MPEG1VIDEO, 22 }, /* NTSC */
+ { AV_CODEC_ID_MPEG1VIDEO, 23 }, /* PAL */
+ { AV_CODEC_ID_NONE, 0 },
};
#define SERVER_PATH "EXT:/PDR/default/"
@@ -510,9 +510,9 @@ static int gxf_write_umf_media_mpeg(AVIOContext *pb, AVStream *st)
avio_wl32(pb, 1); /* I picture per GOP */
avio_wl32(pb, sc->p_per_gop);
avio_wl32(pb, sc->b_per_i_or_p);
- if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO)
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO)
avio_wl32(pb, 2);
- else if (st->codec->codec_id == CODEC_ID_MPEG1VIDEO)
+ else if (st->codec->codec_id == AV_CODEC_ID_MPEG1VIDEO)
avio_wl32(pb, 1);
else
avio_wl32(pb, 0);
@@ -595,14 +595,14 @@ static int gxf_write_umf_media_description(AVFormatContext *s)
else {
AVStream *st = s->streams[i];
switch (st->codec->codec_id) {
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
gxf_write_umf_media_mpeg(pb, st);
break;
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16LE:
gxf_write_umf_media_audio(pb, sc);
break;
- case CODEC_ID_DVVIDEO:
+ case AV_CODEC_ID_DVVIDEO:
gxf_write_umf_media_dv(pb, sc);
break;
}
@@ -697,7 +697,7 @@ static int gxf_write_header(AVFormatContext *s)
sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id);
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
- if (st->codec->codec_id != CODEC_ID_PCM_S16LE) {
+ if (st->codec->codec_id != AV_CODEC_ID_PCM_S16LE) {
av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n");
return -1;
}
@@ -752,24 +752,24 @@ static int gxf_write_header(AVFormatContext *s)
vsc = sc;
switch (st->codec->codec_id) {
- case CODEC_ID_MJPEG:
+ case AV_CODEC_ID_MJPEG:
sc->track_type = 1;
gxf->flags |= 0x00004000;
media_info = 'J';
break;
- case CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
sc->track_type = 9;
gxf->mpeg_tracks++;
media_info = 'L';
break;
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
sc->first_gop_closed = -1;
sc->track_type = 4;
gxf->mpeg_tracks++;
gxf->flags |= 0x00008000;
media_info = 'M';
break;
- case CODEC_ID_DVVIDEO:
+ case AV_CODEC_ID_DVVIDEO:
if (st->codec->pix_fmt == PIX_FMT_YUV422P) {
sc->media_type += 2;
sc->track_type = 6;
@@ -885,7 +885,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size)
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
avio_wb16(pb, 0);
avio_wb16(pb, size / 2);
- } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
int frame_type = gxf_parse_mpeg_frame(sc, pkt->data, pkt->size);
if (frame_type == AV_PICTURE_TYPE_I) {
avio_w8(pb, 0x0d);
@@ -898,7 +898,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size)
sc->pframes++;
}
avio_wb24(pb, size);
- } else if (st->codec->codec_id == CODEC_ID_DVVIDEO) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_DVVIDEO) {
avio_w8(pb, size / 4096);
avio_wb24(pb, 0);
} else
@@ -919,7 +919,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
int packet_start_offset = avio_tell(pb) / 1024;
gxf_write_packet_header(pb, PKT_MEDIA);
- if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
padding = 4 - pkt->size % 4;
else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
padding = GXF_AUDIO_PACKET_SIZE - pkt->size;
@@ -989,8 +989,8 @@ AVOutputFormat ff_gxf_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("GXF (General eXchange Format)"),
.extensions = "gxf",
.priv_data_size = sizeof(GXFContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = gxf_write_header,
.write_packet = gxf_write_packet,
.write_trailer = gxf_write_trailer,