47 static void worker_func(
void *priv,
int jobnr,
int threadnr,
int nb_jobs,
int nb_threads)
50 int ret = c->
func(c->
ctx, c->
arg, jobnr, nb_jobs);
61 void *
arg,
int *ret,
int nb_jobs)
81 return FFMAX(nb_threads, 1);
106 return (ret < 0) ? ret : 0;
static av_unused void w32thread_init(void)
int thread_type
Type of multithreading allowed for filters in this graph.
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...
struct AVFilterGraph * graph
filtergraph this filter belongs to
struct AVSliceThread AVSliceThread
int nb_threads
Maximum number of threads used by filters in this graph.
static void worker_func(void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads)
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...
void ff_graph_thread_free(AVFilterGraph *graph)
void avpriv_slicethread_free(AVSliceThread **pctx)
Destroy slice threading context.
AVFilterGraphInternal * internal
Opaque object for libavfilter internal use.
int avpriv_slicethread_create(AVSliceThread **pctx, void *priv, void(*worker_func)(void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads), void(*main_func)(void *priv), int nb_threads)
Create slice threading context.
static void slice_thread_uninit(ThreadContext *c)
void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_main)
Execute slice threading.
int(* func)(AVBPrint *dst, const char *in, const char *arg)
static int thread_init_internal(ThreadContext *c, int nb_threads)
common internal and external API header
avfilter_execute_func * thread_execute
int ff_graph_thread_init(AVFilterGraph *graph)