FFmpeg
|
#include "avcodec.h"
Go to the source code of this file.
Macros | |
#define | MAX_AUTO_THREADS 16 |
#define | THREAD_SENTINEL 0 |
#define | OFFSET_ARRAY(...) __VA_ARGS__, THREAD_SENTINEL |
Macros to help creating the above lists. More... | |
#define | DEFINE_OFFSET_ARRAY(type, name, cnt_variable, mutexes, conds) |
Functions | |
int | ff_slice_thread_init (AVCodecContext *avctx) |
void | ff_slice_thread_free (AVCodecContext *avctx) |
int | ff_frame_thread_init (AVCodecContext *avctx) |
void | ff_frame_thread_free (AVCodecContext *avctx, int thread_count) |
int | ff_pthread_init (void *obj, const unsigned offsets[]) |
Initialize/destroy a list of mutexes/conditions contained in a structure. More... | |
void | ff_pthread_free (void *obj, const unsigned offsets[]) |
#define MAX_AUTO_THREADS 16 |
Definition at line 26 of file pthread_internal.h.
#define THREAD_SENTINEL 0 |
Definition at line 34 of file pthread_internal.h.
#define OFFSET_ARRAY | ( | ... | ) | __VA_ARGS__, THREAD_SENTINEL |
Macros to help creating the above lists.
mutexes and conds need to be parentheses-enclosed lists of offsets in the containing structure.
Definition at line 60 of file pthread_internal.h.
Definition at line 61 of file pthread_internal.h.
int ff_slice_thread_init | ( | AVCodecContext * | avctx | ) |
Definition at line 134 of file pthread_slice.c.
Referenced by ff_thread_init().
void ff_slice_thread_free | ( | AVCodecContext * | avctx | ) |
Definition at line 82 of file pthread_slice.c.
Referenced by ff_thread_free().
int ff_frame_thread_init | ( | AVCodecContext * | avctx | ) |
Definition at line 836 of file pthread_frame.c.
Referenced by ff_thread_init().
void ff_frame_thread_free | ( | AVCodecContext * | avctx, |
int | thread_count | ||
) |
Definition at line 696 of file pthread_frame.c.
Referenced by ff_frame_thread_init(), and ff_thread_free().
int ff_pthread_init | ( | void * | obj, |
const unsigned | offsets[] | ||
) |
Initialize/destroy a list of mutexes/conditions contained in a structure.
The positions of these mutexes/conditions in the structure are given by their offsets. Because it is undefined behaviour to destroy an uninitialized mutex/condition, ff_pthread_init() stores the number of successfully initialized mutexes and conditions in the object itself and ff_pthread_free() uses this number to destroy exactly the mutexes and condition variables that have been successfully initialized.
obj | The object containing the mutexes/conditions. | |
[in] | offsets | An array of offsets. Its first member gives the offset of the variable that contains the count of successfully initialized mutexes/condition variables; said variable must be an unsigned int. Two arrays of offsets, each delimited by a THREAD_SENTINEL follow. The first contains the offsets of all the mutexes, the second contains the offsets of all the condition variables. |
Definition at line 104 of file pthread.c.
Referenced by ff_frame_thread_encoder_init(), ff_frame_thread_init(), init_thread(), omx_encode_init(), and vp9_decode_init().
void ff_pthread_free | ( | void * | obj, |
const unsigned | offsets[] | ||
) |
Definition at line 91 of file pthread.c.
Referenced by cleanup(), ff_frame_thread_encoder_free(), ff_frame_thread_free(), ff_frame_thread_init(), and vp9_decode_free().