FFmpeg
|
Go to the source code of this file.
Enumerations | |
enum | AVThreadMessageFlags { AV_THREAD_MESSAGE_NONBLOCK = 1 } |
Functions | |
int | av_thread_message_queue_alloc (AVThreadMessageQueue **mq, unsigned nelem, unsigned elsize) |
Allocate a new message queue. More... | |
void | av_thread_message_queue_free (AVThreadMessageQueue **mq) |
Free a message queue. More... | |
int | av_thread_message_queue_send (AVThreadMessageQueue *mq, void *msg, unsigned flags) |
Send a message on the queue. More... | |
int | av_thread_message_queue_recv (AVThreadMessageQueue *mq, void *msg, unsigned flags) |
Receive a message from the queue. More... | |
void | av_thread_message_queue_set_err_send (AVThreadMessageQueue *mq, int err) |
Set the sending error code. More... | |
void | av_thread_message_queue_set_err_recv (AVThreadMessageQueue *mq, int err) |
Set the receiving error code. More... | |
enum AVThreadMessageFlags |
Enumerator | |
---|---|
AV_THREAD_MESSAGE_NONBLOCK |
Perform non-blocking operation. If this flag is set, send and recv operations are non-blocking and return AVERROR(EAGAIN) immediately if they can not proceed. |
Definition at line 24 of file threadmessage.h.
int av_thread_message_queue_alloc | ( | AVThreadMessageQueue ** | mq, |
unsigned | nelem, | ||
unsigned | elsize | ||
) |
Allocate a new message queue.
mq | pointer to the message queue |
nelem | maximum number of elements in the queue |
elsize | size of each element in the queue |
Definition at line 48 of file threadmessage.c.
void av_thread_message_queue_free | ( | AVThreadMessageQueue ** | mq | ) |
Free a message queue.
The message queue must no longer be in use by another thread.
Definition at line 84 of file threadmessage.c.
int av_thread_message_queue_send | ( | AVThreadMessageQueue * | mq, |
void * | msg, | ||
unsigned | flags | ||
) |
Send a message on the queue.
Definition at line 132 of file threadmessage.c.
int av_thread_message_queue_recv | ( | AVThreadMessageQueue * | mq, |
void * | msg, | ||
unsigned | flags | ||
) |
Receive a message from the queue.
Definition at line 148 of file threadmessage.c.
void av_thread_message_queue_set_err_send | ( | AVThreadMessageQueue * | mq, |
int | err | ||
) |
Set the sending error code.
If the error code is set to non-zero, av_thread_message_queue_recv() will return it immediately when there are no longer available messages. Conventional values, such as AVERROR_EOF or AVERROR(EAGAIN), can be used to cause the receiving thread to stop or suspend its operation.
Definition at line 164 of file threadmessage.c.
void av_thread_message_queue_set_err_recv | ( | AVThreadMessageQueue * | mq, |
int | err | ||
) |
Set the receiving error code.
If the error code is set to non-zero, av_thread_message_queue_send() will return it immediately. Conventional values, such as AVERROR_EOF or AVERROR(EAGAIN), can be used to cause the sending thread to stop or suspend its operation.
Definition at line 175 of file threadmessage.c.