diff options
author | elupus <elupus@xbmc.org> | 2012-03-23 21:06:50 +0100 |
---|---|---|
committer | elupus <elupus@xbmc.org> | 2012-03-31 16:28:41 +0200 |
commit | 525834b388b3f0c7d2cece694b8893684a7715b7 (patch) | |
tree | a210f3c94ab6fed6fc56b003f113d9338033dfd8 /lib | |
parent | 1ee1787333460902bb158a4049e87c7ea3abb6e4 (diff) |
Convert to avcodec_decode_audio4 and drop avcodec_decode_audio3.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DllAvCodec.h | 8 | ||||
-rw-r--r-- | lib/DllAvUtil.h | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/DllAvCodec.h b/lib/DllAvCodec.h index 79934083c2..9a4164a9f3 100644 --- a/lib/DllAvCodec.h +++ b/lib/DllAvCodec.h @@ -91,7 +91,7 @@ public: virtual AVFrame *avcodec_alloc_frame(void)=0; virtual int avpicture_fill(AVPicture *picture, uint8_t *ptr, PixelFormat pix_fmt, int width, int height)=0; virtual int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt)=0; - virtual int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt)=0; + virtual int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)=0; virtual int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)=0; virtual int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples)=0; virtual int avpicture_get_size(PixelFormat pix_fmt, int width, int height)=0; @@ -160,7 +160,7 @@ public: virtual AVFrame *avcodec_alloc_frame() { return ::avcodec_alloc_frame(); } virtual int avpicture_fill(AVPicture *picture, uint8_t *ptr, PixelFormat pix_fmt, int width, int height) { return ::avpicture_fill(picture, ptr, pix_fmt, width, height); } virtual int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt) { return ::avcodec_decode_video2(avctx, picture, got_picture_ptr, avpkt); } - virtual int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt) { return ::avcodec_decode_audio3(avctx, samples, frame_size_ptr, avpkt); } + virtual int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) { return ::avcodec_decode_audio4(avctx, frame, got_frame_ptr, avpkt); } virtual int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt) { return ::avcodec_decode_subtitle2(avctx, sub, got_sub_ptr, avpkt); } virtual int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples) { return ::avcodec_encode_audio(avctx, buf, buf_size, samples); } virtual int avpicture_get_size(PixelFormat pix_fmt, int width, int height) { return ::avpicture_get_size(pix_fmt, width, height); } @@ -222,7 +222,7 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface DEFINE_FUNC_ALIGNED1(void, __cdecl, avcodec_flush_buffers, AVCodecContext*) DEFINE_FUNC_ALIGNED3(int, __cdecl, avcodec_open2_dont_call, AVCodecContext*, AVCodec *, AVDictionary **) DEFINE_FUNC_ALIGNED4(int, __cdecl, avcodec_decode_video2, AVCodecContext*, AVFrame*, int*, AVPacket*) - DEFINE_FUNC_ALIGNED4(int, __cdecl, avcodec_decode_audio3, AVCodecContext*, int16_t*, int*, AVPacket*) + DEFINE_FUNC_ALIGNED4(int, __cdecl, avcodec_decode_audio4, AVCodecContext*, AVFrame*, int*, AVPacket*) DEFINE_FUNC_ALIGNED4(int, __cdecl, avcodec_decode_subtitle2, AVCodecContext*, AVSubtitle*, int*, AVPacket*) DEFINE_FUNC_ALIGNED4(int, __cdecl, avcodec_encode_audio, AVCodecContext*, uint8_t*, int, const short*) DEFINE_FUNC_ALIGNED1(AVCodecContext*, __cdecl, avcodec_alloc_context3, AVCodec *) @@ -272,7 +272,7 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface RESOLVE_METHOD_RENAME(avcodec_register_all, avcodec_register_all_dont_call) RESOLVE_METHOD(avpicture_fill) RESOLVE_METHOD(avcodec_decode_video2) - RESOLVE_METHOD(avcodec_decode_audio3) + RESOLVE_METHOD(avcodec_decode_audio4) RESOLVE_METHOD(avcodec_decode_subtitle2) RESOLVE_METHOD(avcodec_encode_audio) RESOLVE_METHOD(avpicture_get_size) diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h index 990317ce11..ad41a14add 100644 --- a/lib/DllAvUtil.h +++ b/lib/DllAvUtil.h @@ -101,6 +101,7 @@ public: virtual int av_get_bytes_per_sample(enum AVSampleFormat p1) = 0; virtual AVDictionaryEntry *av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags) = 0; virtual int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)=0; + virtual int av_samples_get_buffer_size (int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) = 0; }; #if (defined USE_EXTERNAL_FFMPEG) @@ -135,6 +136,8 @@ public: { return ::av_get_bytes_per_sample(p1); } virtual AVDictionaryEntry *av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags){ return ::av_dict_get(m, key, prev, flags); } virtual int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags) { return ::av_dict_set(pm, key, value, flags); } + virtual int av_samples_get_buffer_size (int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) + { return ::av_samples_get_buffer_size(linesize, nb_channels, nb_samples, sample_fmt, align); } // DLL faking. virtual bool ResolveExports() { return true; } @@ -174,6 +177,7 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface DEFINE_METHOD1(int, av_get_bytes_per_sample, (enum AVSampleFormat p1)) DEFINE_METHOD4(AVDictionaryEntry *, av_dict_get, (AVDictionary *p1, const char *p2, const AVDictionaryEntry *p3, int p4)) DEFINE_METHOD4(int, av_dict_set, (AVDictionary **p1, const char *p2, const char *p3, int p4)); + DEFINE_METHOD5(int, av_samples_get_buffer_size, (int *p1, int p2, int p3, enum AVSampleFormat p4, int p5)) public: BEGIN_METHOD_RESOLVE() @@ -198,6 +202,7 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface RESOLVE_METHOD(av_get_bytes_per_sample) RESOLVE_METHOD(av_dict_get) RESOLVE_METHOD(av_dict_set) + RESOLVE_METHOD(av_samples_get_buffer_size) END_METHOD_RESOLVE() }; |