summaryrefslogtreecommitdiff
path: root/libavformat/electronicarts.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/electronicarts.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/electronicarts.c')
-rw-r--r--libavformat/electronicarts.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 3d51c70a64..c5533f2674 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -63,13 +63,13 @@
typedef struct EaDemuxContext {
int big_endian;
- enum CodecID video_codec;
+ enum AVCodecID video_codec;
AVRational time_base;
int width, height;
int nb_frames;
int video_stream_index;
- enum CodecID audio_codec;
+ enum AVCodecID audio_codec;
int audio_stream_index;
int bytes;
@@ -175,25 +175,25 @@ static int process_audio_header_elements(AVFormatContext *s)
}
switch (compression_type) {
- case 0: ea->audio_codec = CODEC_ID_PCM_S16LE; break;
- case 7: ea->audio_codec = CODEC_ID_ADPCM_EA; break;
+ case 0: ea->audio_codec = AV_CODEC_ID_PCM_S16LE; break;
+ case 7: ea->audio_codec = AV_CODEC_ID_ADPCM_EA; break;
case -1:
switch (revision) {
- case 1: ea->audio_codec = CODEC_ID_ADPCM_EA_R1; break;
- case 2: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;
- case 3: ea->audio_codec = CODEC_ID_ADPCM_EA_R3; break;
+ case 1: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R1; break;
+ case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
+ case 3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R3; break;
case -1: break;
default:
av_log(s, AV_LOG_ERROR, "unsupported stream type; revision=%i\n", revision);
return 0;
}
switch (revision2) {
- case 8: ea->audio_codec = CODEC_ID_PCM_S16LE_PLANAR; break;
- case 10: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;
- case 16: ea->audio_codec = CODEC_ID_MP3; break;
+ case 8: ea->audio_codec = AV_CODEC_ID_PCM_S16LE_PLANAR; break;
+ case 10: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
+ case 16: ea->audio_codec = AV_CODEC_ID_MP3; break;
case -1: break;
default:
- ea->audio_codec = CODEC_ID_NONE;
+ ea->audio_codec = AV_CODEC_ID_NONE;
av_log(s, AV_LOG_ERROR, "unsupported stream type; revision2=%i\n", revision2);
return 0;
}
@@ -228,12 +228,12 @@ static int process_audio_header_eacs(AVFormatContext *s)
switch (compression_type) {
case 0:
switch (ea->bytes) {
- case 1: ea->audio_codec = CODEC_ID_PCM_S8; break;
- case 2: ea->audio_codec = CODEC_ID_PCM_S16LE; break;
+ case 1: ea->audio_codec = AV_CODEC_ID_PCM_S8; break;
+ case 2: ea->audio_codec = AV_CODEC_ID_PCM_S16LE; break;
}
break;
- case 1: ea->audio_codec = CODEC_ID_PCM_MULAW; ea->bytes = 1; break;
- case 2: ea->audio_codec = CODEC_ID_ADPCM_IMA_EA_EACS; break;
+ case 1: ea->audio_codec = AV_CODEC_ID_PCM_MULAW; ea->bytes = 1; break;
+ case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_EACS; break;
default:
av_log (s, AV_LOG_ERROR, "unsupported stream type; audio compression_type=%i\n", compression_type);
}
@@ -253,7 +253,7 @@ static int process_audio_header_sead(AVFormatContext *s)
ea->sample_rate = avio_rl32(pb);
ea->bytes = avio_rl32(pb); /* 1=8-bit, 2=16-bit */
ea->num_channels = avio_rl32(pb);
- ea->audio_codec = CODEC_ID_ADPCM_IMA_EA_SEAD;
+ ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_SEAD;
return 1;
}
@@ -266,7 +266,7 @@ static int process_video_header_mdec(AVFormatContext *s)
ea->width = avio_rl16(pb);
ea->height = avio_rl16(pb);
ea->time_base = (AVRational){1,15};
- ea->video_codec = CODEC_ID_MDEC;
+ ea->video_codec = AV_CODEC_ID_MDEC;
return 1;
}
@@ -280,7 +280,7 @@ static int process_video_header_vp6(AVFormatContext *s)
avio_skip(pb, 4);
ea->time_base.den = avio_rl32(pb);
ea->time_base.num = avio_rl32(pb);
- ea->video_codec = CODEC_ID_VP6;
+ ea->video_codec = AV_CODEC_ID_VP6;
return 1;
}
@@ -294,7 +294,7 @@ static int process_video_header_cmv(AVFormatContext *s)
fps = avio_rl16(s->pb);
if (fps)
ea->time_base = (AVRational){1, fps};
- ea->video_codec = CODEC_ID_CMV;
+ ea->video_codec = AV_CODEC_ID_CMV;
return 0;
}
@@ -350,7 +350,7 @@ static int process_ea_header(AVFormatContext *s) {
break;
case kVGT_TAG:
- ea->video_codec = CODEC_ID_TGV;
+ ea->video_codec = AV_CODEC_ID_TGV;
break;
case mTCD_TAG :
@@ -358,20 +358,20 @@ static int process_ea_header(AVFormatContext *s) {
break;
case MPCh_TAG:
- ea->video_codec = CODEC_ID_MPEG2VIDEO;
+ ea->video_codec = AV_CODEC_ID_MPEG2VIDEO;
break;
case pQGT_TAG:
case TGQs_TAG:
- ea->video_codec = CODEC_ID_TGQ;
+ ea->video_codec = AV_CODEC_ID_TGQ;
break;
case pIQT_TAG:
- ea->video_codec = CODEC_ID_TQI;
+ ea->video_codec = AV_CODEC_ID_TQI;
break;
case MADk_TAG :
- ea->video_codec = CODEC_ID_MAD;
+ ea->video_codec = AV_CODEC_ID_MAD;
break;
case MVhd_TAG :
@@ -431,7 +431,7 @@ static int ea_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = ea->video_codec;
// parsing is necessary to make FFmpeg generate correct timestamps
- if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO)
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO)
st->need_parsing = AVSTREAM_PARSE_HEADERS;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = ea->width;
@@ -456,7 +456,7 @@ static int ea_read_header(AVFormatContext *s)
}
if (ea->bytes <= 0) {
av_log(s, AV_LOG_ERROR, "Invalid number of bytes per sample: %d\n", ea->bytes);
- ea->audio_codec = CODEC_ID_NONE;
+ ea->audio_codec = AV_CODEC_ID_NONE;
return 1;
}
@@ -515,8 +515,8 @@ static int ea_read_packet(AVFormatContext *s,
if (!ea->audio_codec) {
avio_skip(pb, chunk_size);
break;
- } else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR ||
- ea->audio_codec == CODEC_ID_MP3) {
+ } else if (ea->audio_codec == AV_CODEC_ID_PCM_S16LE_PLANAR ||
+ ea->audio_codec == AV_CODEC_ID_MP3) {
num_samples = avio_rl32(pb);
avio_skip(pb, 8);
chunk_size -= 12;
@@ -532,20 +532,20 @@ static int ea_read_packet(AVFormatContext *s,
pkt->stream_index = ea->audio_stream_index;
switch (ea->audio_codec) {
- case CODEC_ID_ADPCM_EA:
- case CODEC_ID_ADPCM_EA_R1:
- case CODEC_ID_ADPCM_EA_R2:
- case CODEC_ID_ADPCM_IMA_EA_EACS:
+ case AV_CODEC_ID_ADPCM_EA:
+ case AV_CODEC_ID_ADPCM_EA_R1:
+ case AV_CODEC_ID_ADPCM_EA_R2:
+ case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
pkt->duration = AV_RL32(pkt->data);
break;
- case CODEC_ID_ADPCM_EA_R3:
+ case AV_CODEC_ID_ADPCM_EA_R3:
pkt->duration = AV_RB32(pkt->data);
break;
- case CODEC_ID_ADPCM_IMA_EA_SEAD:
+ case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
pkt->duration = ret * 2 / ea->num_channels;
break;
- case CODEC_ID_PCM_S16LE_PLANAR:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_PCM_S16LE_PLANAR:
+ case AV_CODEC_ID_MP3:
pkt->duration = num_samples;
break;
default: