Go to the source code of this file.
| 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.
Allocate a new message queue.
Definition at line 42 of file threadmessage.c.
Referenced by android_camera_read_header(), fifo_init(), and main().
Free a message queue.
The message queue must no longer be in use by another thread.
Definition at line 93 of file threadmessage.c.
Referenced by android_camera_read_close(), fifo_deinit(), and main().
Send a message on the queue.
Definition at line 158 of file threadmessage.c.
Referenced by fifo_write_packet(), fifo_write_trailer(), image_available(), and sender_thread().
Receive a message from the queue.
Definition at line 174 of file threadmessage.c.
Referenced by android_camera_read_close(), android_camera_read_packet(), fifo_consumer_thread(), and receiver_thread().
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.
Definition at line 190 of file threadmessage.c.
Referenced by android_camera_read_close(), fifo_consumer_thread(), and receiver_thread().
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.
Definition at line 201 of file threadmessage.c.
Referenced by fifo_write_trailer(), image_available(), and sender_thread().
Set the optional free message callback function which will be called if an operation is removing messages from the queue.
Definition at line 85 of file threadmessage.c.
Referenced by fifo_init(), and main().
Return the current number of messages in the queue.
Definition at line 107 of file threadmessage.c.
Referenced by receiver_thread().
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).
Definition at line 223 of file threadmessage.c.
Referenced by av_thread_message_queue_free(), fifo_consumer_thread(), receiver_thread(), and sender_thread().