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
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static int ff_mutex_unlock(AVMutex *mutex)
static int ff_mutex_lock(AVMutex *mutex)
static int ff_mutex_destroy(AVMutex *mutex)
static int ff_mutex_init(AVMutex *mutex, const void *attr)
Memory handling functions.
int(* cond)(enum AVPixelFormat pix_fmt)
void ff_queue_destroy(Queue *q)
Destroy the Queue instance.
int ff_queue_push_front(Queue *q, void *v)
Add data to the head of the queue.
void * ff_queue_pop_front(Queue *q)
Remove and free first element from the Queue.
int ff_queue_push_back(Queue *q, void *v)
Add data to the tail of the queue.
size_t ff_queue_size(Queue *q)
Return the length of the Queue.
Queue * ff_queue_create(void)
Create a Queue instance.
int ff_safe_queue_push_back(SafeQueue *sq, void *v)
Add data to the tail of queue in the SafeQueue after locking mutex.
int ff_safe_queue_push_front(SafeQueue *sq, void *v)
Add data to the head of queue in the SafeQueue after locking mutex.
void ff_safe_queue_wait_for_size(SafeQueue *sq, size_t min_size)
Wait until queue length reaches at least min_size.
static int dnn_cond_init(DNNCond *cond, const void *attr)
static int dnn_cond_destroy(DNNCond *cond)
void * ff_safe_queue_pop_front(SafeQueue *sq)
Remove and free first element from the queue in SafeQueue.
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_wait(DNNCond *cond, AVMutex *mutex)
void ff_safe_queue_destroy(SafeQueue *sq)
Destroy the SafeQueue instance.
Linear double-ended data structure.
Double-ended queue with mutex locks ensuring data consistency while multithreading.