Mercurial > libavformat.hg
changeset 2812:173b5cb7efde libavformat
av_*_next() API for libavformat
author | michael |
---|---|
date | Wed, 12 Dec 2007 19:01:58 +0000 |
parents | cbc58d02f912 |
children | 9d53cc092c55 |
files | avformat.h avio.c avio.h utils.c |
diffstat | 4 files changed, 27 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/avformat.h Sun Dec 09 14:39:01 2007 +0000 +++ b/avformat.h Wed Dec 12 19:01:58 2007 +0000 @@ -21,8 +21,8 @@ #ifndef FFMPEG_AVFORMAT_H #define FFMPEG_AVFORMAT_H -#define LIBAVFORMAT_VERSION_INT ((52<<16)+(1<<8)+0) -#define LIBAVFORMAT_VERSION 52.1.0 +#define LIBAVFORMAT_VERSION_INT ((52<<16)+(2<<8)+0) +#define LIBAVFORMAT_VERSION 52.2.0 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) @@ -452,8 +452,13 @@ struct AVPacketList *next; } AVPacketList; +#if LIBAVFORMAT_VERSION_INT < (53<<16) extern AVInputFormat *first_iformat; extern AVOutputFormat *first_oformat; +#endif + +AVInputFormat *av_iformat_next(AVInputFormat *f); +AVOutputFormat *av_oformat_next(AVOutputFormat *f); enum CodecID av_guess_image2_codec(const char *filename);
--- a/avio.c Sun Dec 09 14:39:01 2007 +0000 +++ b/avio.c Wed Dec 12 19:01:58 2007 +0000 @@ -26,6 +26,12 @@ URLProtocol *first_protocol = NULL; URLInterruptCB *url_interrupt_cb = default_interrupt_cb; +URLProtocol *av_protocol_next(URLProtocol *p) +{ + if(p) return p->next; + else return first_protocol; +} + int register_protocol(URLProtocol *protocol) { URLProtocol **p;
--- a/avio.h Sun Dec 09 14:39:01 2007 +0000 +++ b/avio.h Wed Dec 12 19:01:58 2007 +0000 @@ -136,6 +136,8 @@ extern URLProtocol *first_protocol; extern URLInterruptCB *url_interrupt_cb; +URLProtocol *av_protocol_next(URLProtocol *p); + int register_protocol(URLProtocol *protocol); typedef struct {
--- a/utils.c Sun Dec 09 14:39:01 2007 +0000 +++ b/utils.c Wed Dec 12 19:01:58 2007 +0000 @@ -41,6 +41,18 @@ /** head of registered output format linked list. */ AVOutputFormat *first_oformat = NULL; +AVInputFormat *av_iformat_next(AVInputFormat *f) +{ + if(f) return f->next; + else return first_iformat; +} + +AVOutputFormat *av_oformat_next(AVOutputFormat *f) +{ + if(f) return f->next; + else return first_oformat; +} + void av_register_input_format(AVInputFormat *format) { AVInputFormat **p;