is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.6
@@ -48,7 +48,7 @@ | |||||
const char **opt_names; | const char **opt_names; | ||||
static int opt_name_count; | static int opt_name_count; | ||||
AVCodecContext *avcodec_opts[CODEC_TYPE_NB]; | |||||
AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; | |||||
AVFormatContext *avformat_opts; | AVFormatContext *avformat_opts; | ||||
struct SwsContext *sws_opts; | struct SwsContext *sws_opts; | ||||
@@ -191,7 +191,7 @@ int opt_default(const char *opt, const char *arg){ | |||||
const AVOption *o= NULL; | const AVOption *o= NULL; | ||||
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; | int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; | ||||
for(type=0; type<CODEC_TYPE_NB && ret>= 0; type++){ | |||||
for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){ | |||||
const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]); | const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]); | ||||
if(o2) | if(o2) | ||||
ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o); | ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o); | ||||
@@ -202,11 +202,11 @@ int opt_default(const char *opt, const char *arg){ | |||||
ret = av_set_string3(sws_opts, opt, arg, 1, &o); | ret = av_set_string3(sws_opts, opt, arg, 1, &o); | ||||
if(!o){ | if(!o){ | ||||
if(opt[0] == 'a') | if(opt[0] == 'a') | ||||
ret = av_set_string3(avcodec_opts[CODEC_TYPE_AUDIO], opt+1, arg, 1, &o); | |||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o); | |||||
else if(opt[0] == 'v') | else if(opt[0] == 'v') | ||||
ret = av_set_string3(avcodec_opts[CODEC_TYPE_VIDEO], opt+1, arg, 1, &o); | |||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o); | |||||
else if(opt[0] == 's') | else if(opt[0] == 's') | ||||
ret = av_set_string3(avcodec_opts[CODEC_TYPE_SUBTITLE], opt+1, arg, 1, &o); | |||||
ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o); | |||||
} | } | ||||
if (o && ret < 0) { | if (o && ret < 0) { | ||||
fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt); | fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt); | ||||
@@ -535,13 +535,13 @@ void show_codecs(void) | |||||
last_name= p2->name; | last_name= p2->name; | ||||
switch(p2->type) { | switch(p2->type) { | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
type_str = "V"; | type_str = "V"; | ||||
break; | break; | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
type_str = "A"; | type_str = "A"; | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
type_str = "S"; | type_str = "S"; | ||||
break; | break; | ||||
default: | default: | ||||
@@ -40,7 +40,7 @@ extern const int program_birth_year; | |||||
extern const int this_year; | extern const int this_year; | ||||
extern const char **opt_names; | extern const char **opt_names; | ||||
extern AVCodecContext *avcodec_opts[CODEC_TYPE_NB]; | |||||
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; | |||||
extern AVFormatContext *avformat_opts; | extern AVFormatContext *avformat_opts; | ||||
extern struct SwsContext *sws_opts; | extern struct SwsContext *sws_opts; | ||||
@@ -452,7 +452,7 @@ static int av_exit(int ret) | |||||
powerpc_display_perf_report(); | powerpc_display_perf_report(); | ||||
#endif /* CONFIG_POWERPC_PERF */ | #endif /* CONFIG_POWERPC_PERF */ | ||||
for (i=0;i<CODEC_TYPE_NB;i++) | |||||
for (i=0;i<AVMEDIA_TYPE_NB;i++) | |||||
av_free(avcodec_opts[i]); | av_free(avcodec_opts[i]); | ||||
av_free(avformat_opts); | av_free(avformat_opts); | ||||
av_free(sws_opts); | av_free(sws_opts); | ||||
@@ -527,9 +527,9 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) | |||||
memcpy(st->codec, ic->streams[i]->codec, sizeof(AVCodecContext)); | memcpy(st->codec, ic->streams[i]->codec, sizeof(AVCodecContext)); | ||||
s->streams[i] = st; | s->streams[i] = st; | ||||
if (st->codec->codec_type == CODEC_TYPE_AUDIO && audio_stream_copy) | |||||
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && audio_stream_copy) | |||||
st->stream_copy = 1; | st->stream_copy = 1; | ||||
else if (st->codec->codec_type == CODEC_TYPE_VIDEO && video_stream_copy) | |||||
else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && video_stream_copy) | |||||
st->stream_copy = 1; | st->stream_copy = 1; | ||||
if(!st->codec->thread_count) | if(!st->codec->thread_count) | ||||
@@ -967,7 +967,7 @@ static void do_video_out(AVFormatContext *s, | |||||
}else | }else | ||||
ost->sync_opts= lrintf(sync_ipts); | ost->sync_opts= lrintf(sync_ipts); | ||||
nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number); | |||||
nb_frames= FFMIN(nb_frames, max_frames[AVMEDIA_TYPE_VIDEO] - ost->frame_number); | |||||
if (nb_frames <= 0) | if (nb_frames <= 0) | ||||
return; | return; | ||||
@@ -1088,7 +1088,7 @@ static void do_video_out(AVFormatContext *s, | |||||
/* better than nothing: use input picture interlaced | /* better than nothing: use input picture interlaced | ||||
settings */ | settings */ | ||||
big_picture.interlaced_frame = in_picture->interlaced_frame; | big_picture.interlaced_frame = in_picture->interlaced_frame; | ||||
if(avcodec_opts[CODEC_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){ | |||||
if(avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){ | |||||
if(top_field_first == -1) | if(top_field_first == -1) | ||||
big_picture.top_field_first = in_picture->top_field_first; | big_picture.top_field_first = in_picture->top_field_first; | ||||
else | else | ||||
@@ -1163,7 +1163,7 @@ static void do_video_stats(AVFormatContext *os, AVOutputStream *ost, | |||||
} | } | ||||
enc = ost->st->codec; | enc = ost->st->codec; | ||||
if (enc->codec_type == CODEC_TYPE_VIDEO) { | |||||
if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { | |||||
frame_number = ost->frame_number; | frame_number = ost->frame_number; | ||||
fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA); | fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA); | ||||
if (enc->flags&CODEC_FLAG_PSNR) | if (enc->flags&CODEC_FLAG_PSNR) | ||||
@@ -1223,12 +1223,12 @@ static void print_report(AVFormatContext **output_files, | |||||
for(i=0;i<nb_ostreams;i++) { | for(i=0;i<nb_ostreams;i++) { | ||||
ost = ost_table[i]; | ost = ost_table[i]; | ||||
enc = ost->st->codec; | enc = ost->st->codec; | ||||
if (vid && enc->codec_type == CODEC_TYPE_VIDEO) { | |||||
if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { | |||||
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", | snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", | ||||
!ost->st->stream_copy ? | !ost->st->stream_copy ? | ||||
enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1); | enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1); | ||||
} | } | ||||
if (!vid && enc->codec_type == CODEC_TYPE_VIDEO) { | |||||
if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { | |||||
float t = (av_gettime()-timer_start) / 1000000.0; | float t = (av_gettime()-timer_start) / 1000000.0; | ||||
frame_number = ost->frame_number; | frame_number = ost->frame_number; | ||||
@@ -1360,7 +1360,7 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
subtitle_to_free = NULL; | subtitle_to_free = NULL; | ||||
if (ist->decoding_needed) { | if (ist->decoding_needed) { | ||||
switch(ist->st->codec->codec_type) { | switch(ist->st->codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO:{ | |||||
case AVMEDIA_TYPE_AUDIO:{ | |||||
if(pkt && samples_size < FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) { | if(pkt && samples_size < FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) { | ||||
samples_size = FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE); | samples_size = FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE); | ||||
av_free(samples); | av_free(samples); | ||||
@@ -1386,7 +1386,7 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
ist->next_pts += ((int64_t)AV_TIME_BASE/bps * decoded_data_size) / | ist->next_pts += ((int64_t)AV_TIME_BASE/bps * decoded_data_size) / | ||||
(ist->st->codec->sample_rate * ist->st->codec->channels); | (ist->st->codec->sample_rate * ist->st->codec->channels); | ||||
break;} | break;} | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2; | decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2; | ||||
/* XXX: allocate picture correctly */ | /* XXX: allocate picture correctly */ | ||||
avcodec_get_frame_defaults(&picture); | avcodec_get_frame_defaults(&picture); | ||||
@@ -1408,7 +1408,7 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
} | } | ||||
avpkt.size = 0; | avpkt.size = 0; | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
ret = avcodec_decode_subtitle2(ist->st->codec, | ret = avcodec_decode_subtitle2(ist->st->codec, | ||||
&subtitle, &got_subtitle, &avpkt); | &subtitle, &got_subtitle, &avpkt); | ||||
if (ret < 0) | if (ret < 0) | ||||
@@ -1424,11 +1424,11 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
} | } | ||||
} else { | } else { | ||||
switch(ist->st->codec->codec_type) { | switch(ist->st->codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / | ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / | ||||
ist->st->codec->sample_rate; | ist->st->codec->sample_rate; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
if (ist->st->codec->time_base.num != 0) { | if (ist->st->codec->time_base.num != 0) { | ||||
int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame; | int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame; | ||||
ist->next_pts += ((int64_t)AV_TIME_BASE * | ist->next_pts += ((int64_t)AV_TIME_BASE * | ||||
@@ -1442,13 +1442,13 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
} | } | ||||
buffer_to_free = NULL; | buffer_to_free = NULL; | ||||
if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) { | |||||
if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { | |||||
pre_process_video_frame(ist, (AVPicture *)&picture, | pre_process_video_frame(ist, (AVPicture *)&picture, | ||||
&buffer_to_free); | &buffer_to_free); | ||||
} | } | ||||
// preprocess audio (volume) | // preprocess audio (volume) | ||||
if (ist->st->codec->codec_type == CODEC_TYPE_AUDIO) { | |||||
if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { | |||||
if (audio_volume != 256) { | if (audio_volume != 256) { | ||||
short *volp; | short *volp; | ||||
volp = samples; | volp = samples; | ||||
@@ -1485,15 +1485,15 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
if (ost->encoding_needed) { | if (ost->encoding_needed) { | ||||
assert(ist->decoding_needed); | assert(ist->decoding_needed); | ||||
switch(ost->st->codec->codec_type) { | switch(ost->st->codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
do_audio_out(os, ost, ist, decoded_data_buf, decoded_data_size); | do_audio_out(os, ost, ist, decoded_data_buf, decoded_data_size); | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
do_video_out(os, ost, ist, &picture, &frame_size); | do_video_out(os, ost, ist, &picture, &frame_size); | ||||
if (vstats_filename && frame_size) | if (vstats_filename && frame_size) | ||||
do_video_stats(os, ost, frame_size); | do_video_stats(os, ost, frame_size); | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
do_subtitle_out(os, ost, ist, &subtitle, | do_subtitle_out(os, ost, ist, &subtitle, | ||||
pkt->pts); | pkt->pts); | ||||
break; | break; | ||||
@@ -1517,9 +1517,9 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
ost->st->codec->coded_frame= &avframe; | ost->st->codec->coded_frame= &avframe; | ||||
avframe.key_frame = pkt->flags & PKT_FLAG_KEY; | avframe.key_frame = pkt->flags & PKT_FLAG_KEY; | ||||
if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO) | |||||
if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) | |||||
audio_size += data_size; | audio_size += data_size; | ||||
else if (ost->st->codec->codec_type == CODEC_TYPE_VIDEO) { | |||||
else if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { | |||||
video_size += data_size; | video_size += data_size; | ||||
ost->sync_opts++; | ost->sync_opts++; | ||||
} | } | ||||
@@ -1583,9 +1583,9 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
AVCodecContext *enc= ost->st->codec; | AVCodecContext *enc= ost->st->codec; | ||||
os = output_files[ost->file_index]; | os = output_files[ost->file_index]; | ||||
if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO && enc->frame_size <=1) | |||||
if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <=1) | |||||
continue; | continue; | ||||
if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE)) | |||||
if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE)) | |||||
continue; | continue; | ||||
if (ost->encoding_needed) { | if (ost->encoding_needed) { | ||||
@@ -1596,7 +1596,7 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
pkt.stream_index= ost->index; | pkt.stream_index= ost->index; | ||||
switch(ost->st->codec->codec_type) { | switch(ost->st->codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
fifo_bytes = av_fifo_size(ost->fifo); | fifo_bytes = av_fifo_size(ost->fifo); | ||||
ret = 0; | ret = 0; | ||||
/* encode any samples remaining in fifo */ | /* encode any samples remaining in fifo */ | ||||
@@ -1629,7 +1629,7 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
audio_size += ret; | audio_size += ret; | ||||
pkt.flags |= PKT_FLAG_KEY; | pkt.flags |= PKT_FLAG_KEY; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL); | ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL); | ||||
if (ret < 0) { | if (ret < 0) { | ||||
fprintf(stderr, "Video encoding failed\n"); | fprintf(stderr, "Video encoding failed\n"); | ||||
@@ -1946,7 +1946,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
}else | }else | ||||
codec->time_base = ist->st->time_base; | codec->time_base = ist->st->time_base; | ||||
switch(codec->codec_type) { | switch(codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
if(audio_volume != 256) { | if(audio_volume != 256) { | ||||
fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n"); | fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n"); | ||||
av_exit(1); | av_exit(1); | ||||
@@ -1961,13 +1961,13 @@ static int av_encode(AVFormatContext **output_files, | |||||
if(codec->codec_id == CODEC_ID_AC3) | if(codec->codec_id == CODEC_ID_AC3) | ||||
codec->block_align= 0; | codec->block_align= 0; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
codec->pix_fmt = icodec->pix_fmt; | codec->pix_fmt = icodec->pix_fmt; | ||||
codec->width = icodec->width; | codec->width = icodec->width; | ||||
codec->height = icodec->height; | codec->height = icodec->height; | ||||
codec->has_b_frames = icodec->has_b_frames; | codec->has_b_frames = icodec->has_b_frames; | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
codec->width = icodec->width; | codec->width = icodec->width; | ||||
codec->height = icodec->height; | codec->height = icodec->height; | ||||
break; | break; | ||||
@@ -1976,7 +1976,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
} | } | ||||
} else { | } else { | ||||
switch(codec->codec_type) { | switch(codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
ost->fifo= av_fifo_alloc(1024); | ost->fifo= av_fifo_alloc(1024); | ||||
if(!ost->fifo) | if(!ost->fifo) | ||||
goto fail; | goto fail; | ||||
@@ -1986,7 +1986,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
ist->decoding_needed = 1; | ist->decoding_needed = 1; | ||||
ost->encoding_needed = 1; | ost->encoding_needed = 1; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
if (ost->st->codec->pix_fmt == PIX_FMT_NONE) { | if (ost->st->codec->pix_fmt == PIX_FMT_NONE) { | ||||
fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n"); | fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n"); | ||||
av_exit(1); | av_exit(1); | ||||
@@ -2050,7 +2050,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
ost->encoding_needed = 1; | ost->encoding_needed = 1; | ||||
ist->decoding_needed = 1; | ist->decoding_needed = 1; | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
ost->encoding_needed = 1; | ost->encoding_needed = 1; | ||||
ist->decoding_needed = 1; | ist->decoding_needed = 1; | ||||
break; | break; | ||||
@@ -2098,7 +2098,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
} | } | ||||
} | } | ||||
} | } | ||||
if(codec->codec_type == CODEC_TYPE_VIDEO){ | |||||
if(codec->codec_type == AVMEDIA_TYPE_VIDEO){ | |||||
int size= codec->width * codec->height; | int size= codec->width * codec->height; | ||||
bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200); | bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200); | ||||
} | } | ||||
@@ -2155,7 +2155,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
ret = AVERROR(EINVAL); | ret = AVERROR(EINVAL); | ||||
goto dump_format; | goto dump_format; | ||||
} | } | ||||
//if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) | |||||
//if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) | |||||
// ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD; | // ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD; | ||||
} | } | ||||
} | } | ||||
@@ -2528,7 +2528,7 @@ static int opt_frame_rate(const char *opt, const char *arg) | |||||
static int opt_bitrate(const char *opt, const char *arg) | static int opt_bitrate(const char *opt, const char *arg) | ||||
{ | { | ||||
int codec_type = opt[0]=='a' ? CODEC_TYPE_AUDIO : CODEC_TYPE_VIDEO; | |||||
int codec_type = opt[0]=='a' ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO; | |||||
opt_default(opt, arg); | opt_default(opt, arg); | ||||
@@ -2781,7 +2781,7 @@ static void opt_codec(int *pstream_copy, char **pcodec_name, | |||||
static void opt_audio_codec(const char *arg) | static void opt_audio_codec(const char *arg) | ||||
{ | { | ||||
opt_codec(&audio_stream_copy, &audio_codec_name, CODEC_TYPE_AUDIO, arg); | |||||
opt_codec(&audio_stream_copy, &audio_codec_name, AVMEDIA_TYPE_AUDIO, arg); | |||||
} | } | ||||
static void opt_audio_tag(const char *arg) | static void opt_audio_tag(const char *arg) | ||||
@@ -2804,12 +2804,12 @@ static void opt_video_tag(const char *arg) | |||||
static void opt_video_codec(const char *arg) | static void opt_video_codec(const char *arg) | ||||
{ | { | ||||
opt_codec(&video_stream_copy, &video_codec_name, CODEC_TYPE_VIDEO, arg); | |||||
opt_codec(&video_stream_copy, &video_codec_name, AVMEDIA_TYPE_VIDEO, arg); | |||||
} | } | ||||
static void opt_subtitle_codec(const char *arg) | static void opt_subtitle_codec(const char *arg) | ||||
{ | { | ||||
opt_codec(&subtitle_stream_copy, &subtitle_codec_name, CODEC_TYPE_SUBTITLE, arg); | |||||
opt_codec(&subtitle_stream_copy, &subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, arg); | |||||
} | } | ||||
static void opt_subtitle_tag(const char *arg) | static void opt_subtitle_tag(const char *arg) | ||||
@@ -2965,9 +2965,9 @@ static void opt_input_file(const char *filename) | |||||
set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM); | set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM); | ||||
ic->video_codec_id = find_codec_or_die(video_codec_name , CODEC_TYPE_VIDEO , 0); | |||||
ic->audio_codec_id = find_codec_or_die(audio_codec_name , CODEC_TYPE_AUDIO , 0); | |||||
ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 0); | |||||
ic->video_codec_id = find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0); | |||||
ic->audio_codec_id = find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0); | |||||
ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0); | |||||
ic->flags |= AVFMT_FLAG_NONBLOCK; | ic->flags |= AVFMT_FLAG_NONBLOCK; | ||||
if(pgmyuv_compatibility_hack) | if(pgmyuv_compatibility_hack) | ||||
@@ -3035,8 +3035,8 @@ static void opt_input_file(const char *filename) | |||||
AVCodecContext *enc = st->codec; | AVCodecContext *enc = st->codec; | ||||
avcodec_thread_init(enc, thread_count); | avcodec_thread_init(enc, thread_count); | ||||
switch(enc->codec_type) { | switch(enc->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
set_context_opts(enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM); | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM); | |||||
//fprintf(stderr, "\nInput Audio channels: %d", enc->channels); | //fprintf(stderr, "\nInput Audio channels: %d", enc->channels); | ||||
channel_layout = enc->channel_layout; | channel_layout = enc->channel_layout; | ||||
audio_channels = enc->channels; | audio_channels = enc->channels; | ||||
@@ -3046,8 +3046,8 @@ static void opt_input_file(const char *filename) | |||||
if(audio_disable) | if(audio_disable) | ||||
st->discard= AVDISCARD_ALL; | st->discard= AVDISCARD_ALL; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
set_context_opts(enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM); | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM); | |||||
frame_height = enc->height; | frame_height = enc->height; | ||||
frame_width = enc->width; | frame_width = enc->width; | ||||
if(ic->streams[i]->sample_aspect_ratio.num) | if(ic->streams[i]->sample_aspect_ratio.num) | ||||
@@ -3084,15 +3084,15 @@ static void opt_input_file(const char *filename) | |||||
else if(video_discard) | else if(video_discard) | ||||
st->discard= video_discard; | st->discard= video_discard; | ||||
break; | break; | ||||
case CODEC_TYPE_DATA: | |||||
case AVMEDIA_TYPE_DATA: | |||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(subtitle_codec_name); | input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(subtitle_codec_name); | ||||
if(subtitle_disable) | if(subtitle_disable) | ||||
st->discard = AVDISCARD_ALL; | st->discard = AVDISCARD_ALL; | ||||
break; | break; | ||||
case CODEC_TYPE_ATTACHMENT: | |||||
case CODEC_TYPE_UNKNOWN: | |||||
case AVMEDIA_TYPE_ATTACHMENT: | |||||
case AVMEDIA_TYPE_UNKNOWN: | |||||
nb_icodecs++; | nb_icodecs++; | ||||
break; | break; | ||||
default: | default: | ||||
@@ -3129,18 +3129,18 @@ static void check_audio_video_sub_inputs(int *has_video_ptr, int *has_audio_ptr, | |||||
for(i=0;i<ic->nb_streams;i++) { | for(i=0;i<ic->nb_streams;i++) { | ||||
AVCodecContext *enc = ic->streams[i]->codec; | AVCodecContext *enc = ic->streams[i]->codec; | ||||
switch(enc->codec_type) { | switch(enc->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
has_audio = 1; | has_audio = 1; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
has_video = 1; | has_video = 1; | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
has_subtitle = 1; | has_subtitle = 1; | ||||
break; | break; | ||||
case CODEC_TYPE_DATA: | |||||
case CODEC_TYPE_ATTACHMENT: | |||||
case CODEC_TYPE_UNKNOWN: | |||||
case AVMEDIA_TYPE_DATA: | |||||
case AVMEDIA_TYPE_ATTACHMENT: | |||||
case AVMEDIA_TYPE_UNKNOWN: | |||||
break; | break; | ||||
default: | default: | ||||
abort(); | abort(); | ||||
@@ -3163,7 +3163,7 @@ static void new_video_stream(AVFormatContext *oc) | |||||
fprintf(stderr, "Could not alloc stream\n"); | fprintf(stderr, "Could not alloc stream\n"); | ||||
av_exit(1); | av_exit(1); | ||||
} | } | ||||
avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO); | |||||
avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO); | |||||
bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters; | bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters; | ||||
video_bitstream_filters= NULL; | video_bitstream_filters= NULL; | ||||
@@ -3177,16 +3177,16 @@ static void new_video_stream(AVFormatContext *oc) | |||||
if( (video_global_header&1) | if( (video_global_header&1) | ||||
|| (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))){ | || (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))){ | ||||
video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; | video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; | ||||
avcodec_opts[CODEC_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER; | |||||
avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER; | |||||
} | } | ||||
if(video_global_header&2){ | if(video_global_header&2){ | ||||
video_enc->flags2 |= CODEC_FLAG2_LOCAL_HEADER; | video_enc->flags2 |= CODEC_FLAG2_LOCAL_HEADER; | ||||
avcodec_opts[CODEC_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER; | |||||
avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER; | |||||
} | } | ||||
if (video_stream_copy) { | if (video_stream_copy) { | ||||
st->stream_copy = 1; | st->stream_copy = 1; | ||||
video_enc->codec_type = CODEC_TYPE_VIDEO; | |||||
video_enc->codec_type = AVMEDIA_TYPE_VIDEO; | |||||
video_enc->sample_aspect_ratio = | video_enc->sample_aspect_ratio = | ||||
st->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255); | st->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255); | ||||
} else { | } else { | ||||
@@ -3196,17 +3196,17 @@ static void new_video_stream(AVFormatContext *oc) | |||||
AVRational fps= frame_rate.num ? frame_rate : (AVRational){25,1}; | AVRational fps= frame_rate.num ? frame_rate : (AVRational){25,1}; | ||||
if (video_codec_name) { | if (video_codec_name) { | ||||
codec_id = find_codec_or_die(video_codec_name, CODEC_TYPE_VIDEO, 1); | |||||
codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1); | |||||
codec = avcodec_find_encoder_by_name(video_codec_name); | codec = avcodec_find_encoder_by_name(video_codec_name); | ||||
output_codecs[nb_ocodecs] = codec; | output_codecs[nb_ocodecs] = codec; | ||||
} else { | } else { | ||||
codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO); | |||||
codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO); | |||||
codec = avcodec_find_encoder(codec_id); | codec = avcodec_find_encoder(codec_id); | ||||
} | } | ||||
video_enc->codec_id = codec_id; | video_enc->codec_id = codec_id; | ||||
set_context_opts(video_enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | |||||
set_context_opts(video_enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | |||||
if (codec && codec->supported_framerates && !force_fps) | if (codec && codec->supported_framerates && !force_fps) | ||||
fps = codec->supported_framerates[av_find_nearest_q_idx(fps, codec->supported_framerates)]; | fps = codec->supported_framerates[av_find_nearest_q_idx(fps, codec->supported_framerates)]; | ||||
@@ -3300,7 +3300,7 @@ static void new_audio_stream(AVFormatContext *oc) | |||||
fprintf(stderr, "Could not alloc stream\n"); | fprintf(stderr, "Could not alloc stream\n"); | ||||
av_exit(1); | av_exit(1); | ||||
} | } | ||||
avcodec_get_context_defaults2(st->codec, CODEC_TYPE_AUDIO); | |||||
avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_AUDIO); | |||||
bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters; | bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters; | ||||
audio_bitstream_filters= NULL; | audio_bitstream_filters= NULL; | ||||
@@ -3308,14 +3308,14 @@ static void new_audio_stream(AVFormatContext *oc) | |||||
avcodec_thread_init(st->codec, thread_count); | avcodec_thread_init(st->codec, thread_count); | ||||
audio_enc = st->codec; | audio_enc = st->codec; | ||||
audio_enc->codec_type = CODEC_TYPE_AUDIO; | |||||
audio_enc->codec_type = AVMEDIA_TYPE_AUDIO; | |||||
if(audio_codec_tag) | if(audio_codec_tag) | ||||
audio_enc->codec_tag= audio_codec_tag; | audio_enc->codec_tag= audio_codec_tag; | ||||
if (oc->oformat->flags & AVFMT_GLOBALHEADER) { | if (oc->oformat->flags & AVFMT_GLOBALHEADER) { | ||||
audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; | audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; | ||||
avcodec_opts[CODEC_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER; | |||||
avcodec_opts[AVMEDIA_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER; | |||||
} | } | ||||
if (audio_stream_copy) { | if (audio_stream_copy) { | ||||
st->stream_copy = 1; | st->stream_copy = 1; | ||||
@@ -3323,14 +3323,14 @@ static void new_audio_stream(AVFormatContext *oc) | |||||
} else { | } else { | ||||
AVCodec *codec; | AVCodec *codec; | ||||
set_context_opts(audio_enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | |||||
set_context_opts(audio_enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | |||||
if (audio_codec_name) { | if (audio_codec_name) { | ||||
codec_id = find_codec_or_die(audio_codec_name, CODEC_TYPE_AUDIO, 1); | |||||
codec_id = find_codec_or_die(audio_codec_name, AVMEDIA_TYPE_AUDIO, 1); | |||||
codec = avcodec_find_encoder_by_name(audio_codec_name); | codec = avcodec_find_encoder_by_name(audio_codec_name); | ||||
output_codecs[nb_ocodecs] = codec; | output_codecs[nb_ocodecs] = codec; | ||||
} else { | } else { | ||||
codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_AUDIO); | |||||
codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_AUDIO); | |||||
codec = avcodec_find_encoder(codec_id); | codec = avcodec_find_encoder(codec_id); | ||||
} | } | ||||
audio_enc->codec_id = codec_id; | audio_enc->codec_id = codec_id; | ||||
@@ -3370,13 +3370,13 @@ static void new_subtitle_stream(AVFormatContext *oc) | |||||
fprintf(stderr, "Could not alloc stream\n"); | fprintf(stderr, "Could not alloc stream\n"); | ||||
av_exit(1); | av_exit(1); | ||||
} | } | ||||
avcodec_get_context_defaults2(st->codec, CODEC_TYPE_SUBTITLE); | |||||
avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_SUBTITLE); | |||||
bitstream_filters[nb_output_files][oc->nb_streams - 1]= subtitle_bitstream_filters; | bitstream_filters[nb_output_files][oc->nb_streams - 1]= subtitle_bitstream_filters; | ||||
subtitle_bitstream_filters= NULL; | subtitle_bitstream_filters= NULL; | ||||
subtitle_enc = st->codec; | subtitle_enc = st->codec; | ||||
subtitle_enc->codec_type = CODEC_TYPE_SUBTITLE; | |||||
subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE; | |||||
if(subtitle_codec_tag) | if(subtitle_codec_tag) | ||||
subtitle_enc->codec_tag= subtitle_codec_tag; | subtitle_enc->codec_tag= subtitle_codec_tag; | ||||
@@ -3384,8 +3384,8 @@ static void new_subtitle_stream(AVFormatContext *oc) | |||||
if (subtitle_stream_copy) { | if (subtitle_stream_copy) { | ||||
st->stream_copy = 1; | st->stream_copy = 1; | ||||
} else { | } else { | ||||
set_context_opts(avcodec_opts[CODEC_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | |||||
subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 1); | |||||
set_context_opts(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM); | |||||
subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 1); | |||||
output_codecs[nb_ocodecs] = avcodec_find_encoder_by_name(subtitle_codec_name); | output_codecs[nb_ocodecs] = avcodec_find_encoder_by_name(subtitle_codec_name); | ||||
} | } | ||||
nb_ocodecs++; | nb_ocodecs++; | ||||
@@ -3739,7 +3739,7 @@ static void opt_target(const char *arg) | |||||
for(j = 0; j < nb_input_files; j++) { | for(j = 0; j < nb_input_files; j++) { | ||||
for(i = 0; i < input_files[j]->nb_streams; i++) { | for(i = 0; i < input_files[j]->nb_streams; i++) { | ||||
AVCodecContext *c = input_files[j]->streams[i]->codec; | AVCodecContext *c = input_files[j]->streams[i]->codec; | ||||
if(c->codec_type != CODEC_TYPE_VIDEO) | |||||
if(c->codec_type != AVMEDIA_TYPE_VIDEO) | |||||
continue; | continue; | ||||
fr = c->time_base.den * 1000 / c->time_base.num; | fr = c->time_base.den * 1000 / c->time_base.num; | ||||
if(fr == 25000) { | if(fr == 25000) { | ||||
@@ -3965,7 +3965,7 @@ static const OptionDef options[] = { | |||||
{ "itsscale", HAS_ARG, {(void*)opt_input_ts_scale}, "set the input ts scale", "stream:scale" }, | { "itsscale", HAS_ARG, {(void*)opt_input_ts_scale}, "set the input ts scale", "stream:scale" }, | ||||
{ "timestamp", OPT_FUNC2 | HAS_ARG, {(void*)opt_rec_timestamp}, "set the timestamp ('now' to set the current time)", "time" }, | { "timestamp", OPT_FUNC2 | HAS_ARG, {(void*)opt_rec_timestamp}, "set the timestamp ('now' to set the current time)", "time" }, | ||||
{ "metadata", OPT_FUNC2 | HAS_ARG, {(void*)opt_metadata}, "add metadata", "string=string" }, | { "metadata", OPT_FUNC2 | HAS_ARG, {(void*)opt_metadata}, "add metadata", "string=string" }, | ||||
{ "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[CODEC_TYPE_DATA]}, "set the number of data frames to record", "number" }, | |||||
{ "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[AVMEDIA_TYPE_DATA]}, "set the number of data frames to record", "number" }, | |||||
{ "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark}, | { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark}, | ||||
"add timings for benchmarking" }, | "add timings for benchmarking" }, | ||||
{ "timelimit", OPT_FUNC2 | HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" }, | { "timelimit", OPT_FUNC2 | HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" }, | ||||
@@ -3993,7 +3993,7 @@ static const OptionDef options[] = { | |||||
/* video options */ | /* video options */ | ||||
{ "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | ||||
{ "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | { "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | ||||
{ "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[CODEC_TYPE_VIDEO]}, "set the number of video frames to record", "number" }, | |||||
{ "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[AVMEDIA_TYPE_VIDEO]}, "set the number of video frames to record", "number" }, | |||||
{ "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame rate (Hz value, fraction or abbreviation)", "rate" }, | { "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame rate (Hz value, fraction or abbreviation)", "rate" }, | ||||
{ "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" }, | { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" }, | ||||
{ "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, | { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, | ||||
@@ -4035,7 +4035,7 @@ static const OptionDef options[] = { | |||||
/* audio options */ | /* audio options */ | ||||
{ "ab", OPT_FUNC2 | HAS_ARG | OPT_AUDIO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | { "ab", OPT_FUNC2 | HAS_ARG | OPT_AUDIO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, | ||||
{ "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[CODEC_TYPE_AUDIO]}, "set the number of audio frames to record", "number" }, | |||||
{ "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[AVMEDIA_TYPE_AUDIO]}, "set the number of audio frames to record", "number" }, | |||||
{ "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", }, | { "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", }, | ||||
{ "ar", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" }, | { "ar", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" }, | ||||
{ "ac", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_channels}, "set number of audio channels", "channels" }, | { "ac", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_channels}, "set number of audio channels", "channels" }, | ||||
@@ -4090,7 +4090,7 @@ int main(int argc, char **argv) | |||||
url_set_interrupt_cb(decode_interrupt_cb); | url_set_interrupt_cb(decode_interrupt_cb); | ||||
#endif | #endif | ||||
for(i=0; i<CODEC_TYPE_NB; i++){ | |||||
for(i=0; i<AVMEDIA_TYPE_NB; i++){ | |||||
avcodec_opts[i]= avcodec_alloc_context2(i); | avcodec_opts[i]= avcodec_alloc_context2(i); | ||||
} | } | ||||
avformat_opts = avformat_alloc_context(); | avformat_opts = avformat_alloc_context(); | ||||
@@ -234,10 +234,10 @@ static int frame_height = 0; | |||||
static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE; | static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE; | ||||
static int audio_disable; | static int audio_disable; | ||||
static int video_disable; | static int video_disable; | ||||
static int wanted_stream[CODEC_TYPE_NB]={ | |||||
[CODEC_TYPE_AUDIO]=-1, | |||||
[CODEC_TYPE_VIDEO]=-1, | |||||
[CODEC_TYPE_SUBTITLE]=-1, | |||||
static int wanted_stream[AVMEDIA_TYPE_NB]={ | |||||
[AVMEDIA_TYPE_AUDIO]=-1, | |||||
[AVMEDIA_TYPE_VIDEO]=-1, | |||||
[AVMEDIA_TYPE_SUBTITLE]=-1, | |||||
}; | }; | ||||
static int seek_by_bytes=-1; | static int seek_by_bytes=-1; | ||||
static int display_disable; | static int display_disable; | ||||
@@ -1643,7 +1643,7 @@ static AVFilter input_filter = | |||||
.inputs = (AVFilterPad[]) {{ .name = NULL }}, | .inputs = (AVFilterPad[]) {{ .name = NULL }}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.request_frame = input_request_frame, | .request_frame = input_request_frame, | ||||
.config_props = input_config_props, }, | .config_props = input_config_props, }, | ||||
{ .name = NULL }}, | { .name = NULL }}, | ||||
@@ -1689,7 +1689,7 @@ static AVFilter output_filter = | |||||
.query_formats = output_query_formats, | .query_formats = output_query_formats, | ||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.end_frame = output_end_frame, | .end_frame = output_end_frame, | ||||
.min_perms = AV_PERM_READ, }, | .min_perms = AV_PERM_READ, }, | ||||
{ .name = NULL }}, | { .name = NULL }}, | ||||
@@ -2122,7 +2122,7 @@ static int stream_component_open(VideoState *is, int stream_index) | |||||
avctx = ic->streams[stream_index]->codec; | avctx = ic->streams[stream_index]->codec; | ||||
/* prepare audio output */ | /* prepare audio output */ | ||||
if (avctx->codec_type == CODEC_TYPE_AUDIO) { | |||||
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { | |||||
if (avctx->channels > 0) { | if (avctx->channels > 0) { | ||||
avctx->request_channels = FFMIN(2, avctx->channels); | avctx->request_channels = FFMIN(2, avctx->channels); | ||||
} else { | } else { | ||||
@@ -2152,7 +2152,7 @@ static int stream_component_open(VideoState *is, int stream_index) | |||||
return -1; | return -1; | ||||
/* prepare audio output */ | /* prepare audio output */ | ||||
if (avctx->codec_type == CODEC_TYPE_AUDIO) { | |||||
if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { | |||||
wanted_spec.freq = avctx->sample_rate; | wanted_spec.freq = avctx->sample_rate; | ||||
wanted_spec.format = AUDIO_S16SYS; | wanted_spec.format = AUDIO_S16SYS; | ||||
wanted_spec.channels = avctx->channels; | wanted_spec.channels = avctx->channels; | ||||
@@ -2170,7 +2170,7 @@ static int stream_component_open(VideoState *is, int stream_index) | |||||
ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; | ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; | ||||
switch(avctx->codec_type) { | switch(avctx->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
is->audio_stream = stream_index; | is->audio_stream = stream_index; | ||||
is->audio_st = ic->streams[stream_index]; | is->audio_st = ic->streams[stream_index]; | ||||
is->audio_buf_size = 0; | is->audio_buf_size = 0; | ||||
@@ -2187,7 +2187,7 @@ static int stream_component_open(VideoState *is, int stream_index) | |||||
packet_queue_init(&is->audioq); | packet_queue_init(&is->audioq); | ||||
SDL_PauseAudio(0); | SDL_PauseAudio(0); | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
is->video_stream = stream_index; | is->video_stream = stream_index; | ||||
is->video_st = ic->streams[stream_index]; | is->video_st = ic->streams[stream_index]; | ||||
@@ -2196,7 +2196,7 @@ static int stream_component_open(VideoState *is, int stream_index) | |||||
packet_queue_init(&is->videoq); | packet_queue_init(&is->videoq); | ||||
is->video_tid = SDL_CreateThread(video_thread, is); | is->video_tid = SDL_CreateThread(video_thread, is); | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
is->subtitle_stream = stream_index; | is->subtitle_stream = stream_index; | ||||
is->subtitle_st = ic->streams[stream_index]; | is->subtitle_st = ic->streams[stream_index]; | ||||
packet_queue_init(&is->subtitleq); | packet_queue_init(&is->subtitleq); | ||||
@@ -2219,7 +2219,7 @@ static void stream_component_close(VideoState *is, int stream_index) | |||||
avctx = ic->streams[stream_index]->codec; | avctx = ic->streams[stream_index]->codec; | ||||
switch(avctx->codec_type) { | switch(avctx->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
packet_queue_abort(&is->audioq); | packet_queue_abort(&is->audioq); | ||||
SDL_CloseAudio(); | SDL_CloseAudio(); | ||||
@@ -2229,7 +2229,7 @@ static void stream_component_close(VideoState *is, int stream_index) | |||||
av_audio_convert_free(is->reformat_ctx); | av_audio_convert_free(is->reformat_ctx); | ||||
is->reformat_ctx = NULL; | is->reformat_ctx = NULL; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
packet_queue_abort(&is->videoq); | packet_queue_abort(&is->videoq); | ||||
/* note: we also signal this mutex to make sure we deblock the | /* note: we also signal this mutex to make sure we deblock the | ||||
@@ -2242,7 +2242,7 @@ static void stream_component_close(VideoState *is, int stream_index) | |||||
packet_queue_end(&is->videoq); | packet_queue_end(&is->videoq); | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
packet_queue_abort(&is->subtitleq); | packet_queue_abort(&is->subtitleq); | ||||
/* note: we also signal this mutex to make sure we deblock the | /* note: we also signal this mutex to make sure we deblock the | ||||
@@ -2264,15 +2264,15 @@ static void stream_component_close(VideoState *is, int stream_index) | |||||
ic->streams[stream_index]->discard = AVDISCARD_ALL; | ic->streams[stream_index]->discard = AVDISCARD_ALL; | ||||
avcodec_close(avctx); | avcodec_close(avctx); | ||||
switch(avctx->codec_type) { | switch(avctx->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
is->audio_st = NULL; | is->audio_st = NULL; | ||||
is->audio_stream = -1; | is->audio_stream = -1; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
is->video_st = NULL; | is->video_st = NULL; | ||||
is->video_stream = -1; | is->video_stream = -1; | ||||
break; | break; | ||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
is->subtitle_st = NULL; | is->subtitle_st = NULL; | ||||
is->subtitle_stream = -1; | is->subtitle_stream = -1; | ||||
break; | break; | ||||
@@ -2296,9 +2296,9 @@ static int decode_thread(void *arg) | |||||
VideoState *is = arg; | VideoState *is = arg; | ||||
AVFormatContext *ic; | AVFormatContext *ic; | ||||
int err, i, ret; | int err, i, ret; | ||||
int st_index[CODEC_TYPE_NB]; | |||||
int st_count[CODEC_TYPE_NB]={0}; | |||||
int st_best_packet_count[CODEC_TYPE_NB]; | |||||
int st_index[AVMEDIA_TYPE_NB]; | |||||
int st_count[AVMEDIA_TYPE_NB]={0}; | |||||
int st_best_packet_count[AVMEDIA_TYPE_NB]; | |||||
AVPacket pkt1, *pkt = &pkt1; | AVPacket pkt1, *pkt = &pkt1; | ||||
AVFormatParameters params, *ap = ¶ms; | AVFormatParameters params, *ap = ¶ms; | ||||
int eof=0; | int eof=0; | ||||
@@ -2366,7 +2366,7 @@ static int decode_thread(void *arg) | |||||
AVStream *st= ic->streams[i]; | AVStream *st= ic->streams[i]; | ||||
AVCodecContext *avctx = st->codec; | AVCodecContext *avctx = st->codec; | ||||
ic->streams[i]->discard = AVDISCARD_ALL; | ic->streams[i]->discard = AVDISCARD_ALL; | ||||
if(avctx->codec_type >= (unsigned)CODEC_TYPE_NB) | |||||
if(avctx->codec_type >= (unsigned)AVMEDIA_TYPE_NB) | |||||
continue; | continue; | ||||
if(st_count[avctx->codec_type]++ != wanted_stream[avctx->codec_type] && wanted_stream[avctx->codec_type] >= 0) | if(st_count[avctx->codec_type]++ != wanted_stream[avctx->codec_type] && wanted_stream[avctx->codec_type] >= 0) | ||||
continue; | continue; | ||||
@@ -2376,12 +2376,12 @@ static int decode_thread(void *arg) | |||||
st_best_packet_count[avctx->codec_type]= st->codec_info_nb_frames; | st_best_packet_count[avctx->codec_type]= st->codec_info_nb_frames; | ||||
switch(avctx->codec_type) { | switch(avctx->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
if (!audio_disable) | if (!audio_disable) | ||||
st_index[CODEC_TYPE_AUDIO] = i; | |||||
st_index[AVMEDIA_TYPE_AUDIO] = i; | |||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
if (!video_disable) | if (!video_disable) | ||||
st_index[avctx->codec_type] = i; | st_index[avctx->codec_type] = i; | ||||
break; | break; | ||||
@@ -2394,13 +2394,13 @@ static int decode_thread(void *arg) | |||||
} | } | ||||
/* open the streams */ | /* open the streams */ | ||||
if (st_index[CODEC_TYPE_AUDIO] >= 0) { | |||||
stream_component_open(is, st_index[CODEC_TYPE_AUDIO]); | |||||
if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) { | |||||
stream_component_open(is, st_index[AVMEDIA_TYPE_AUDIO]); | |||||
} | } | ||||
ret=-1; | ret=-1; | ||||
if (st_index[CODEC_TYPE_VIDEO] >= 0) { | |||||
ret= stream_component_open(is, st_index[CODEC_TYPE_VIDEO]); | |||||
if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) { | |||||
ret= stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]); | |||||
} | } | ||||
is->refresh_tid = SDL_CreateThread(refresh_thread, is); | is->refresh_tid = SDL_CreateThread(refresh_thread, is); | ||||
if(ret<0) { | if(ret<0) { | ||||
@@ -2408,8 +2408,8 @@ static int decode_thread(void *arg) | |||||
is->show_audio = 2; | is->show_audio = 2; | ||||
} | } | ||||
if (st_index[CODEC_TYPE_SUBTITLE] >= 0) { | |||||
stream_component_open(is, st_index[CODEC_TYPE_SUBTITLE]); | |||||
if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) { | |||||
stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]); | |||||
} | } | ||||
if (is->video_stream < 0 && is->audio_stream < 0) { | if (is->video_stream < 0 && is->audio_stream < 0) { | ||||
@@ -2612,19 +2612,19 @@ static void stream_cycle_channel(VideoState *is, int codec_type) | |||||
int start_index, stream_index; | int start_index, stream_index; | ||||
AVStream *st; | AVStream *st; | ||||
if (codec_type == CODEC_TYPE_VIDEO) | |||||
if (codec_type == AVMEDIA_TYPE_VIDEO) | |||||
start_index = is->video_stream; | start_index = is->video_stream; | ||||
else if (codec_type == CODEC_TYPE_AUDIO) | |||||
else if (codec_type == AVMEDIA_TYPE_AUDIO) | |||||
start_index = is->audio_stream; | start_index = is->audio_stream; | ||||
else | else | ||||
start_index = is->subtitle_stream; | start_index = is->subtitle_stream; | ||||
if (start_index < (codec_type == CODEC_TYPE_SUBTITLE ? -1 : 0)) | |||||
if (start_index < (codec_type == AVMEDIA_TYPE_SUBTITLE ? -1 : 0)) | |||||
return; | return; | ||||
stream_index = start_index; | stream_index = start_index; | ||||
for(;;) { | for(;;) { | ||||
if (++stream_index >= is->ic->nb_streams) | if (++stream_index >= is->ic->nb_streams) | ||||
{ | { | ||||
if (codec_type == CODEC_TYPE_SUBTITLE) | |||||
if (codec_type == AVMEDIA_TYPE_SUBTITLE) | |||||
{ | { | ||||
stream_index = -1; | stream_index = -1; | ||||
goto the_end; | goto the_end; | ||||
@@ -2637,13 +2637,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type) | |||||
if (st->codec->codec_type == codec_type) { | if (st->codec->codec_type == codec_type) { | ||||
/* check that parameters are OK */ | /* check that parameters are OK */ | ||||
switch(codec_type) { | switch(codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
if (st->codec->sample_rate != 0 && | if (st->codec->sample_rate != 0 && | ||||
st->codec->channels != 0) | st->codec->channels != 0) | ||||
goto the_end; | goto the_end; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case CODEC_TYPE_SUBTITLE: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_SUBTITLE: | |||||
goto the_end; | goto the_end; | ||||
default: | default: | ||||
break; | break; | ||||
@@ -2690,7 +2690,7 @@ static void do_exit(void) | |||||
stream_close(cur_stream); | stream_close(cur_stream); | ||||
cur_stream = NULL; | cur_stream = NULL; | ||||
} | } | ||||
for (i = 0; i < CODEC_TYPE_NB; i++) | |||||
for (i = 0; i < AVMEDIA_TYPE_NB; i++) | |||||
av_free(avcodec_opts[i]); | av_free(avcodec_opts[i]); | ||||
av_free(avformat_opts); | av_free(avformat_opts); | ||||
av_free(sws_opts); | av_free(sws_opts); | ||||
@@ -2743,15 +2743,15 @@ static void event_loop(void) | |||||
break; | break; | ||||
case SDLK_a: | case SDLK_a: | ||||
if (cur_stream) | if (cur_stream) | ||||
stream_cycle_channel(cur_stream, CODEC_TYPE_AUDIO); | |||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_AUDIO); | |||||
break; | break; | ||||
case SDLK_v: | case SDLK_v: | ||||
if (cur_stream) | if (cur_stream) | ||||
stream_cycle_channel(cur_stream, CODEC_TYPE_VIDEO); | |||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO); | |||||
break; | break; | ||||
case SDLK_t: | case SDLK_t: | ||||
if (cur_stream) | if (cur_stream) | ||||
stream_cycle_channel(cur_stream, CODEC_TYPE_SUBTITLE); | |||||
stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE); | |||||
break; | break; | ||||
case SDLK_w: | case SDLK_w: | ||||
toggle_audio_display(); | toggle_audio_display(); | ||||
@@ -2943,9 +2943,9 @@ static const OptionDef options[] = { | |||||
{ "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" }, | { "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" }, | ||||
{ "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" }, | { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" }, | ||||
{ "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" }, | { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" }, | ||||
{ "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_AUDIO]}, "select desired audio stream", "stream_number" }, | |||||
{ "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_VIDEO]}, "select desired video stream", "stream_number" }, | |||||
{ "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" }, | |||||
{ "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_AUDIO]}, "select desired audio stream", "stream_number" }, | |||||
{ "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_VIDEO]}, "select desired video stream", "stream_number" }, | |||||
{ "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" }, | |||||
{ "ss", HAS_ARG | OPT_FUNC2, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" }, | { "ss", HAS_ARG | OPT_FUNC2, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" }, | ||||
{ "bytes", OPT_INT | HAS_ARG, {(void*)&seek_by_bytes}, "seek by bytes 0=off 1=on -1=auto", "val" }, | { "bytes", OPT_INT | HAS_ARG, {(void*)&seek_by_bytes}, "seek by bytes 0=off 1=on -1=auto", "val" }, | ||||
{ "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" }, | { "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" }, | ||||
@@ -3032,7 +3032,7 @@ int main(int argc, char **argv) | |||||
#endif | #endif | ||||
av_register_all(); | av_register_all(); | ||||
for(i=0; i<CODEC_TYPE_NB; i++){ | |||||
for(i=0; i<AVMEDIA_TYPE_NB; i++){ | |||||
avcodec_opts[i]= avcodec_alloc_context2(i); | avcodec_opts[i]= avcodec_alloc_context2(i); | ||||
} | } | ||||
avformat_opts = avformat_alloc_context(); | avformat_opts = avformat_alloc_context(); | ||||
@@ -101,14 +101,14 @@ static char *time_value_string(char *buf, int buf_size, int64_t val, const AVRat | |||||
return buf; | return buf; | ||||
} | } | ||||
static const char *codec_type_string(enum CodecType codec_type) | |||||
static const char *media_type_string(enum AVMediaType media_type) | |||||
{ | { | ||||
switch (codec_type) { | |||||
case CODEC_TYPE_VIDEO: return "video"; | |||||
case CODEC_TYPE_AUDIO: return "audio"; | |||||
case CODEC_TYPE_DATA: return "data"; | |||||
case CODEC_TYPE_SUBTITLE: return "subtitle"; | |||||
case CODEC_TYPE_ATTACHMENT: return "attachment"; | |||||
switch (media_type) { | |||||
case AVMEDIA_TYPE_VIDEO: return "video"; | |||||
case AVMEDIA_TYPE_AUDIO: return "audio"; | |||||
case AVMEDIA_TYPE_DATA: return "data"; | |||||
case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; | |||||
case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; | |||||
default: return "unknown"; | default: return "unknown"; | ||||
} | } | ||||
} | } | ||||
@@ -134,7 +134,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) | |||||
printf("codec_name=unknown\n"); | printf("codec_name=unknown\n"); | ||||
} | } | ||||
printf("codec_type=%s\n", codec_type_string(dec_ctx->codec_type)); | |||||
printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type)); | |||||
printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den); | printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den); | ||||
/* print AVI/FourCC tag */ | /* print AVI/FourCC tag */ | ||||
@@ -150,7 +150,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) | |||||
printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag); | printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag); | ||||
switch (dec_ctx->codec_type) { | switch (dec_ctx->codec_type) { | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
printf("width=%d\n", dec_ctx->width); | printf("width=%d\n", dec_ctx->width); | ||||
printf("height=%d\n", dec_ctx->height); | printf("height=%d\n", dec_ctx->height); | ||||
printf("has_b_frames=%d\n", dec_ctx->has_b_frames); | printf("has_b_frames=%d\n", dec_ctx->has_b_frames); | ||||
@@ -162,7 +162,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) | |||||
av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); | av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); | ||||
break; | break; | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str), | printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str), | ||||
dec_ctx->sample_rate, | dec_ctx->sample_rate, | ||||
unit_hertz_str)); | unit_hertz_str)); | ||||
@@ -1805,7 +1805,7 @@ static void compute_status(HTTPContext *c) | |||||
AVStream *st = stream->streams[i]; | AVStream *st = stream->streams[i]; | ||||
AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); | AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); | ||||
switch(st->codec->codec_type) { | switch(st->codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
audio_bit_rate += st->codec->bit_rate; | audio_bit_rate += st->codec->bit_rate; | ||||
if (codec) { | if (codec) { | ||||
if (*audio_codec_name) | if (*audio_codec_name) | ||||
@@ -1813,7 +1813,7 @@ static void compute_status(HTTPContext *c) | |||||
audio_codec_name = codec->name; | audio_codec_name = codec->name; | ||||
} | } | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
video_bit_rate += st->codec->bit_rate; | video_bit_rate += st->codec->bit_rate; | ||||
if (codec) { | if (codec) { | ||||
if (*video_codec_name) | if (*video_codec_name) | ||||
@@ -1821,7 +1821,7 @@ static void compute_status(HTTPContext *c) | |||||
video_codec_name = codec->name; | video_codec_name = codec->name; | ||||
} | } | ||||
break; | break; | ||||
case CODEC_TYPE_DATA: | |||||
case AVMEDIA_TYPE_DATA: | |||||
video_bit_rate += st->codec->bit_rate; | video_bit_rate += st->codec->bit_rate; | ||||
break; | break; | ||||
default: | default: | ||||
@@ -1894,11 +1894,11 @@ static void compute_status(HTTPContext *c) | |||||
parameters[0] = 0; | parameters[0] = 0; | ||||
switch(st->codec->codec_type) { | switch(st->codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
type = "audio"; | type = "audio"; | ||||
snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate); | snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate); | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
type = "video"; | type = "video"; | ||||
snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height, | snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height, | ||||
st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); | st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); | ||||
@@ -2047,7 +2047,7 @@ static int open_input_stream(HTTPContext *c, const char *info) | |||||
c->pts_stream_index = 0; | c->pts_stream_index = 0; | ||||
for(i=0;i<c->stream->nb_streams;i++) { | for(i=0;i<c->stream->nb_streams;i++) { | ||||
if (c->pts_stream_index == 0 && | if (c->pts_stream_index == 0 && | ||||
c->stream->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) { | |||||
c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { | |||||
c->pts_stream_index = i; | c->pts_stream_index = i; | ||||
} | } | ||||
} | } | ||||
@@ -2210,7 +2210,7 @@ static int http_prepare_data(HTTPContext *c) | |||||
AVStream *st = c->fmt_in->streams[source_index]; | AVStream *st = c->fmt_in->streams[source_index]; | ||||
pkt.stream_index = i; | pkt.stream_index = i; | ||||
if (pkt.flags & PKT_FLAG_KEY && | if (pkt.flags & PKT_FLAG_KEY && | ||||
(st->codec->codec_type == CODEC_TYPE_VIDEO || | |||||
(st->codec->codec_type == AVMEDIA_TYPE_VIDEO || | |||||
c->stream->nb_streams == 1)) | c->stream->nb_streams == 1)) | ||||
c->got_key_frame = 1; | c->got_key_frame = 1; | ||||
if (!c->stream->send_on_key || c->got_key_frame) | if (!c->stream->send_on_key || c->got_key_frame) | ||||
@@ -3346,12 +3346,12 @@ static int add_av_stream(FFStream *feed, AVStream *st) | |||||
av1->bit_rate == av->bit_rate) { | av1->bit_rate == av->bit_rate) { | ||||
switch(av->codec_type) { | switch(av->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
if (av1->channels == av->channels && | if (av1->channels == av->channels && | ||||
av1->sample_rate == av->sample_rate) | av1->sample_rate == av->sample_rate) | ||||
goto found; | goto found; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
if (av1->width == av->width && | if (av1->width == av->width && | ||||
av1->height == av->height && | av1->height == av->height && | ||||
av1->time_base.den == av->time_base.den && | av1->time_base.den == av->time_base.den && | ||||
@@ -3549,7 +3549,7 @@ static void build_feed_streams(void) | |||||
} else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) { | } else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) { | ||||
http_log("Codec bitrates do not match for stream %d\n", i); | http_log("Codec bitrates do not match for stream %d\n", i); | ||||
matches = 0; | matches = 0; | ||||
} else if (ccf->codec_type == CODEC_TYPE_VIDEO) { | |||||
} else if (ccf->codec_type == AVMEDIA_TYPE_VIDEO) { | |||||
if (CHECK_CODEC(time_base.den) || | if (CHECK_CODEC(time_base.den) || | ||||
CHECK_CODEC(time_base.num) || | CHECK_CODEC(time_base.num) || | ||||
CHECK_CODEC(width) || | CHECK_CODEC(width) || | ||||
@@ -3557,7 +3557,7 @@ static void build_feed_streams(void) | |||||
http_log("Codec width, height and framerate do not match for stream %d\n", i); | http_log("Codec width, height and framerate do not match for stream %d\n", i); | ||||
matches = 0; | matches = 0; | ||||
} | } | ||||
} else if (ccf->codec_type == CODEC_TYPE_AUDIO) { | |||||
} else if (ccf->codec_type == AVMEDIA_TYPE_AUDIO) { | |||||
if (CHECK_CODEC(sample_rate) || | if (CHECK_CODEC(sample_rate) || | ||||
CHECK_CODEC(channels) || | CHECK_CODEC(channels) || | ||||
CHECK_CODEC(frame_size)) { | CHECK_CODEC(frame_size)) { | ||||
@@ -3651,8 +3651,8 @@ static void compute_bandwidth(void) | |||||
for(i=0;i<stream->nb_streams;i++) { | for(i=0;i<stream->nb_streams;i++) { | ||||
AVStream *st = stream->streams[i]; | AVStream *st = stream->streams[i]; | ||||
switch(st->codec->codec_type) { | switch(st->codec->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
bandwidth += st->codec->bit_rate; | bandwidth += st->codec->bit_rate; | ||||
break; | break; | ||||
default: | default: | ||||
@@ -3670,7 +3670,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) | |||||
/* compute default parameters */ | /* compute default parameters */ | ||||
switch(av->codec_type) { | switch(av->codec_type) { | ||||
case CODEC_TYPE_AUDIO: | |||||
case AVMEDIA_TYPE_AUDIO: | |||||
if (av->bit_rate == 0) | if (av->bit_rate == 0) | ||||
av->bit_rate = 64000; | av->bit_rate = 64000; | ||||
if (av->sample_rate == 0) | if (av->sample_rate == 0) | ||||
@@ -3678,7 +3678,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) | |||||
if (av->channels == 0) | if (av->channels == 0) | ||||
av->channels = 1; | av->channels = 1; | ||||
break; | break; | ||||
case CODEC_TYPE_VIDEO: | |||||
case AVMEDIA_TYPE_VIDEO: | |||||
if (av->bit_rate == 0) | if (av->bit_rate == 0) | ||||
av->bit_rate = 64000; | av->bit_rate = 64000; | ||||
if (av->time_base.num == 0){ | if (av->time_base.num == 0){ | ||||
@@ -3742,7 +3742,7 @@ static enum CodecID opt_audio_codec(const char *arg) | |||||
{ | { | ||||
AVCodec *p= avcodec_find_encoder_by_name(arg); | AVCodec *p= avcodec_find_encoder_by_name(arg); | ||||
if (p == NULL || p->type != CODEC_TYPE_AUDIO) | |||||
if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO) | |||||
return CODEC_ID_NONE; | return CODEC_ID_NONE; | ||||
return p->id; | return p->id; | ||||
@@ -3752,7 +3752,7 @@ static enum CodecID opt_video_codec(const char *arg) | |||||
{ | { | ||||
AVCodec *p= avcodec_find_encoder_by_name(arg); | AVCodec *p= avcodec_find_encoder_by_name(arg); | ||||
if (p == NULL || p->type != CODEC_TYPE_VIDEO) | |||||
if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO) | |||||
return CODEC_ID_NONE; | return CODEC_ID_NONE; | ||||
return p->id; | return p->id; | ||||
@@ -4445,12 +4445,12 @@ static int parse_ffconfig(const char *filename) | |||||
} else { | } else { | ||||
if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) { | if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) { | ||||
if (audio_id != CODEC_ID_NONE) { | if (audio_id != CODEC_ID_NONE) { | ||||
audio_enc.codec_type = CODEC_TYPE_AUDIO; | |||||
audio_enc.codec_type = AVMEDIA_TYPE_AUDIO; | |||||
audio_enc.codec_id = audio_id; | audio_enc.codec_id = audio_id; | ||||
add_codec(stream, &audio_enc); | add_codec(stream, &audio_enc); | ||||
} | } | ||||
if (video_id != CODEC_ID_NONE) { | if (video_id != CODEC_ID_NONE) { | ||||
video_enc.codec_type = CODEC_TYPE_VIDEO; | |||||
video_enc.codec_type = AVMEDIA_TYPE_VIDEO; | |||||
video_enc.codec_id = video_id; | video_enc.codec_id = video_id; | ||||
add_codec(stream, &video_enc); | add_codec(stream, &video_enc); | ||||
} | } | ||||
@@ -842,7 +842,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ | |||||
AVCodec fourxm_decoder = { | AVCodec fourxm_decoder = { | ||||
"4xm", | "4xm", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_4XM, | CODEC_ID_4XM, | ||||
sizeof(FourXContext), | sizeof(FourXContext), | ||||
decode_init, | decode_init, | ||||
@@ -221,7 +221,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec eightbps_decoder = { | AVCodec eightbps_decoder = { | ||||
"8bps", | "8bps", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_8BPS, | CODEC_ID_8BPS, | ||||
sizeof(EightBpsContext), | sizeof(EightBpsContext), | ||||
decode_init, | decode_init, | ||||
@@ -94,7 +94,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx) | |||||
AVCodec eightsvx_fib_decoder = { | AVCodec eightsvx_fib_decoder = { | ||||
.name = "8svx_fib", | .name = "8svx_fib", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_8SVX_FIB, | .id = CODEC_ID_8SVX_FIB, | ||||
.priv_data_size = sizeof (EightSvxContext), | .priv_data_size = sizeof (EightSvxContext), | ||||
.init = eightsvx_decode_init, | .init = eightsvx_decode_init, | ||||
@@ -104,7 +104,7 @@ AVCodec eightsvx_fib_decoder = { | |||||
AVCodec eightsvx_exp_decoder = { | AVCodec eightsvx_exp_decoder = { | ||||
.name = "8svx_exp", | .name = "8svx_exp", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_8SVX_EXP, | .id = CODEC_ID_8SVX_EXP, | ||||
.priv_data_size = sizeof (EightSvxContext), | .priv_data_size = sizeof (EightSvxContext), | ||||
.init = eightsvx_decode_init, | .init = eightsvx_decode_init, | ||||
@@ -2091,7 +2091,7 @@ static av_cold int aac_decode_close(AVCodecContext *avccontext) | |||||
AVCodec aac_decoder = { | AVCodec aac_decoder = { | ||||
"aac", | "aac", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_AAC, | CODEC_ID_AAC, | ||||
sizeof(AACContext), | sizeof(AACContext), | ||||
aac_decode_init, | aac_decode_init, | ||||
@@ -629,7 +629,7 @@ static av_cold int aac_encode_end(AVCodecContext *avctx) | |||||
AVCodec aac_encoder = { | AVCodec aac_encoder = { | ||||
"aac", | "aac", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_AAC, | CODEC_ID_AAC, | ||||
sizeof(AACEncContext), | sizeof(AACEncContext), | ||||
aac_encode_init, | aac_encode_init, | ||||
@@ -111,7 +111,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx) | |||||
AVCodec aasc_decoder = { | AVCodec aasc_decoder = { | ||||
"aasc", | "aasc", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_AASC, | CODEC_ID_AASC, | ||||
sizeof(AascContext), | sizeof(AascContext), | ||||
aasc_decode_init, | aasc_decode_init, | ||||
@@ -1439,7 +1439,7 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx) | |||||
AVCodec ac3_decoder = { | AVCodec ac3_decoder = { | ||||
.name = "ac3", | .name = "ac3", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_AC3, | .id = CODEC_ID_AC3, | ||||
.priv_data_size = sizeof (AC3DecodeContext), | .priv_data_size = sizeof (AC3DecodeContext), | ||||
.init = ac3_decode_init, | .init = ac3_decode_init, | ||||
@@ -1451,7 +1451,7 @@ AVCodec ac3_decoder = { | |||||
#if CONFIG_EAC3_DECODER | #if CONFIG_EAC3_DECODER | ||||
AVCodec eac3_decoder = { | AVCodec eac3_decoder = { | ||||
.name = "eac3", | .name = "eac3", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_EAC3, | .id = CODEC_ID_EAC3, | ||||
.priv_data_size = sizeof (AC3DecodeContext), | .priv_data_size = sizeof (AC3DecodeContext), | ||||
.init = ac3_decode_init, | .init = ac3_decode_init, | ||||
@@ -1393,7 +1393,7 @@ void test_ac3(void) | |||||
AVCodec ac3_encoder = { | AVCodec ac3_encoder = { | ||||
"ac3", | "ac3", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_AC3, | CODEC_ID_AC3, | ||||
sizeof(AC3EncodeContext), | sizeof(AC3EncodeContext), | ||||
AC3_encode_init, | AC3_encode_init, | ||||
@@ -1638,7 +1638,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, | |||||
#define ADPCM_ENCODER(id,name,long_name_) \ | #define ADPCM_ENCODER(id,name,long_name_) \ | ||||
AVCodec name ## _encoder = { \ | AVCodec name ## _encoder = { \ | ||||
#name, \ | #name, \ | ||||
CODEC_TYPE_AUDIO, \ | |||||
AVMEDIA_TYPE_AUDIO, \ | |||||
id, \ | id, \ | ||||
sizeof(ADPCMContext), \ | sizeof(ADPCMContext), \ | ||||
adpcm_encode_init, \ | adpcm_encode_init, \ | ||||
@@ -1656,7 +1656,7 @@ AVCodec name ## _encoder = { \ | |||||
#define ADPCM_DECODER(id,name,long_name_) \ | #define ADPCM_DECODER(id,name,long_name_) \ | ||||
AVCodec name ## _decoder = { \ | AVCodec name ## _decoder = { \ | ||||
#name, \ | #name, \ | ||||
CODEC_TYPE_AUDIO, \ | |||||
AVMEDIA_TYPE_AUDIO, \ | |||||
id, \ | id, \ | ||||
sizeof(ADPCMContext), \ | sizeof(ADPCMContext), \ | ||||
adpcm_decode_init, \ | adpcm_decode_init, \ | ||||
@@ -168,7 +168,7 @@ static int adx_decode_frame(AVCodecContext *avctx, | |||||
AVCodec adpcm_adx_decoder = { | AVCodec adpcm_adx_decoder = { | ||||
"adpcm_adx", | "adpcm_adx", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_ADPCM_ADX, | CODEC_ID_ADPCM_ADX, | ||||
sizeof(ADXContext), | sizeof(ADXContext), | ||||
adx_decode_init, | adx_decode_init, | ||||
@@ -185,7 +185,7 @@ static int adx_encode_frame(AVCodecContext *avctx, | |||||
AVCodec adpcm_adx_encoder = { | AVCodec adpcm_adx_encoder = { | ||||
"adpcm_adx", | "adpcm_adx", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_ADPCM_ADX, | CODEC_ID_ADPCM_ADX, | ||||
sizeof(ADXContext), | sizeof(ADXContext), | ||||
adx_encode_init, | adx_encode_init, | ||||
@@ -701,7 +701,7 @@ static av_cold int alac_decode_close(AVCodecContext *avctx) | |||||
AVCodec alac_decoder = { | AVCodec alac_decoder = { | ||||
"alac", | "alac", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_ALAC, | CODEC_ID_ALAC, | ||||
sizeof(ALACContext), | sizeof(ALACContext), | ||||
alac_decode_init, | alac_decode_init, | ||||
@@ -521,7 +521,7 @@ static av_cold int alac_encode_close(AVCodecContext *avctx) | |||||
AVCodec alac_encoder = { | AVCodec alac_encoder = { | ||||
"alac", | "alac", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_ALAC, | CODEC_ID_ALAC, | ||||
sizeof(AlacEncodeContext), | sizeof(AlacEncodeContext), | ||||
alac_encode_init, | alac_encode_init, | ||||
@@ -1622,7 +1622,7 @@ static av_cold void flush(AVCodecContext *avctx) | |||||
AVCodec als_decoder = { | AVCodec als_decoder = { | ||||
"als", | "als", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_MP4ALS, | CODEC_ID_MP4ALS, | ||||
sizeof(ALSDecContext), | sizeof(ALSDecContext), | ||||
decode_init, | decode_init, | ||||
@@ -1071,7 +1071,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | |||||
AVCodec amrnb_decoder = { | AVCodec amrnb_decoder = { | ||||
.name = "amrnb", | .name = "amrnb", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_AMR_NB, | .id = CODEC_ID_AMR_NB, | ||||
.priv_data_size = sizeof(AMRContext), | .priv_data_size = sizeof(AMRContext), | ||||
.init = amrnb_decode_init, | .init = amrnb_decode_init, | ||||
@@ -185,7 +185,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec anm_decoder = { | AVCodec anm_decoder = { | ||||
"anm", | "anm", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ANM, | CODEC_ID_ANM, | ||||
sizeof(AnmContext), | sizeof(AnmContext), | ||||
decode_init, | decode_init, | ||||
@@ -879,7 +879,7 @@ static int ape_decode_frame(AVCodecContext * avctx, | |||||
AVCodec ape_decoder = { | AVCodec ape_decoder = { | ||||
"ape", | "ape", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_APE, | CODEC_ID_APE, | ||||
sizeof(APEContext), | sizeof(APEContext), | ||||
ape_decode_init, | ape_decode_init, | ||||
@@ -615,7 +615,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ | |||||
AVCodec asv1_decoder = { | AVCodec asv1_decoder = { | ||||
"asv1", | "asv1", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ASV1, | CODEC_ID_ASV1, | ||||
sizeof(ASV1Context), | sizeof(ASV1Context), | ||||
decode_init, | decode_init, | ||||
@@ -628,7 +628,7 @@ AVCodec asv1_decoder = { | |||||
AVCodec asv2_decoder = { | AVCodec asv2_decoder = { | ||||
"asv2", | "asv2", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ASV2, | CODEC_ID_ASV2, | ||||
sizeof(ASV1Context), | sizeof(ASV1Context), | ||||
decode_init, | decode_init, | ||||
@@ -642,7 +642,7 @@ AVCodec asv2_decoder = { | |||||
#if CONFIG_ASV1_ENCODER | #if CONFIG_ASV1_ENCODER | ||||
AVCodec asv1_encoder = { | AVCodec asv1_encoder = { | ||||
"asv1", | "asv1", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ASV1, | CODEC_ID_ASV1, | ||||
sizeof(ASV1Context), | sizeof(ASV1Context), | ||||
encode_init, | encode_init, | ||||
@@ -656,7 +656,7 @@ AVCodec asv1_encoder = { | |||||
#if CONFIG_ASV2_ENCODER | #if CONFIG_ASV2_ENCODER | ||||
AVCodec asv2_encoder = { | AVCodec asv2_encoder = { | ||||
"asv2", | "asv2", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ASV2, | CODEC_ID_ASV2, | ||||
sizeof(ASV1Context), | sizeof(ASV1Context), | ||||
encode_init, | encode_init, | ||||
@@ -372,7 +372,7 @@ static av_cold int atrac1_decode_end(AVCodecContext * avctx) { | |||||
AVCodec atrac1_decoder = { | AVCodec atrac1_decoder = { | ||||
.name = "atrac1", | .name = "atrac1", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_ATRAC1, | .id = CODEC_ID_ATRAC1, | ||||
.priv_data_size = sizeof(AT1Ctx), | .priv_data_size = sizeof(AT1Ctx), | ||||
.init = atrac1_decode_init, | .init = atrac1_decode_init, | ||||
@@ -1016,7 +1016,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) | |||||
AVCodec atrac3_decoder = | AVCodec atrac3_decoder = | ||||
{ | { | ||||
.name = "atrac3", | .name = "atrac3", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_ATRAC3, | .id = CODEC_ID_ATRAC3, | ||||
.priv_data_size = sizeof(ATRAC3Context), | .priv_data_size = sizeof(ATRAC3Context), | ||||
.init = atrac3_decode_init, | .init = atrac3_decode_init, | ||||
@@ -124,7 +124,7 @@ static av_cold int aura_decode_end(AVCodecContext *avctx) | |||||
AVCodec aura2_decoder = { | AVCodec aura2_decoder = { | ||||
"aura2", | "aura2", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_AURA2, | CODEC_ID_AURA2, | ||||
sizeof(AuraDecodeContext), | sizeof(AuraDecodeContext), | ||||
aura_decode_init, | aura_decode_init, | ||||
@@ -30,7 +30,7 @@ | |||||
#include "libavutil/avutil.h" | #include "libavutil/avutil.h" | ||||
#define LIBAVCODEC_VERSION_MAJOR 52 | #define LIBAVCODEC_VERSION_MAJOR 52 | ||||
#define LIBAVCODEC_VERSION_MINOR 63 | |||||
#define LIBAVCODEC_VERSION_MINOR 64 | |||||
#define LIBAVCODEC_VERSION_MICRO 0 | #define LIBAVCODEC_VERSION_MICRO 0 | ||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | ||||
@@ -355,16 +355,28 @@ enum CodecID { | |||||
* stream (only used by libavformat) */ | * stream (only used by libavformat) */ | ||||
}; | }; | ||||
enum CodecType { | |||||
CODEC_TYPE_UNKNOWN = -1, | |||||
CODEC_TYPE_VIDEO, | |||||
CODEC_TYPE_AUDIO, | |||||
CODEC_TYPE_DATA, | |||||
CODEC_TYPE_SUBTITLE, | |||||
CODEC_TYPE_ATTACHMENT, | |||||
CODEC_TYPE_NB | |||||
enum AVMediaType { | |||||
AVMEDIA_TYPE_UNKNOWN = -1, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_DATA, | |||||
AVMEDIA_TYPE_SUBTITLE, | |||||
AVMEDIA_TYPE_ATTACHMENT, | |||||
AVMEDIA_TYPE_NB | |||||
}; | }; | ||||
#if LIBAVCODEC_VERSION_MAJOR < 53 | |||||
#define CodecType AVMediaType | |||||
#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN | |||||
#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO | |||||
#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO | |||||
#define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA | |||||
#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE | |||||
#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT | |||||
#define CODEC_TYPE_NB AVMEDIA_TYPE_NB | |||||
#endif | |||||
/** | /** | ||||
* all in native-endian format | * all in native-endian format | ||||
*/ | */ | ||||
@@ -1277,7 +1289,7 @@ typedef struct AVCodecContext { | |||||
void *opaque; | void *opaque; | ||||
char codec_name[32]; | char codec_name[32]; | ||||
enum CodecType codec_type; /* see CODEC_TYPE_xxx */ | |||||
enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */ | |||||
enum CodecID codec_id; /* see CODEC_ID_xxx */ | enum CodecID codec_id; /* see CODEC_ID_xxx */ | ||||
/** | /** | ||||
@@ -2657,7 +2669,7 @@ typedef struct AVCodec { | |||||
* This is the primary way to find a codec from the user perspective. | * This is the primary way to find a codec from the user perspective. | ||||
*/ | */ | ||||
const char *name; | const char *name; | ||||
enum CodecType type; | |||||
enum AVMediaType type; | |||||
enum CodecID id; | enum CodecID id; | ||||
int priv_data_size; | int priv_data_size; | ||||
int (*init)(AVCodecContext *); | int (*init)(AVCodecContext *); | ||||
@@ -2701,9 +2713,9 @@ typedef struct AVHWAccel { | |||||
/** | /** | ||||
* Type of codec implemented by the hardware accelerator. | * Type of codec implemented by the hardware accelerator. | ||||
* | * | ||||
* See CODEC_TYPE_xxx | |||||
* See AVMEDIA_TYPE_xxx | |||||
*/ | */ | ||||
enum CodecType type; | |||||
enum AVMediaType type; | |||||
/** | /** | ||||
* Codec implemented by the hardware accelerator. | * Codec implemented by the hardware accelerator. | ||||
@@ -3241,7 +3253,7 @@ void avcodec_get_context_defaults(AVCodecContext *s); | |||||
/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! | /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! | ||||
* we WILL change its arguments and name a few times! */ | * we WILL change its arguments and name a few times! */ | ||||
void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType); | |||||
void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType); | |||||
/** | /** | ||||
* Allocates an AVCodecContext and sets its fields to default values. The | * Allocates an AVCodecContext and sets its fields to default values. The | ||||
@@ -3254,7 +3266,7 @@ AVCodecContext *avcodec_alloc_context(void); | |||||
/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! | /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! | ||||
* we WILL change its arguments and name a few times! */ | * we WILL change its arguments and name a few times! */ | ||||
AVCodecContext *avcodec_alloc_context2(enum CodecType); | |||||
AVCodecContext *avcodec_alloc_context2(enum AVMediaType); | |||||
/** | /** | ||||
* Sets the fields of the given AVFrame to default values. | * Sets the fields of the given AVFrame to default values. | ||||
@@ -152,7 +152,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx) | |||||
AVCodec avs_decoder = { | AVCodec avs_decoder = { | ||||
"avs", | "avs", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_AVS, | CODEC_ID_AVS, | ||||
sizeof(AvsContext), | sizeof(AvsContext), | ||||
avs_decode_init, | avs_decode_init, | ||||
@@ -132,7 +132,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) | |||||
AVCodec bethsoftvid_decoder = { | AVCodec bethsoftvid_decoder = { | ||||
.name = "bethsoftvid", | .name = "bethsoftvid", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.id = CODEC_ID_BETHSOFTVID, | .id = CODEC_ID_BETHSOFTVID, | ||||
.priv_data_size = sizeof(BethsoftvidContext), | .priv_data_size = sizeof(BethsoftvidContext), | ||||
.init = bethsoftvid_decode_init, | .init = bethsoftvid_decode_init, | ||||
@@ -173,7 +173,7 @@ static av_cold int bfi_decode_close(AVCodecContext * avctx) | |||||
AVCodec bfi_decoder = { | AVCodec bfi_decoder = { | ||||
.name = "bfi", | .name = "bfi", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.id = CODEC_ID_BFI, | .id = CODEC_ID_BFI, | ||||
.priv_data_size = sizeof(BFIContext), | .priv_data_size = sizeof(BFIContext), | ||||
.init = bfi_decode_init, | .init = bfi_decode_init, | ||||
@@ -1001,7 +1001,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec bink_decoder = { | AVCodec bink_decoder = { | ||||
"binkvideo", | "binkvideo", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_BINKVIDEO, | CODEC_ID_BINKVIDEO, | ||||
sizeof(BinkContext), | sizeof(BinkContext), | ||||
decode_init, | decode_init, | ||||
@@ -288,7 +288,7 @@ static int decode_frame(AVCodecContext *avctx, | |||||
AVCodec binkaudio_rdft_decoder = { | AVCodec binkaudio_rdft_decoder = { | ||||
"binkaudio_rdft", | "binkaudio_rdft", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_BINKAUDIO_RDFT, | CODEC_ID_BINKAUDIO_RDFT, | ||||
sizeof(BinkAudioContext), | sizeof(BinkAudioContext), | ||||
decode_init, | decode_init, | ||||
@@ -300,7 +300,7 @@ AVCodec binkaudio_rdft_decoder = { | |||||
AVCodec binkaudio_dct_decoder = { | AVCodec binkaudio_dct_decoder = { | ||||
"binkaudio_dct", | "binkaudio_dct", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_BINKAUDIO_DCT, | CODEC_ID_BINKAUDIO_DCT, | ||||
sizeof(BinkAudioContext), | sizeof(BinkAudioContext), | ||||
decode_init, | decode_init, | ||||
@@ -337,7 +337,7 @@ static av_cold int bmp_decode_end(AVCodecContext *avctx) | |||||
AVCodec bmp_decoder = { | AVCodec bmp_decoder = { | ||||
"bmp", | "bmp", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_BMP, | CODEC_ID_BMP, | ||||
sizeof(BMPContext), | sizeof(BMPContext), | ||||
bmp_decode_init, | bmp_decode_init, | ||||
@@ -133,7 +133,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_s | |||||
AVCodec bmp_encoder = { | AVCodec bmp_encoder = { | ||||
"bmp", | "bmp", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_BMP, | CODEC_ID_BMP, | ||||
sizeof(BMPContext), | sizeof(BMPContext), | ||||
bmp_encode_init, | bmp_encode_init, | ||||
@@ -244,7 +244,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, | |||||
AVCodec c93_decoder = { | AVCodec c93_decoder = { | ||||
"c93", | "c93", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_C93, | CODEC_ID_C93, | ||||
sizeof(C93DecoderContext), | sizeof(C93DecoderContext), | ||||
decode_init, | decode_init, | ||||
@@ -711,7 +711,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, | |||||
AVCodec cavs_decoder = { | AVCodec cavs_decoder = { | ||||
"cavs", | "cavs", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CAVS, | CODEC_ID_CAVS, | ||||
sizeof(AVSContext), | sizeof(AVSContext), | ||||
ff_cavs_init, | ff_cavs_init, | ||||
@@ -369,7 +369,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx) | |||||
AVCodec cdgraphics_decoder = { | AVCodec cdgraphics_decoder = { | ||||
"cdgraphics", | "cdgraphics", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CDGRAPHICS, | CODEC_ID_CDGRAPHICS, | ||||
sizeof(CDGraphicsContext), | sizeof(CDGraphicsContext), | ||||
cdg_decode_init, | cdg_decode_init, | ||||
@@ -457,7 +457,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx) | |||||
AVCodec cinepak_decoder = { | AVCodec cinepak_decoder = { | ||||
"cinepak", | "cinepak", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CINEPAK, | CODEC_ID_CINEPAK, | ||||
sizeof(CinepakContext), | sizeof(CinepakContext), | ||||
cinepak_decode_init, | cinepak_decode_init, | ||||
@@ -137,7 +137,7 @@ static av_cold int encode_init(AVCodecContext *avctx){ | |||||
AVCodec cljr_decoder = { | AVCodec cljr_decoder = { | ||||
"cljr", | "cljr", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CLJR, | CODEC_ID_CLJR, | ||||
sizeof(CLJRContext), | sizeof(CLJRContext), | ||||
decode_init, | decode_init, | ||||
@@ -151,7 +151,7 @@ AVCodec cljr_decoder = { | |||||
#if CONFIG_CLJR_ENCODER | #if CONFIG_CLJR_ENCODER | ||||
AVCodec cljr_encoder = { | AVCodec cljr_encoder = { | ||||
"cljr", | "cljr", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CLJR, | CODEC_ID_CLJR, | ||||
sizeof(CLJRContext), | sizeof(CLJRContext), | ||||
encode_init, | encode_init, | ||||
@@ -1288,7 +1288,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) | |||||
AVCodec cook_decoder = | AVCodec cook_decoder = | ||||
{ | { | ||||
.name = "cook", | .name = "cook", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_COOK, | .id = CODEC_ID_COOK, | ||||
.priv_data_size = sizeof(COOKContext), | .priv_data_size = sizeof(COOKContext), | ||||
.init = cook_decode_init, | .init = cook_decode_init, | ||||
@@ -249,7 +249,7 @@ static av_cold int decode_end(AVCodecContext *avctx) { | |||||
AVCodec cscd_decoder = { | AVCodec cscd_decoder = { | ||||
"camstudio", | "camstudio", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CSCD, | CODEC_ID_CSCD, | ||||
sizeof(CamStudioContext), | sizeof(CamStudioContext), | ||||
decode_init, | decode_init, | ||||
@@ -180,7 +180,7 @@ static av_cold int cyuv_decode_end(AVCodecContext *avctx) | |||||
#if CONFIG_AURA_DECODER | #if CONFIG_AURA_DECODER | ||||
AVCodec aura_decoder = { | AVCodec aura_decoder = { | ||||
"aura", | "aura", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_AURA, | CODEC_ID_AURA, | ||||
sizeof(CyuvDecodeContext), | sizeof(CyuvDecodeContext), | ||||
cyuv_decode_init, | cyuv_decode_init, | ||||
@@ -196,7 +196,7 @@ AVCodec aura_decoder = { | |||||
#if CONFIG_CYUV_DECODER | #if CONFIG_CYUV_DECODER | ||||
AVCodec cyuv_decoder = { | AVCodec cyuv_decoder = { | ||||
"cyuv", | "cyuv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CYUV, | CODEC_ID_CYUV, | ||||
sizeof(CyuvDecodeContext), | sizeof(CyuvDecodeContext), | ||||
cyuv_decode_init, | cyuv_decode_init, | ||||
@@ -1330,7 +1330,7 @@ static av_cold int dca_decode_end(AVCodecContext * avctx) | |||||
AVCodec dca_decoder = { | AVCodec dca_decoder = { | ||||
.name = "dca", | .name = "dca", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_DTS, | .id = CODEC_ID_DTS, | ||||
.priv_data_size = sizeof(DCAContext), | .priv_data_size = sizeof(DCAContext), | ||||
.init = dca_decode_init, | .init = dca_decode_init, | ||||
@@ -346,7 +346,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) | |||||
AVCodec dnxhd_decoder = { | AVCodec dnxhd_decoder = { | ||||
"dnxhd", | "dnxhd", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DNXHD, | CODEC_ID_DNXHD, | ||||
sizeof(DNXHDContext), | sizeof(DNXHDContext), | ||||
dnxhd_decode_init, | dnxhd_decode_init, | ||||
@@ -850,7 +850,7 @@ static int dnxhd_encode_end(AVCodecContext *avctx) | |||||
AVCodec dnxhd_encoder = { | AVCodec dnxhd_encoder = { | ||||
"dnxhd", | "dnxhd", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DNXHD, | CODEC_ID_DNXHD, | ||||
sizeof(DNXHDEncContext), | sizeof(DNXHDEncContext), | ||||
dnxhd_encode_init, | dnxhd_encode_init, | ||||
@@ -301,7 +301,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, | |||||
#define DPCM_DECODER(id, name, long_name_) \ | #define DPCM_DECODER(id, name, long_name_) \ | ||||
AVCodec name ## _decoder = { \ | AVCodec name ## _decoder = { \ | ||||
#name, \ | #name, \ | ||||
CODEC_TYPE_AUDIO, \ | |||||
AVMEDIA_TYPE_AUDIO, \ | |||||
id, \ | id, \ | ||||
sizeof(DPCMContext), \ | sizeof(DPCMContext), \ | ||||
dpcm_decode_init, \ | dpcm_decode_init, \ | ||||
@@ -216,7 +216,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec dpx_decoder = { | AVCodec dpx_decoder = { | ||||
"dpx", | "dpx", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DPX, | CODEC_ID_DPX, | ||||
sizeof(DPXContext), | sizeof(DPXContext), | ||||
decode_init, | decode_init, | ||||
@@ -345,7 +345,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, | |||||
AVCodec dsicinvideo_decoder = { | AVCodec dsicinvideo_decoder = { | ||||
"dsicinvideo", | "dsicinvideo", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DSICINVIDEO, | CODEC_ID_DSICINVIDEO, | ||||
sizeof(CinVideoContext), | sizeof(CinVideoContext), | ||||
cinvideo_decode_init, | cinvideo_decode_init, | ||||
@@ -358,7 +358,7 @@ AVCodec dsicinvideo_decoder = { | |||||
AVCodec dsicinaudio_decoder = { | AVCodec dsicinaudio_decoder = { | ||||
"dsicinaudio", | "dsicinaudio", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_DSICINAUDIO, | CODEC_ID_DSICINAUDIO, | ||||
sizeof(CinAudioContext), | sizeof(CinAudioContext), | ||||
cinaudio_decode_init, | cinaudio_decode_init, | ||||
@@ -1282,7 +1282,7 @@ static int dvvideo_close(AVCodecContext *c) | |||||
#if CONFIG_DVVIDEO_ENCODER | #if CONFIG_DVVIDEO_ENCODER | ||||
AVCodec dvvideo_encoder = { | AVCodec dvvideo_encoder = { | ||||
"dvvideo", | "dvvideo", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DVVIDEO, | CODEC_ID_DVVIDEO, | ||||
sizeof(DVVideoContext), | sizeof(DVVideoContext), | ||||
dvvideo_init_encoder, | dvvideo_init_encoder, | ||||
@@ -1295,7 +1295,7 @@ AVCodec dvvideo_encoder = { | |||||
#if CONFIG_DVVIDEO_DECODER | #if CONFIG_DVVIDEO_DECODER | ||||
AVCodec dvvideo_decoder = { | AVCodec dvvideo_decoder = { | ||||
"dvvideo", | "dvvideo", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DVVIDEO, | CODEC_ID_DVVIDEO, | ||||
sizeof(DVVideoContext), | sizeof(DVVideoContext), | ||||
dvvideo_init, | dvvideo_init, | ||||
@@ -404,7 +404,7 @@ static int dvbsub_encode(AVCodecContext *avctx, | |||||
AVCodec dvbsub_encoder = { | AVCodec dvbsub_encoder = { | ||||
"dvbsub", | "dvbsub", | ||||
CODEC_TYPE_SUBTITLE, | |||||
AVMEDIA_TYPE_SUBTITLE, | |||||
CODEC_ID_DVB_SUBTITLE, | CODEC_ID_DVB_SUBTITLE, | ||||
sizeof(DVBSubtitleContext), | sizeof(DVBSubtitleContext), | ||||
NULL, | NULL, | ||||
@@ -1413,7 +1413,7 @@ static int dvbsub_decode(AVCodecContext *avctx, | |||||
AVCodec dvbsub_decoder = { | AVCodec dvbsub_decoder = { | ||||
"dvbsub", | "dvbsub", | ||||
CODEC_TYPE_SUBTITLE, | |||||
AVMEDIA_TYPE_SUBTITLE, | |||||
CODEC_ID_DVB_SUBTITLE, | CODEC_ID_DVB_SUBTITLE, | ||||
sizeof(DVBSubContext), | sizeof(DVBSubContext), | ||||
dvbsub_init_decoder, | dvbsub_init_decoder, | ||||
@@ -488,7 +488,7 @@ static int dvdsub_decode(AVCodecContext *avctx, | |||||
AVCodec dvdsub_decoder = { | AVCodec dvdsub_decoder = { | ||||
"dvdsub", | "dvdsub", | ||||
CODEC_TYPE_SUBTITLE, | |||||
AVMEDIA_TYPE_SUBTITLE, | |||||
CODEC_ID_DVD_SUBTITLE, | CODEC_ID_DVD_SUBTITLE, | ||||
0, | 0, | ||||
NULL, | NULL, | ||||
@@ -217,7 +217,7 @@ static int dvdsub_encode(AVCodecContext *avctx, | |||||
AVCodec dvdsub_encoder = { | AVCodec dvdsub_encoder = { | ||||
"dvdsub", | "dvdsub", | ||||
CODEC_TYPE_SUBTITLE, | |||||
AVMEDIA_TYPE_SUBTITLE, | |||||
CODEC_ID_DVD_SUBTITLE, | CODEC_ID_DVD_SUBTITLE, | ||||
0, | 0, | ||||
NULL, | NULL, | ||||
@@ -319,7 +319,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec dxa_decoder = { | AVCodec dxa_decoder = { | ||||
"dxa", | "dxa", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DXA, | CODEC_ID_DXA, | ||||
sizeof(DxaDecContext), | sizeof(DxaDecContext), | ||||
decode_init, | decode_init, | ||||
@@ -425,7 +425,7 @@ static int end_frame(AVCodecContext *avctx) | |||||
AVHWAccel h264_dxva2_hwaccel = { | AVHWAccel h264_dxva2_hwaccel = { | ||||
.name = "h264_dxva2", | .name = "h264_dxva2", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.id = CODEC_ID_H264, | .id = CODEC_ID_H264, | ||||
.pix_fmt = PIX_FMT_DXVA2_VLD, | .pix_fmt = PIX_FMT_DXVA2_VLD, | ||||
.capabilities = 0, | .capabilities = 0, | ||||
@@ -266,7 +266,7 @@ static int end_frame(AVCodecContext *avctx) | |||||
#if CONFIG_WMV3_DXVA2_HWACCEL | #if CONFIG_WMV3_DXVA2_HWACCEL | ||||
AVHWAccel wmv3_dxva2_hwaccel = { | AVHWAccel wmv3_dxva2_hwaccel = { | ||||
.name = "wmv3_dxva2", | .name = "wmv3_dxva2", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.id = CODEC_ID_WMV3, | .id = CODEC_ID_WMV3, | ||||
.pix_fmt = PIX_FMT_DXVA2_VLD, | .pix_fmt = PIX_FMT_DXVA2_VLD, | ||||
.capabilities = 0, | .capabilities = 0, | ||||
@@ -279,7 +279,7 @@ AVHWAccel wmv3_dxva2_hwaccel = { | |||||
AVHWAccel vc1_dxva2_hwaccel = { | AVHWAccel vc1_dxva2_hwaccel = { | ||||
.name = "vc1_dxva2", | .name = "vc1_dxva2", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.id = CODEC_ID_VC1, | .id = CODEC_ID_VC1, | ||||
.pix_fmt = PIX_FMT_DXVA2_VLD, | .pix_fmt = PIX_FMT_DXVA2_VLD, | ||||
.capabilities = 0, | .capabilities = 0, | ||||
@@ -205,7 +205,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){ | |||||
AVCodec eacmv_decoder = { | AVCodec eacmv_decoder = { | ||||
"eacmv", | "eacmv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_CMV, | CODEC_ID_CMV, | ||||
sizeof(CmvContext), | sizeof(CmvContext), | ||||
cmv_decode_init, | cmv_decode_init, | ||||
@@ -307,7 +307,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec eamad_decoder = { | AVCodec eamad_decoder = { | ||||
"eamad", | "eamad", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_MAD, | CODEC_ID_MAD, | ||||
sizeof(MadContext), | sizeof(MadContext), | ||||
decode_init, | decode_init, | ||||
@@ -245,7 +245,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){ | |||||
AVCodec eatgq_decoder = { | AVCodec eatgq_decoder = { | ||||
"eatgq", | "eatgq", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_TGQ, | CODEC_ID_TGQ, | ||||
sizeof(TgqContext), | sizeof(TgqContext), | ||||
tgq_decode_init, | tgq_decode_init, | ||||
@@ -335,7 +335,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx) | |||||
AVCodec eatgv_decoder = { | AVCodec eatgv_decoder = { | ||||
"eatgv", | "eatgv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_TGV, | CODEC_ID_TGV, | ||||
sizeof(TgvContext), | sizeof(TgvContext), | ||||
tgv_decode_init, | tgv_decode_init, | ||||
@@ -156,7 +156,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx) | |||||
AVCodec eatqi_decoder = { | AVCodec eatqi_decoder = { | ||||
"eatqi", | "eatqi", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_TQI, | CODEC_ID_TQI, | ||||
sizeof(TqiContext), | sizeof(TqiContext), | ||||
tqi_decode_init, | tqi_decode_init, | ||||
@@ -374,7 +374,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, | |||||
AVCodec escape124_decoder = { | AVCodec escape124_decoder = { | ||||
"escape124", | "escape124", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ESCAPE124, | CODEC_ID_ESCAPE124, | ||||
sizeof(Escape124Context), | sizeof(Escape124Context), | ||||
escape124_decode_init, | escape124_decode_init, | ||||
@@ -1125,7 +1125,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac | |||||
AVCodec ffv1_decoder = { | AVCodec ffv1_decoder = { | ||||
"ffv1", | "ffv1", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FFV1, | CODEC_ID_FFV1, | ||||
sizeof(FFV1Context), | sizeof(FFV1Context), | ||||
decode_init, | decode_init, | ||||
@@ -1140,7 +1140,7 @@ AVCodec ffv1_decoder = { | |||||
#if CONFIG_FFV1_ENCODER | #if CONFIG_FFV1_ENCODER | ||||
AVCodec ffv1_encoder = { | AVCodec ffv1_encoder = { | ||||
"ffv1", | "ffv1", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FFV1, | CODEC_ID_FFV1, | ||||
sizeof(FFV1Context), | sizeof(FFV1Context), | ||||
encode_init, | encode_init, | ||||
@@ -799,7 +799,7 @@ static void flac_flush(AVCodecContext *avctx) | |||||
AVCodec flac_decoder = { | AVCodec flac_decoder = { | ||||
"flac", | "flac", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_FLAC, | CODEC_ID_FLAC, | ||||
sizeof(FLACContext), | sizeof(FLACContext), | ||||
flac_decode_init, | flac_decode_init, | ||||
@@ -1253,7 +1253,7 @@ static av_cold int flac_encode_close(AVCodecContext *avctx) | |||||
AVCodec flac_encoder = { | AVCodec flac_encoder = { | ||||
"flac", | "flac", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_FLAC, | CODEC_ID_FLAC, | ||||
sizeof(FlacEncodeContext), | sizeof(FlacEncodeContext), | ||||
flac_encode_init, | flac_encode_init, | ||||
@@ -252,7 +252,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx) | |||||
AVCodec flashsv_decoder = { | AVCodec flashsv_decoder = { | ||||
"flashsv", | "flashsv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FLASHSV, | CODEC_ID_FLASHSV, | ||||
sizeof(FlashSVContext), | sizeof(FlashSVContext), | ||||
flashsv_decode_init, | flashsv_decode_init, | ||||
@@ -282,7 +282,7 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx) | |||||
AVCodec flashsv_encoder = { | AVCodec flashsv_encoder = { | ||||
"flashsv", | "flashsv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FLASHSV, | CODEC_ID_FLASHSV, | ||||
sizeof(FlashSVContext), | sizeof(FlashSVContext), | ||||
flashsv_encode_init, | flashsv_encode_init, | ||||
@@ -739,7 +739,7 @@ static av_cold int flic_decode_end(AVCodecContext *avctx) | |||||
AVCodec flic_decoder = { | AVCodec flic_decoder = { | ||||
"flic", | "flic", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FLIC, | CODEC_ID_FLIC, | ||||
sizeof(FlicDecodeContext), | sizeof(FlicDecodeContext), | ||||
flic_decode_init, | flic_decode_init, | ||||
@@ -119,7 +119,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) | |||||
AVCodec flv_decoder = { | AVCodec flv_decoder = { | ||||
"flv", | "flv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FLV1, | CODEC_ID_FLV1, | ||||
sizeof(MpegEncContext), | sizeof(MpegEncContext), | ||||
ff_h263_decode_init, | ff_h263_decode_init, | ||||
@@ -86,7 +86,7 @@ void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run, in | |||||
AVCodec flv_encoder = { | AVCodec flv_encoder = { | ||||
"flv", | "flv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FLV1, | CODEC_ID_FLV1, | ||||
sizeof(MpegEncContext), | sizeof(MpegEncContext), | ||||
MPV_encode_init, | MPV_encode_init, | ||||
@@ -366,7 +366,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec fraps_decoder = { | AVCodec fraps_decoder = { | ||||
"fraps", | "fraps", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FRAPS, | CODEC_ID_FRAPS, | ||||
sizeof(FrapsContext), | sizeof(FrapsContext), | ||||
decode_init, | decode_init, | ||||
@@ -111,7 +111,7 @@ static av_cold int decode_close(AVCodecContext *avctx) | |||||
AVCodec frwu_decoder = { | AVCodec frwu_decoder = { | ||||
"FRWU", | "FRWU", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FRWU, | CODEC_ID_FRWU, | ||||
0, | 0, | ||||
decode_init, | decode_init, | ||||
@@ -387,7 +387,7 @@ static int g726_decode_frame(AVCodecContext *avctx, | |||||
#if CONFIG_ADPCM_G726_ENCODER | #if CONFIG_ADPCM_G726_ENCODER | ||||
AVCodec adpcm_g726_encoder = { | AVCodec adpcm_g726_encoder = { | ||||
"g726", | "g726", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_ADPCM_G726, | CODEC_ID_ADPCM_G726, | ||||
sizeof(G726Context), | sizeof(G726Context), | ||||
g726_init, | g726_init, | ||||
@@ -401,7 +401,7 @@ AVCodec adpcm_g726_encoder = { | |||||
AVCodec adpcm_g726_decoder = { | AVCodec adpcm_g726_decoder = { | ||||
"g726", | "g726", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_ADPCM_G726, | CODEC_ID_ADPCM_G726, | ||||
sizeof(G726Context), | sizeof(G726Context), | ||||
g726_init, | g726_init, | ||||
@@ -315,7 +315,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, | |||||
AVCodec g729_decoder = | AVCodec g729_decoder = | ||||
{ | { | ||||
"g729", | "g729", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_G729, | CODEC_ID_G729, | ||||
sizeof(G729Context), | sizeof(G729Context), | ||||
decoder_init, | decoder_init, | ||||
@@ -168,7 +168,7 @@ static int gif_encode_close(AVCodecContext *avctx) | |||||
AVCodec gif_encoder = { | AVCodec gif_encoder = { | ||||
"gif", | "gif", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_GIF, | CODEC_ID_GIF, | ||||
sizeof(GIFContext), | sizeof(GIFContext), | ||||
gif_encode_init, | gif_encode_init, | ||||
@@ -328,7 +328,7 @@ static av_cold int gif_decode_close(AVCodecContext *avctx) | |||||
AVCodec gif_decoder = { | AVCodec gif_decoder = { | ||||
"gif", | "gif", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_GIF, | CODEC_ID_GIF, | ||||
sizeof(GifState), | sizeof(GifState), | ||||
gif_decode_init, | gif_decode_init, | ||||
@@ -643,7 +643,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) | |||||
AVCodec h261_decoder = { | AVCodec h261_decoder = { | ||||
"h261", | "h261", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_H261, | CODEC_ID_H261, | ||||
sizeof(H261Context), | sizeof(H261Context), | ||||
h261_decode_init, | h261_decode_init, | ||||
@@ -323,7 +323,7 @@ static void h261_encode_block(H261Context * h, DCTELEM * block, int n){ | |||||
AVCodec h261_encoder = { | AVCodec h261_encoder = { | ||||
"h261", | "h261", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_H261, | CODEC_ID_H261, | ||||
sizeof(H261Context), | sizeof(H261Context), | ||||
MPV_encode_init, | MPV_encode_init, | ||||
@@ -727,7 +727,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); | |||||
AVCodec h263_decoder = { | AVCodec h263_decoder = { | ||||
"h263", | "h263", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_H263, | CODEC_ID_H263, | ||||
sizeof(MpegEncContext), | sizeof(MpegEncContext), | ||||
ff_h263_decode_init, | ff_h263_decode_init, | ||||
@@ -3148,7 +3148,7 @@ av_cold int ff_h264_decode_end(AVCodecContext *avctx) | |||||
AVCodec h264_decoder = { | AVCodec h264_decoder = { | ||||
"h264", | "h264", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_H264, | CODEC_ID_H264, | ||||
sizeof(H264Context), | sizeof(H264Context), | ||||
ff_h264_decode_init, | ff_h264_decode_init, | ||||
@@ -3164,7 +3164,7 @@ AVCodec h264_decoder = { | |||||
#if CONFIG_H264_VDPAU_DECODER | #if CONFIG_H264_VDPAU_DECODER | ||||
AVCodec h264_vdpau_decoder = { | AVCodec h264_vdpau_decoder = { | ||||
"h264_vdpau", | "h264_vdpau", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_H264, | CODEC_ID_H264, | ||||
sizeof(H264Context), | sizeof(H264Context), | ||||
ff_h264_decode_init, | ff_h264_decode_init, | ||||
@@ -1414,7 +1414,7 @@ static av_cold int encode_end(AVCodecContext *avctx) | |||||
#if CONFIG_HUFFYUV_DECODER | #if CONFIG_HUFFYUV_DECODER | ||||
AVCodec huffyuv_decoder = { | AVCodec huffyuv_decoder = { | ||||
"huffyuv", | "huffyuv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_HUFFYUV, | CODEC_ID_HUFFYUV, | ||||
sizeof(HYuvContext), | sizeof(HYuvContext), | ||||
decode_init, | decode_init, | ||||
@@ -1430,7 +1430,7 @@ AVCodec huffyuv_decoder = { | |||||
#if CONFIG_FFVHUFF_DECODER | #if CONFIG_FFVHUFF_DECODER | ||||
AVCodec ffvhuff_decoder = { | AVCodec ffvhuff_decoder = { | ||||
"ffvhuff", | "ffvhuff", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FFVHUFF, | CODEC_ID_FFVHUFF, | ||||
sizeof(HYuvContext), | sizeof(HYuvContext), | ||||
decode_init, | decode_init, | ||||
@@ -1446,7 +1446,7 @@ AVCodec ffvhuff_decoder = { | |||||
#if CONFIG_HUFFYUV_ENCODER | #if CONFIG_HUFFYUV_ENCODER | ||||
AVCodec huffyuv_encoder = { | AVCodec huffyuv_encoder = { | ||||
"huffyuv", | "huffyuv", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_HUFFYUV, | CODEC_ID_HUFFYUV, | ||||
sizeof(HYuvContext), | sizeof(HYuvContext), | ||||
encode_init, | encode_init, | ||||
@@ -1460,7 +1460,7 @@ AVCodec huffyuv_encoder = { | |||||
#if CONFIG_FFVHUFF_ENCODER | #if CONFIG_FFVHUFF_ENCODER | ||||
AVCodec ffvhuff_encoder = { | AVCodec ffvhuff_encoder = { | ||||
"ffvhuff", | "ffvhuff", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_FFVHUFF, | CODEC_ID_FFVHUFF, | ||||
sizeof(HYuvContext), | sizeof(HYuvContext), | ||||
encode_init, | encode_init, | ||||
@@ -255,7 +255,7 @@ static av_cold int idcin_decode_end(AVCodecContext *avctx) | |||||
AVCodec idcin_decoder = { | AVCodec idcin_decoder = { | ||||
"idcinvideo", | "idcinvideo", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_IDCIN, | CODEC_ID_IDCIN, | ||||
sizeof(IdcinContext), | sizeof(IdcinContext), | ||||
idcin_decode_init, | idcin_decode_init, | ||||
@@ -218,7 +218,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec iff_ilbm_decoder = { | AVCodec iff_ilbm_decoder = { | ||||
"iff_ilbm", | "iff_ilbm", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_IFF_ILBM, | CODEC_ID_IFF_ILBM, | ||||
sizeof(IffContext), | sizeof(IffContext), | ||||
decode_init, | decode_init, | ||||
@@ -231,7 +231,7 @@ AVCodec iff_ilbm_decoder = { | |||||
AVCodec iff_byterun1_decoder = { | AVCodec iff_byterun1_decoder = { | ||||
"iff_byterun1", | "iff_byterun1", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_IFF_BYTERUN1, | CODEC_ID_IFF_BYTERUN1, | ||||
sizeof(IffContext), | sizeof(IffContext), | ||||
decode_init, | decode_init, | ||||
@@ -823,7 +823,7 @@ static av_cold int imc_decode_close(AVCodecContext * avctx) | |||||
AVCodec imc_decoder = { | AVCodec imc_decoder = { | ||||
.name = "imc", | .name = "imc", | ||||
.type = CODEC_TYPE_AUDIO, | |||||
.type = AVMEDIA_TYPE_AUDIO, | |||||
.id = CODEC_ID_IMC, | .id = CODEC_ID_IMC, | ||||
.priv_data_size = sizeof(IMCContext), | .priv_data_size = sizeof(IMCContext), | ||||
.init = imc_decode_init, | .init = imc_decode_init, | ||||
@@ -226,7 +226,7 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx){ | |||||
AVCodec indeo2_decoder = { | AVCodec indeo2_decoder = { | ||||
"indeo2", | "indeo2", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_INDEO2, | CODEC_ID_INDEO2, | ||||
sizeof(Ir2Context), | sizeof(Ir2Context), | ||||
ir2_decode_init, | ir2_decode_init, | ||||
@@ -1138,7 +1138,7 @@ static av_cold int indeo3_decode_end(AVCodecContext *avctx) | |||||
AVCodec indeo3_decoder = { | AVCodec indeo3_decoder = { | ||||
"indeo3", | "indeo3", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_INDEO3, | CODEC_ID_INDEO3, | ||||
sizeof(Indeo3DecodeContext), | sizeof(Indeo3DecodeContext), | ||||
indeo3_decode_init, | indeo3_decode_init, | ||||
@@ -817,7 +817,7 @@ static av_cold int decode_close(AVCodecContext *avctx) | |||||
AVCodec indeo5_decoder = { | AVCodec indeo5_decoder = { | ||||
.name = "indeo5", | .name = "indeo5", | ||||
.type = CODEC_TYPE_VIDEO, | |||||
.type = AVMEDIA_TYPE_VIDEO, | |||||
.id = CODEC_ID_INDEO5, | .id = CODEC_ID_INDEO5, | ||||
.priv_data_size = sizeof(IVI5DecContext), | .priv_data_size = sizeof(IVI5DecContext), | ||||
.init = decode_init, | .init = decode_init, | ||||
@@ -117,7 +117,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) | |||||
AVCodec h263i_decoder = { | AVCodec h263i_decoder = { | ||||
"h263i", | "h263i", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_H263I, | CODEC_ID_H263I, | ||||
sizeof(MpegEncContext), | sizeof(MpegEncContext), | ||||
ff_h263_decode_init, | ff_h263_decode_init, | ||||
@@ -1095,7 +1095,7 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx) | |||||
AVCodec interplay_video_decoder = { | AVCodec interplay_video_decoder = { | ||||
"interplayvideo", | "interplayvideo", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_INTERPLAY_VIDEO, | CODEC_ID_INTERPLAY_VIDEO, | ||||
sizeof(IpvideoContext), | sizeof(IpvideoContext), | ||||
ipvideo_decode_init, | ipvideo_decode_init, | ||||
@@ -365,7 +365,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor | |||||
AVCodec jpegls_decoder = { | AVCodec jpegls_decoder = { | ||||
"jpegls", | "jpegls", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_JPEGLS, | CODEC_ID_JPEGLS, | ||||
sizeof(MJpegDecodeContext), | sizeof(MJpegDecodeContext), | ||||
ff_mjpeg_decode_init, | ff_mjpeg_decode_init, | ||||
@@ -384,7 +384,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) { | |||||
AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them | AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them | ||||
"jpegls", | "jpegls", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_JPEGLS, | CODEC_ID_JPEGLS, | ||||
sizeof(JpeglsContext), | sizeof(JpeglsContext), | ||||
encode_init_ls, | encode_init_ls, | ||||
@@ -165,7 +165,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
AVCodec kgv1_decoder = { | AVCodec kgv1_decoder = { | ||||
"kgv1", | "kgv1", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_KGV1, | CODEC_ID_KGV1, | ||||
sizeof(KgvContext), | sizeof(KgvContext), | ||||
decode_init, | decode_init, | ||||
@@ -403,7 +403,7 @@ static av_cold int decode_end(AVCodecContext * avctx) | |||||
AVCodec kmvc_decoder = { | AVCodec kmvc_decoder = { | ||||
"kmvc", | "kmvc", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_KMVC, | CODEC_ID_KMVC, | ||||
sizeof(KmvcContext), | sizeof(KmvcContext), | ||||
decode_init, | decode_init, | ||||
@@ -611,7 +611,7 @@ static av_cold int decode_end(AVCodecContext *avctx) | |||||
#if CONFIG_MSZH_DECODER | #if CONFIG_MSZH_DECODER | ||||
AVCodec mszh_decoder = { | AVCodec mszh_decoder = { | ||||
"mszh", | "mszh", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_MSZH, | CODEC_ID_MSZH, | ||||
sizeof(LclDecContext), | sizeof(LclDecContext), | ||||
decode_init, | decode_init, | ||||
@@ -626,7 +626,7 @@ AVCodec mszh_decoder = { | |||||
#if CONFIG_ZLIB_DECODER | #if CONFIG_ZLIB_DECODER | ||||
AVCodec zlib_decoder = { | AVCodec zlib_decoder = { | ||||
"zlib", | "zlib", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ZLIB, | CODEC_ID_ZLIB, | ||||
sizeof(LclDecContext), | sizeof(LclDecContext), | ||||
decode_init, | decode_init, | ||||
@@ -180,7 +180,7 @@ static av_cold int encode_end(AVCodecContext *avctx) | |||||
AVCodec zlib_encoder = { | AVCodec zlib_encoder = { | ||||
"zlib", | "zlib", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_ZLIB, | CODEC_ID_ZLIB, | ||||
sizeof(LclEncContext), | sizeof(LclEncContext), | ||||
encode_init, | encode_init, | ||||
@@ -195,7 +195,7 @@ static void libdirac_flush(AVCodecContext *avccontext) | |||||
AVCodec libdirac_decoder = { | AVCodec libdirac_decoder = { | ||||
"libdirac", | "libdirac", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DIRAC, | CODEC_ID_DIRAC, | ||||
sizeof(FfmpegDiracDecoderParams), | sizeof(FfmpegDiracDecoderParams), | ||||
libdirac_decode_init, | libdirac_decode_init, | ||||
@@ -393,7 +393,7 @@ static av_cold int libdirac_encode_close(AVCodecContext *avccontext) | |||||
AVCodec libdirac_encoder = { | AVCodec libdirac_encoder = { | ||||
"libdirac", | "libdirac", | ||||
CODEC_TYPE_VIDEO, | |||||
AVMEDIA_TYPE_VIDEO, | |||||
CODEC_ID_DIRAC, | CODEC_ID_DIRAC, | ||||
sizeof(FfmpegDiracEncoderParams), | sizeof(FfmpegDiracEncoderParams), | ||||
libdirac_encode_init, | libdirac_encode_init, | ||||
@@ -147,7 +147,7 @@ static av_cold int Faac_encode_close(AVCodecContext *avctx) | |||||
AVCodec libfaac_encoder = { | AVCodec libfaac_encoder = { | ||||
"libfaac", | "libfaac", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_AAC, | CODEC_ID_AAC, | ||||
sizeof(FaacAudioContext), | sizeof(FaacAudioContext), | ||||
Faac_encode_init, | Faac_encode_init, | ||||
@@ -322,7 +322,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx) | |||||
AVCodec libfaad_decoder = { | AVCodec libfaad_decoder = { | ||||
"libfaad", | "libfaad", | ||||
CODEC_TYPE_AUDIO, | |||||
AVMEDIA_TYPE_AUDIO, | |||||
CODEC_ID_AAC, | CODEC_ID_AAC, | ||||
sizeof(FAACContext), | sizeof(FAACContext), | ||||
faac_decode_init, | faac_decode_init, | ||||