Go to the documentation of this file.
19 #ifndef FFTOOLS_THREAD_QUEUE_H
20 #define FFTOOLS_THREAD_QUEUE_H
81 #endif // FFTOOLS_THREAD_QUEUE_H
void(* obj_move)(void *dst, void *src)
int tq_send(ThreadQueue *tq, unsigned int stream_idx, void *data)
Send an item for the given stream to the queue.
void tq_send_finish(ThreadQueue *tq, unsigned int stream_idx)
Mark the given stream finished from the sending side.
void tq_receive_finish(ThreadQueue *tq, unsigned int stream_idx)
Mark the given stream finished from the receiving side.
ThreadQueue * tq_alloc(unsigned int nb_streams, size_t queue_size, ObjPool *obj_pool, void(*obj_move)(void *dst, void *src))
Allocate a queue for sending data between threads.
void tq_free(ThreadQueue **tq)
int tq_receive(ThreadQueue *tq, int *stream_idx, void *data)
Read the next item from the queue.