diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-12-12 18:40:11 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-12-12 18:40:11 +0000 |
commit | 55b9e69a31658df3c8e41bdcdbc5a8221a74e733 (patch) | |
tree | c6a401564a4593215b58ec20937ffb4b17e9a9b4 /libavcodec | |
parent | 8540e8c3eca73b18b7b5bc7f0b937007b0f81ddd (diff) | |
download | ffmpeg-55b9e69a31658df3c8e41bdcdbc5a8221a74e733.tar.gz |
av_*_next() API for libavcodec
Originally committed as revision 11204 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 12 | ||||
-rw-r--r-- | libavcodec/bitstream_filter.c | 5 | ||||
-rw-r--r-- | libavcodec/parser.c | 5 | ||||
-rw-r--r-- | libavcodec/utils.c | 5 |
4 files changed, 24 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 59f04f832b..e802522218 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -33,8 +33,8 @@ #define AV_STRINGIFY(s) AV_TOSTRING(s) #define AV_TOSTRING(s) #s -#define LIBAVCODEC_VERSION_INT ((51<<16)+(48<<8)+0) -#define LIBAVCODEC_VERSION 51.48.0 +#define LIBAVCODEC_VERSION_INT ((51<<16)+(49<<8)+0) +#define LIBAVCODEC_VERSION 51.49.0 #define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) @@ -2428,7 +2428,10 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, /* external high level API */ +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) extern AVCodec *first_avcodec; +#endif +AVCodec *av_codec_next(AVCodec *c); /* returns LIBAVCODEC_VERSION_INT constant */ unsigned avcodec_version(void); @@ -2784,7 +2787,10 @@ typedef struct AVCodecParser { struct AVCodecParser *next; } AVCodecParser; +#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) extern AVCodecParser *av_first_parser; +#endif +AVCodecParser *av_parser_next(AVCodecParser *c); void av_register_codec_parser(AVCodecParser *parser); AVCodecParserContext *av_parser_init(int codec_id); @@ -2827,7 +2833,7 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, const uint8_t *buf, int buf_size, int keyframe); void av_bitstream_filter_close(AVBitStreamFilterContext *bsf); -extern AVBitStreamFilter *first_bitstream_filter; +AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f); /* memory */ diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c index 97fbd776d1..aeafd7db40 100644 --- a/libavcodec/bitstream_filter.c +++ b/libavcodec/bitstream_filter.c @@ -22,6 +22,11 @@ AVBitStreamFilter *first_bitstream_filter= NULL; +AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f){ + if(f) return f->next; + else return first_bitstream_filter; +} + void av_register_bitstream_filter(AVBitStreamFilter *bsf){ bsf->next = first_bitstream_filter; first_bitstream_filter= bsf; diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 192241987e..b0a6a2a1b0 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -24,6 +24,11 @@ AVCodecParser *av_first_parser = NULL; +AVCodecParser* av_parser_next(AVCodecParser *p){ + if(p) return p->next; + else return av_first_parser; +} + void av_register_codec_parser(AVCodecParser *parser) { parser->next = av_first_parser; diff --git a/libavcodec/utils.c b/libavcodec/utils.c index be2aa38367..fdfa7bd4e4 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -126,6 +126,11 @@ static void do_free(void) /* encoder management */ AVCodec *first_avcodec = NULL; +AVCodec *av_codec_next(AVCodec *c){ + if(c) return c->next; + else return first_avcodec; +} + void register_avcodec(AVCodec *format) { AVCodec **p; |