|
FFmpegKit iOS / macOS / tvOS API 6.0
|
Go to the source code of this file.
Typedefs | |
| typedef struct ThreadQueue | ThreadQueue |
Functions | |
| ThreadQueue * | tq_alloc (unsigned int nb_streams, size_t queue_size, ObjPool *obj_pool, void(*obj_move)(void *dst, void *src)) |
| void | tq_free (ThreadQueue **tq) |
| int | tq_send (ThreadQueue *tq, unsigned int stream_idx, void *data) |
| void | tq_send_finish (ThreadQueue *tq, unsigned int stream_idx) |
| int | tq_receive (ThreadQueue *tq, int *stream_idx, void *data) |
| void | tq_receive_finish (ThreadQueue *tq, unsigned int stream_idx) |
| typedef struct ThreadQueue ThreadQueue |
Definition at line 39 of file fftools_thread_queue.h.
| ThreadQueue * tq_alloc | ( | unsigned int | nb_streams, |
| size_t | queue_size, | ||
| ObjPool * | obj_pool, | ||
| void(*)(void *dst, void *src) | obj_move | ||
| ) |
Allocate a queue for sending data between threads.
| nb_streams | number of streams for which a distinct EOF state is maintained |
| queue_size | number of items that can be stored in the queue without blocking |
| obj_pool | object pool that will be used to allocate items stored in the queue; the pool becomes owned by the queue |
| callback | that moves the contents between two data pointers |
Definition at line 93 of file fftools_thread_queue.c.
| void tq_free | ( | ThreadQueue ** | tq | ) |
Definition at line 69 of file fftools_thread_queue.c.
| int tq_receive | ( | ThreadQueue * | tq, |
| int * | stream_idx, | ||
| void * | data | ||
| ) |
Read the next item from the queue.
| stream_idx | the index of the stream that was processed or -1 will be written here |
| data | the data item will be written here on success using the callback provided to tq_alloc() |
Definition at line 205 of file fftools_thread_queue.c.
| void tq_receive_finish | ( | ThreadQueue * | tq, |
| unsigned int | stream_idx | ||
| ) |
Mark the given stream finished from the receiving side.
Definition at line 246 of file fftools_thread_queue.c.
| int tq_send | ( | ThreadQueue * | tq, |
| unsigned int | stream_idx, | ||
| void * | data | ||
| ) |
Send an item for the given stream to the queue.
| data | the item to send, its contents will be moved using the callback provided to tq_alloc(); on failure the item will be left untouched |
Definition at line 134 of file fftools_thread_queue.c.
| void tq_send_finish | ( | ThreadQueue * | tq, |
| unsigned int | stream_idx | ||
| ) |
Mark the given stream finished from the sending side.
Definition at line 231 of file fftools_thread_queue.c.