1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavc: provide deprecated avcodec_thread_init until next major version

It was deprecated only recently.
This commit is contained in:
Anton Khirnov 2011-04-20 17:21:39 +02:00
parent 095290f9a4
commit 65af48b559
3 changed files with 19 additions and 0 deletions

View File

@ -3577,6 +3577,14 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt); enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
#if FF_API_THREAD_INIT
/**
* @deprecated Set s->thread_count before calling avcodec_open() instead of calling this.
*/
attribute_deprecated
int avcodec_thread_init(AVCodecContext *s, int thread_count);
#endif
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size); int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count); int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
//FIXME func typedef //FIXME func typedef

View File

@ -1220,3 +1220,11 @@ void ff_thread_await_progress(AVFrame *f, int progress, int field)
} }
#endif #endif
#if FF_API_THREAD_INIT
int avcodec_thread_init(AVCodecContext *s, int thread_count)
{
s->thread_count = thread_count;
return ff_thread_init(s);
}
#endif

View File

@ -65,5 +65,8 @@
#ifndef FF_API_OPT_H #ifndef FF_API_OPT_H
#define FF_API_OPT_H (LIBAVCODEC_VERSION_MAJOR < 54) #define FF_API_OPT_H (LIBAVCODEC_VERSION_MAJOR < 54)
#endif #endif
#ifndef FF_API_THREAD_INIT
#define FF_API_THREAD_INIT (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
#endif /* AVCODEC_VERSION_H */ #endif /* AVCODEC_VERSION_H */