diff options
author | Alexis Ballier <aballier@gentoo.org> | 2012-03-01 11:17:37 -0300 |
---|---|---|
committer | elupus <elupus@xbmc.org> | 2012-03-31 16:28:38 +0200 |
commit | 9cf83f59602b436179e935186639c56a216f6762 (patch) | |
tree | 0ff0d8a5b2d48c5ec48bfbcd607bd74436357e88 /lib | |
parent | d6669d741f69e3d937c1949ef1986a952189fde4 (diff) |
Replace init_put_byte by avio_alloc_context.
The former is deprecated as of ffmpeg 0.9 and is gone in libavformat 54.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DllAvFormat.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h index f6d6b7042f..e3f0a9afff 100644 --- a/lib/DllAvFormat.h +++ b/lib/DllAvFormat.h @@ -73,7 +73,7 @@ public: virtual int avformat_find_stream_info_dont_call(AVFormatContext *ic, AVDictionary **options)=0; #endif virtual int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)=0; - virtual int init_put_byte(AVIOContext *s, unsigned char *buffer, int buffer_size, int write_flag, void *opaque, + virtual AVIOContext *avio_alloc_context(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), offset_t (*seek)(void *opaque, offset_t offset, int whence))=0; @@ -133,10 +133,10 @@ public: } virtual int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options) { return ::avformat_open_input(ps, filename, fmt, options); } - virtual int init_put_byte(AVIOContext *s, unsigned char *buffer, int buffer_size, int write_flag, void *opaque, + virtual AVIOContext *avio_alloc_context(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), - 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); } + offset_t (*seek)(void *opaque, offset_t offset, int whence)) { return ::avio_alloc_context(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 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); } @@ -202,10 +202,10 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface DEFINE_FUNC_ALIGNED2(void, __cdecl, put_be24, AVIOContext*, unsigned int) DEFINE_FUNC_ALIGNED2(void, __cdecl, put_be32, AVIOContext*, unsigned int) DEFINE_FUNC_ALIGNED2(void, __cdecl, put_be16, AVIOContext*, unsigned int) - DEFINE_METHOD8(int, init_put_byte, (AVIOContext *p1, unsigned char *p2, int p3, int p4, void *p5, + DEFINE_METHOD7(AVIOContext *, avio_alloc_context, (unsigned char *p1, int p2, int p3, void *p4, + int (*p5)(void *opaque, uint8_t *buf, int buf_size), int (*p6)(void *opaque, uint8_t *buf, int buf_size), - int (*p7)(void *opaque, uint8_t *buf, int buf_size), - offset_t (*p8)(void *opaque, offset_t offset, int whence))) + offset_t (*p7)(void *opaque, offset_t offset, int whence))) DEFINE_METHOD4(void, dump_format, (AVFormatContext *p1, int p2, const char *p3, int p4)) DEFINE_METHOD3(int, url_fopen, (AVIOContext **p1, const char *p2, int p3)) DEFINE_METHOD1(int, url_fclose, (AVIOContext *p1)) @@ -234,7 +234,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface RESOLVE_METHOD(av_seek_frame) RESOLVE_METHOD_RENAME(avformat_find_stream_info, avformat_find_stream_info_dont_call) RESOLVE_METHOD(avformat_open_input) - RESOLVE_METHOD(init_put_byte) + RESOLVE_METHOD(avio_alloc_context) RESOLVE_METHOD(av_probe_input_format) RESOLVE_METHOD(av_probe_input_format2) RESOLVE_METHOD(av_probe_input_buffer) |