@@ -75,13 +75,13 @@ class DllAvCodecInterface
75
75
virtual AVCodec *avcodec_find_decoder (enum AVCodecID id)=0;
76
76
virtual AVCodec *avcodec_find_encoder (enum AVCodecID id)=0;
77
77
virtual int avcodec_close_dont_call (AVCodecContext *avctx)=0;
78
- virtual AVFrame *avcodec_alloc_frame (void )=0;
79
- virtual int avpicture_fill (AVPicture *picture, uint8_t *ptr, PixelFormat pix_fmt, int width, int height)=0;
78
+ virtual AVFrame *av_frame_alloc (void )=0;
79
+ virtual int avpicture_fill (AVPicture *picture, uint8_t *ptr, AVPixelFormat pix_fmt, int width, int height)=0;
80
80
virtual int avcodec_decode_video2 (AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt)=0;
81
81
virtual int avcodec_decode_audio4 (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)=0;
82
82
virtual int avcodec_decode_subtitle2 (AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)=0;
83
- virtual int avcodec_encode_audio (AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples )=0;
84
- virtual int avpicture_get_size (PixelFormat pix_fmt, int width, int height)=0;
83
+ virtual int avcodec_encode_audio2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr )=0;
84
+ virtual int avpicture_get_size (AVPixelFormat pix_fmt, int width, int height)=0;
85
85
virtual AVCodecContext *avcodec_alloc_context3 (AVCodec *codec)=0;
86
86
virtual void avcodec_string (char *buf, int buf_size, AVCodecContext *enc, int encode)=0;
87
87
virtual void avcodec_get_context_defaults3 (AVCodecContext *s, AVCodec *codec)=0;
@@ -98,10 +98,9 @@ class DllAvCodecInterface
98
98
virtual void av_bitstream_filter_close (AVBitStreamFilterContext *bsfc) =0;
99
99
virtual void avpicture_free (AVPicture *picture)=0;
100
100
virtual void av_free_packet (AVPacket *pkt)=0;
101
- virtual int avpicture_alloc (AVPicture *picture, PixelFormat pix_fmt, int width, int height)=0;
102
- virtual enum PixelFormat avcodec_default_get_format (struct AVCodecContext *s, const enum PixelFormat *fmt)=0;
103
- virtual int avcodec_default_get_buffer (AVCodecContext *s, AVFrame *pic)=0;
104
- virtual void avcodec_default_release_buffer (AVCodecContext *s, AVFrame *pic)=0;
101
+ virtual int avpicture_alloc (AVPicture *picture, AVPixelFormat pix_fmt, int width, int height)=0;
102
+ virtual enum AVPixelFormat avcodec_default_get_format (struct AVCodecContext *s, const enum AVPixelFormat *fmt)=0;
103
+ virtual int avcodec_default_get_buffer2 (AVCodecContext *s, AVFrame *pic, int flags)=0;
105
104
virtual AVCodec *av_codec_next (AVCodec *c)=0;
106
105
virtual int av_dup_packet (AVPacket *pkt)=0;
107
106
virtual void av_init_packet (AVPacket *pkt)=0;
@@ -131,13 +130,13 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
131
130
{
132
131
return ::avcodec_close (avctx);
133
132
}
134
- virtual AVFrame *avcodec_alloc_frame () { return ::avcodec_alloc_frame (); }
135
- 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); }
133
+ virtual AVFrame *av_frame_alloc () { return ::av_frame_alloc (); }
134
+ virtual int avpicture_fill (AVPicture *picture, uint8_t *ptr, AVPixelFormat pix_fmt, int width, int height) { return ::avpicture_fill (picture, ptr, pix_fmt, width, height); }
136
135
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); }
137
136
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); }
138
137
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); }
139
- 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 ); }
140
- virtual int avpicture_get_size (PixelFormat pix_fmt, int width, int height) { return ::avpicture_get_size (pix_fmt, width, height); }
138
+ virtual int avcodec_encode_audio2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr ) { return ::avcodec_encode_audio2 (avctx, avpkt, frame, got_packet_ptr ); }
139
+ virtual int avpicture_get_size (AVPixelFormat pix_fmt, int width, int height) { return ::avpicture_get_size (pix_fmt, width, height); }
141
140
virtual AVCodecContext *avcodec_alloc_context3 (AVCodec *codec) { return ::avcodec_alloc_context3 (codec); }
142
141
virtual void avcodec_string (char *buf, int buf_size, AVCodecContext *enc, int encode) { ::avcodec_string (buf, buf_size, enc, encode); }
143
142
virtual void avcodec_get_context_defaults3 (AVCodecContext *s, AVCodec *codec) { ::avcodec_get_context_defaults3 (s, codec); }
@@ -160,10 +159,9 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
160
159
161
160
virtual void avpicture_free (AVPicture *picture) { ::avpicture_free (picture); }
162
161
virtual void av_free_packet (AVPacket *pkt) { ::av_free_packet (pkt); }
163
- virtual int avpicture_alloc (AVPicture *picture, PixelFormat pix_fmt, int width, int height) { return ::avpicture_alloc (picture, pix_fmt, width, height); }
164
- virtual int avcodec_default_get_buffer (AVCodecContext *s, AVFrame *pic) { return ::avcodec_default_get_buffer (s, pic); }
165
- virtual void avcodec_default_release_buffer (AVCodecContext *s, AVFrame *pic) { ::avcodec_default_release_buffer (s, pic); }
166
- virtual enum PixelFormat avcodec_default_get_format (struct AVCodecContext *s, const enum PixelFormat *fmt) { return ::avcodec_default_get_format (s, fmt); }
162
+ virtual int avpicture_alloc (AVPicture *picture, AVPixelFormat pix_fmt, int width, int height) { return ::avpicture_alloc (picture, pix_fmt, width, height); }
163
+ virtual int avcodec_default_get_buffer2 (AVCodecContext *s, AVFrame *pic, int flags) { return ::avcodec_default_get_buffer2 (s, pic, flags); }
164
+ virtual enum AVPixelFormat avcodec_default_get_format (struct AVCodecContext *s, const enum AVPixelFormat *fmt) { return ::avcodec_default_get_format (s, fmt); }
167
165
virtual AVCodec *av_codec_next (AVCodec *c) { return ::av_codec_next (c); }
168
166
169
167
virtual int av_dup_packet (AVPacket *pkt) { return ::av_dup_packet (pkt); }
@@ -186,7 +184,7 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
186
184
DEFINE_FUNC_ALIGNED4 (int , __cdecl, avcodec_decode_video2, AVCodecContext*, AVFrame*, int *, AVPacket*)
187
185
DEFINE_FUNC_ALIGNED4 (int , __cdecl, avcodec_decode_audio4, AVCodecContext*, AVFrame*, int *, AVPacket*)
188
186
DEFINE_FUNC_ALIGNED4 (int , __cdecl, avcodec_decode_subtitle2, AVCodecContext*, AVSubtitle*, int *, AVPacket*)
189
- DEFINE_FUNC_ALIGNED4 (int , __cdecl, avcodec_encode_audio, AVCodecContext*, uint8_t *, int , const short *)
187
+ DEFINE_FUNC_ALIGNED4 (int , __cdecl, avcodec_encode_audio2, avcodec_encode_audio2, *avctx, AVPacket * , const AVFrame *, int *)
190
188
DEFINE_FUNC_ALIGNED1 (AVCodecContext*, __cdecl, avcodec_alloc_context3, AVCodec *)
191
189
DEFINE_FUNC_ALIGNED1 (AVCodecParserContext*, __cdecl, av_parser_init, int )
192
190
DEFINE_FUNC_ALIGNED9 (int , __cdecl, av_parser_parse2, AVCodecParserContext*,AVCodecContext*, uint8_t **, int *, const uint8_t *, int , int64_t , int64_t , int64_t )
@@ -199,9 +197,9 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
199
197
DEFINE_METHOD1 (AVCodec*, avcodec_find_decoder, (enum AVCodecID p1))
200
198
DEFINE_METHOD1 (AVCodec*, avcodec_find_encoder, (enum AVCodecID p1))
201
199
DEFINE_METHOD1 (int , avcodec_close_dont_call, (AVCodecContext *p1))
202
- DEFINE_METHOD0 (AVFrame*, avcodec_alloc_frame )
203
- DEFINE_METHOD5 (int , avpicture_fill, (AVPicture *p1, uint8_t *p2, PixelFormat p3, int p4, int p5))
204
- DEFINE_METHOD3 (int , avpicture_get_size, (PixelFormat p1, int p2, int p3))
200
+ DEFINE_METHOD0 (AVFrame*, av_frame_alloc )
201
+ DEFINE_METHOD5 (int , avpicture_fill, (AVPicture *p1, uint8_t *p2, AVPixelFormat p3, int p4, int p5))
202
+ DEFINE_METHOD3 (int , avpicture_get_size, (AVPixelFormat p1, int p2, int p3))
205
203
DEFINE_METHOD4 (void , avcodec_string, (char *p1, int p2, AVCodecContext *p3, int p4))
206
204
DEFINE_METHOD2 (void , avcodec_get_context_defaults3, (AVCodecContext *p1, AVCodec *p2))
207
205
DEFINE_METHOD1 (void , av_parser_close, (AVCodecParserContext *p1))
@@ -210,10 +208,9 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
210
208
DEFINE_METHOD8 (int , av_bitstream_filter_filter, (AVBitStreamFilterContext* p1, AVCodecContext* p2, const char * p3, uint8_t ** p4, int * p5, const uint8_t * p6, int p7, int p8))
211
209
DEFINE_METHOD1 (void , av_bitstream_filter_close, (AVBitStreamFilterContext *p1))
212
210
DEFINE_METHOD1 (void , av_free_packet, (AVPacket *p1))
213
- DEFINE_METHOD4 (int , avpicture_alloc, (AVPicture *p1, PixelFormat p2, int p3, int p4))
214
- DEFINE_METHOD2 (int , avcodec_default_get_buffer, (AVCodecContext *p1, AVFrame *p2))
215
- DEFINE_METHOD2 (void , avcodec_default_release_buffer, (AVCodecContext *p1, AVFrame *p2))
216
- DEFINE_METHOD2 (enum PixelFormat, avcodec_default_get_format, (struct AVCodecContext *p1, const enum PixelFormat *p2))
211
+ DEFINE_METHOD4 (int , avpicture_alloc, (AVPicture *p1, AVPixelFormat p2, int p3, int p4))
212
+ DEFINE_METHOD2 (int , avcodec_default_get_buffer2, (AVCodecContext *p1, AVFrame *p2, int flags))
213
+ DEFINE_METHOD2 (enum AVPixelFormat, avcodec_default_get_format, (struct AVCodecContext *p1, const enum AVPixelFormat *p2))
217
214
218
215
DEFINE_METHOD1 (AVCodec*, av_codec_next, (AVCodec *p1))
219
216
BEGIN_METHOD_RESOLVE ()
@@ -222,13 +219,13 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
222
219
RESOLVE_METHOD_RENAME (avcodec_close,avcodec_close_dont_call)
223
220
RESOLVE_METHOD (avcodec_find_decoder)
224
221
RESOLVE_METHOD (avcodec_find_encoder)
225
- RESOLVE_METHOD (avcodec_alloc_frame )
222
+ RESOLVE_METHOD (av_frame_alloc )
226
223
RESOLVE_METHOD_RENAME (avcodec_register_all, avcodec_register_all_dont_call)
227
224
RESOLVE_METHOD (avpicture_fill)
228
225
RESOLVE_METHOD (avcodec_decode_video2)
229
226
RESOLVE_METHOD (avcodec_decode_audio4)
230
227
RESOLVE_METHOD (avcodec_decode_subtitle2)
231
- RESOLVE_METHOD (avcodec_encode_audio )
228
+ RESOLVE_METHOD (avcodec_encode_audio2 )
232
229
RESOLVE_METHOD (avpicture_get_size)
233
230
RESOLVE_METHOD (avcodec_alloc_context3)
234
231
RESOLVE_METHOD (avcodec_string)
@@ -242,8 +239,7 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
242
239
RESOLVE_METHOD (avpicture_free)
243
240
RESOLVE_METHOD (avpicture_alloc)
244
241
RESOLVE_METHOD (av_free_packet)
245
- RESOLVE_METHOD (avcodec_default_get_buffer)
246
- RESOLVE_METHOD (avcodec_default_release_buffer)
242
+ RESOLVE_METHOD (avcodec_default_get_buffer2)
247
243
RESOLVE_METHOD (avcodec_default_get_format)
248
244
RESOLVE_METHOD (av_codec_next)
249
245
RESOLVE_METHOD (av_dup_packet)
0 commit comments