Go to the source code of this file.
◆ AVThreadMessageFlags
◆ AVThreadMessageQueue
◆ 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.
|
◆ av_thread_message_flush()
Flush the message queue
This function is mostly equivalent to reading and free-ing every message except that it will be done in a single operation (no lock/unlock between reads).
◆ av_thread_message_queue_alloc()
Allocate a new message queue.
- Parameters
-
mq | pointer to the message queue |
nelem | maximum number of elements in the queue |
elsize | size of each element in the queue |
- Returns
- >=0 for success; <0 for error, in particular AVERROR(ENOSYS) if lavu was built without thread support
◆ av_thread_message_queue_free()
Free a message queue.
The message queue must no longer be in use by another thread.
◆ av_thread_message_queue_recv()
Receive a message from the queue.
◆ av_thread_message_queue_send()
Send a message on the queue.
◆ av_thread_message_queue_set_err_recv()
Set the receiving 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.
◆ av_thread_message_queue_set_err_send()
Set the sending 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.
◆ av_thread_message_queue_set_free_func()
void av_thread_message_queue_set_free_func |
( |
AVThreadMessageQueue * |
mq, |
|
|
void(*)(void *msg) |
free_func |
|
) |
| |
Set the optional free message callback function which will be called if an operation is removing messages from the queue.