#include <limits.h>
#include <stddef.h>
#include "error.h"
#include "fifo.h"
#include "mem.h"
#include "threadmessage.h"
#include "thread.h"
struct AVThreadMessageQueue { … };
int av_thread_message_queue_alloc(AVThreadMessageQueue **mq,
unsigned nelem,
unsigned elsize)
{ … }
void av_thread_message_queue_set_free_func(AVThreadMessageQueue *mq,
void (*free_func)(void *msg))
{ … }
void av_thread_message_queue_free(AVThreadMessageQueue **mq)
{ … }
int av_thread_message_queue_nb_elems(AVThreadMessageQueue *mq)
{ … }
#if HAVE_THREADS
static int av_thread_message_queue_send_locked(AVThreadMessageQueue *mq,
void *msg,
unsigned flags)
{ … }
static int av_thread_message_queue_recv_locked(AVThreadMessageQueue *mq,
void *msg,
unsigned flags)
{ … }
#endif
int av_thread_message_queue_send(AVThreadMessageQueue *mq,
void *msg,
unsigned flags)
{ … }
int av_thread_message_queue_recv(AVThreadMessageQueue *mq,
void *msg,
unsigned flags)
{ … }
void av_thread_message_queue_set_err_send(AVThreadMessageQueue *mq,
int err)
{ … }
void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq,
int err)
{ … }
#if HAVE_THREADS
static int free_func_wrap(void *arg, void *buf, size_t *nb_elems)
{ … }
#endif
void av_thread_message_flush(AVThreadMessageQueue *mq)
{ … }