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