56 static void* attribute_align_arg
worker(
void *v)
61 unsigned int last_execute = 0;
119 void *
arg,
int *ret,
int nb_jobs)
151 nb_threads = nb_cpus + 1;
173 for (i = 0; i < nb_threads; i++) {
210 return (ret < 0) ? ret : 0;
static av_unused void w32thread_init(void)
static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex)
int thread_type
Type of multithreading allowed for filters in this graph.
#define pthread_mutex_lock(a)
static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
Main libavfilter public API header.
Memory handling functions.
static int thread_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
avfilter_action_func * func
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
static void slice_thread_park_workers(ThreadContext *c)
pthread_cond_t last_job_cond
static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond)
struct AVFilterGraph * graph
filtergraph this filter belongs to
int nb_threads
Maximum number of threads used by filters in this graph.
static av_always_inline int pthread_cond_signal(pthread_cond_t *cond)
int( avfilter_action_func)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
A function pointer passed to the AVFilterGraph::execute callback to be executed multiple times...
static void * av_mallocz_array(size_t nmemb, size_t size)
void ff_graph_thread_free(AVFilterGraph *graph)
pthread_mutex_t current_job_lock
static av_always_inline int pthread_join(pthread_t thread, void **value_ptr)
static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
#define pthread_mutex_unlock(a)
pthread_cond_t current_job_cond
static av_always_inline int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
AVFilterGraphInternal * internal
Opaque object for libavfilter internal use.
static void slice_thread_uninit(ThreadContext *c)
int(* func)(AVBPrint *dst, const char *in, const char *arg)
static int thread_init_internal(ThreadContext *c, int nb_threads)
static void *attribute_align_arg worker(void *v)
common internal and external API header
unsigned int current_execute
static av_always_inline int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
avfilter_execute_func * thread_execute
static av_always_inline int pthread_cond_broadcast(pthread_cond_t *cond)
int ff_graph_thread_init(AVFilterGraph *graph)