aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-21 01:39:17 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-21 01:39:17 +0000
commit7caf0cc62cad8a5548c3e7e0b35ead00584100c8 (patch)
treee1562ae2a42534630673125d7f7712da466f43be /libavformat/avformat.h
parent5c4e1928c0e79438be23cbec9ce579d790bb985a (diff)
downloadffmpeg-7caf0cc62cad8a5548c3e7e0b35ead00584100c8.tar.gz
add codec_id <-> codec_tag tables to AVIn/OutputFormat
Originally committed as revision 7593 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 63e1e83f4f..7ebc880ac6 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -25,8 +25,8 @@
extern "C" {
#endif
-#define LIBAVFORMAT_VERSION_INT ((51<<16)+(7<<8)+0)
-#define LIBAVFORMAT_VERSION 51.7.0
+#define LIBAVFORMAT_VERSION_INT ((51<<16)+(8<<8)+0)
+#define LIBAVFORMAT_VERSION 51.8.0
#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
@@ -96,6 +96,8 @@ typedef struct AVFrac {
/*************************************************/
/* input/output formats */
+struct AVCodecTag;
+
struct AVFormatContext;
/* this structure contains the data a format has to probe a file */
@@ -155,6 +157,13 @@ typedef struct AVOutputFormat {
/* currently only used to set pixel format if not YUV420P */
int (*set_parameters)(struct AVFormatContext *, AVFormatParameters *);
int (*interleave_packet)(struct AVFormatContext *, AVPacket *out, AVPacket *in, int flush);
+
+ /**
+ * list of supported codec_id-codec_tag pairs, ordered by "better choice first"
+ * the arrays are all CODEC_ID_NONE terminated
+ */
+ const struct AVCodecTag *codec_tag[4];
+
/* private fields */
struct AVOutputFormat *next;
} AVOutputFormat;
@@ -210,6 +219,8 @@ typedef struct AVInputFormat {
(RTSP) */
int (*read_pause)(struct AVFormatContext *);
+ const struct AVCodecTag *codec_tag[4];
+
/* private fields */
struct AVInputFormat *next;
} AVInputFormat;
@@ -396,6 +407,10 @@ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
void av_register_all(void);
+/* codec tag <-> codec id */
+enum CodecID av_codec_get_id(const struct AVCodecTag *tags[4], unsigned int tag);
+unsigned int av_codec_get_tag(const struct AVCodecTag *tags[4], enum CodecID id);
+
/* media file input */
AVInputFormat *av_find_input_format(const char *short_name);
AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);