Go to the documentation of this file.
28 #if HAVE_PTHREAD_CANCEL
29 #define DNNCond pthread_cond_t
30 #define dnn_cond_init pthread_cond_init
31 #define dnn_cond_destroy pthread_cond_destroy
32 #define dnn_cond_signal pthread_cond_signal
33 #define dnn_cond_wait pthread_cond_wait
static int ff_mutex_init(AVMutex *mutex, const void *attr)
int ff_queue_push_front(Queue *q, void *v)
Add data to the head of the queue.
void * ff_safe_queue_pop_front(SafeQueue *sq)
Remove and free first element from the queue in SafeQueue.
void * ff_queue_pop_front(Queue *q)
Remove and free first element from the Queue.
size_t ff_queue_size(Queue *q)
Return the length of the Queue.
Double-ended queue with mutex locks ensuring data consistency while multithreading.
int ff_safe_queue_push_front(SafeQueue *sq, void *v)
Add data to the head of queue in the SafeQueue after locking mutex.
static int dnn_cond_wait(DNNCond *cond, AVMutex *mutex)
static int ff_mutex_unlock(AVMutex *mutex)
Queue * ff_queue_create(void)
Create a Queue instance.
Linear double-ended data structure.
int ff_queue_push_back(Queue *q, void *v)
Add data to the tail of the queue.
void ff_queue_destroy(Queue *q)
Destroy the Queue instance.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
size_t ff_safe_queue_size(SafeQueue *sq)
Return the length of the SafeQueue.
SafeQueue * ff_safe_queue_create(void)
Create and initialize a SafeQueue instance.
static int dnn_cond_signal(DNNCond *cond)
static int dnn_cond_destroy(DNNCond *cond)
static int ff_mutex_destroy(AVMutex *mutex)
static int dnn_cond_init(DNNCond *cond, const void *attr)
void ff_safe_queue_destroy(SafeQueue *sq)
Destroy the SafeQueue instance.
static int ff_mutex_lock(AVMutex *mutex)
int ff_safe_queue_push_back(SafeQueue *sq, void *v)
Add data to the tail of queue in the SafeQueue after locking mutex.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
int(* cond)(enum AVPixelFormat pix_fmt)