Go to the documentation of this file.
67 "Application has requested %d threads. Using a thread count greater than %d is not recommended.\n",
93 unsigned cnt = *(
unsigned*)((
char*)obj +
offsets[0]);
94 const unsigned *cur_offset =
offsets;
96 *(
unsigned*)((
char*)obj +
offsets[0]) = 0;
106 const unsigned *cur_offset =
offsets;
110 #define PTHREAD_INIT_LOOP(type) \
111 for (; *(++cur_offset) != THREAD_SENTINEL; cnt++) { \
112 pthread_ ## type ## _t *dst = (void*)((char*)obj + *cur_offset); \
113 err = pthread_ ## type ## _init(dst, NULL); \
115 err = AVERROR(err); \
123 *(
unsigned*)((
char*)obj +
offsets[0]) = cnt;
int ff_slice_thread_init(AVCodecContext *avctx)
#define AV_LOG_WARNING
Something somehow does not look correct.
int capabilities
Codec capabilities.
int ff_thread_init(AVCodecContext *avctx)
av_cold void ff_pthread_free(void *obj, const unsigned offsets[])
void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
const struct AVCodec * codec
int thread_count
thread count is used to decide how many independent tasks should be passed to execute()
int flags
AV_CODEC_FLAG_*.
#define AV_CODEC_FLAG_LOW_DELAY
Force low delay.
static const int offsets[]
int thread_type
Which multithreading methods to use.
static void validate_thread_parameters(AVCodecContext *avctx)
Set the threading algorithms used.
void ff_thread_free(AVCodecContext *avctx)
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
int flags2
AV_CODEC_FLAG2_*.
static const av_always_inline FFCodec * ffcodec(const AVCodec *codec)
#define FF_THREAD_SLICE
Decode more than one part of a single frame at once.
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond)
#define FF_THREAD_FRAME
Decode more than one frame at once.
static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex)
unsigned caps_internal
Internal codec capabilities FF_CODEC_CAP_*.
int ff_frame_thread_init(AVCodecContext *avctx)
#define AV_CODEC_FLAG2_CHUNKS
Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries.
main external API structure.
int active_thread_type
Which multithreading methods are in use by the codec.
void ff_slice_thread_free(AVCodecContext *avctx)
#define PTHREAD_INIT_LOOP(type)
av_cold int ff_pthread_init(void *obj, const unsigned offsets[])
Initialize/destroy a list of mutexes/conditions contained in a structure.
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
int(* cond)(enum AVPixelFormat pix_fmt)