Commit 72415b2a authored by Stefano Sabatini's avatar Stefano Sabatini

Define AVMediaType enum, and use it instead of enum CodecType, which

is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ca6e7708
......@@ -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;
......
This diff is collapsed.
This diff is collapsed.
......@@ -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;