Multithreading. More...
Typedefs | |
typedef void(* | gavl_video_process_func )(void *data, int start, int end) |
Prototype of a process function. | |
typedef void(* | gavl_video_run_func )(gavl_video_process_func func, void *gavl_data, int start, int end, void *client_data, int thread) |
Run a piece of a calculation. | |
typedef void(* | gavl_video_stop_func )(void *client_data, int thread) |
Wait until a piece of a calculation finished. |
Multithreading.
gavl has generic multithreading support for video processing. It's done by splitting the calculations in smaller pieces (usually slices of the destination images) and calling user supplied functions, which can transfer the tasks to worker threads. Multithreading is configured with gavl_video_options_set_num_threads, gavl_video_options_set_run_func and gavl_video_options_set_stop_func
typedef void(* gavl_video_process_func)(void *data, int start, int end) |
Prototype of a process function.
data | Private data
|
typedef void(* gavl_video_run_func)(gavl_video_process_func func, void *gavl_data, int start, int end, void *client_data, int thread) |
Run a piece of a calculation.
func | Function to execute
|
typedef void(* gavl_video_stop_func)(void *client_data, int thread) |
Wait until a piece of a calculation finished.
client_data Data passed with gavl_video_options_set_stop_func
thread | Number of processing thread (starting with 0) |