diff options
author | elupus <elupus@xbmc.org> | 2011-11-01 21:46:36 +0100 |
---|---|---|
committer | elupus <elupus@xbmc.org> | 2012-03-31 16:28:34 +0200 |
commit | bddad011d457ed59ab856d35a63efa390d9c2e73 (patch) | |
tree | 33433d1d20c820969f7ca044711339ac67123590 /lib/DllAvFormat.h | |
parent | 1aed04a52e753b5fd395b55d97a70226f62bc634 (diff) |
Drop support for ffmpeg version older than our built in version
Diffstat (limited to 'lib/DllAvFormat.h')
-rw-r--r-- | lib/DllAvFormat.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h index 9b38c9c66a..d6753ae09e 100644 --- a/lib/DllAvFormat.h +++ b/lib/DllAvFormat.h @@ -126,12 +126,7 @@ public: virtual void av_register_all_dont_call() { *(int* )0x0 = 0; } virtual AVInputFormat *av_find_input_format(const char *short_name) { return ::av_find_input_format(short_name); } virtual int url_feof(AVIOContext *s) { return ::url_feof(s); } -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,31,0) - // API added on: 2009-03-01 virtual AVDictionaryEntry *av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags){ return ::av_metadata_get(m, key, prev, flags); } -#else - virtual AVDictionaryEntry *av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags){ return NULL; } -#endif virtual void av_close_input_file(AVFormatContext *s) { ::av_close_input_file(s); } virtual void av_close_input_stream(AVFormatContext *s) { ::av_close_input_stream(s); } virtual int av_read_frame(AVFormatContext *s, AVPacket *pkt) { return ::av_read_frame(s, pkt); } @@ -153,12 +148,7 @@ public: offset_t (*seek)(void *opaque, offset_t offset, int whence)) { return ::init_put_byte(s, buffer, buffer_size, write_flag, opaque, read_packet, write_packet, seek); } virtual AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened) {return ::av_probe_input_format(pd, is_opened); } virtual AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max) {*score_max = 100; return ::av_probe_input_format(pd, is_opened); } // Use av_probe_input_format, this is not exported by ffmpeg's headers -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,98,0) - // API added on: 2010-02-08 virtual int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) { return ::av_probe_input_buffer(pb, fmt, filename, logctx, offset, max_probe_size); } -#else - virtual int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) { return -1; } -#endif virtual void dump_format(AVFormatContext *ic, int index, const char *url, int is_output) { ::dump_format(ic, index, url, is_output); } virtual int url_fdopen(AVIOContext **s, URLContext *h) { return ::url_fdopen(s, h); } virtual int url_fopen(AVIOContext **s, const char *filename, int flags) { return ::url_fopen(s, filename, flags); } @@ -175,11 +165,7 @@ public: virtual void put_be16(AVIOContext *s, unsigned int val) { ::put_be16(s, val); } virtual AVFormatContext *avformat_alloc_context() { return ::avformat_alloc_context(); } virtual AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c) { return ::avformat_new_stream(s, c); } -#if LIBAVFORMAT_VERSION_INT < (52<<16 | 45<<8) - virtual AVOutputFormat *av_guess_format(const char *short_name, const char *filename, const char *mime_type) { return ::guess_format(short_name, filename, mime_type); } -#else virtual AVOutputFormat *av_guess_format(const char *short_name, const char *filename, const char *mime_type) { return ::av_guess_format(short_name, filename, mime_type); } -#endif virtual int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap) { return ::av_set_parameters(s, ap); } virtual AVIOContext *av_alloc_put_byte(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), @@ -188,15 +174,7 @@ public: virtual int av_write_header (AVFormatContext *s) { return ::av_write_header (s); } virtual int av_write_trailer(AVFormatContext *s) { return ::av_write_trailer(s); } virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt) { return ::av_write_frame(s, pkt); } -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,43,0) - // API added on: 2009-12-13 virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return ::av_metadata_set2(pm, key, value, flags); } -#elif LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,31,0) - // API added on: 2009-03-01 - virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return ::av_metadata_set(pm, key, value); } -#else - virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return -1; } -#endif // DLL faking. virtual bool ResolveExports() { return true; } @@ -252,11 +230,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface DEFINE_METHOD3(offset_t, url_fseek, (AVIOContext *p1, offset_t p2, int p3)) DEFINE_METHOD0(AVFormatContext *, avformat_alloc_context) DEFINE_METHOD2(AVStream *, avformat_new_stream, (AVFormatContext *p1, AVCodec *p2)) -#if LIBAVFORMAT_VERSION_INT < (52<<16 | 45<<8) - DEFINE_METHOD3(AVOutputFormat *, guess_format, (const char *p1, const char *p2, const char *p3)) -#else DEFINE_METHOD3(AVOutputFormat *, av_guess_format, (const char *p1, const char *p2, const char *p3)) -#endif DEFINE_METHOD2(int, av_set_parameters, (AVFormatContext *p1, AVFormatParameters *p2)); DEFINE_METHOD7(AVIOContext *, av_alloc_put_byte, (unsigned char *p1, int p2, int p3, void *p4, int(*p5)(void *opaque, uint8_t *buf, int buf_size), @@ -301,11 +275,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface RESOLVE_METHOD(put_be16) RESOLVE_METHOD(avformat_alloc_context) RESOLVE_METHOD(avformat_new_stream) -#if LIBAVFORMAT_VERSION_INT < (52<<16 | 45<<8) - RESOLVE_METHOD(guess_format) -#else RESOLVE_METHOD(av_guess_format) -#endif RESOLVE_METHOD(av_set_parameters) RESOLVE_METHOD(av_alloc_put_byte) RESOLVE_METHOD(av_write_header) |