My Project
|
Typedefs | |
typedef struct MMAL_QUEUE_T | MMAL_QUEUE_T |
Functions | |
MMAL_QUEUE_T * | mmal_queue_create (void) |
void | mmal_queue_put (MMAL_QUEUE_T *queue, MMAL_BUFFER_HEADER_T *buffer) |
void | mmal_queue_put_back (MMAL_QUEUE_T *queue, MMAL_BUFFER_HEADER_T *buffer) |
MMAL_BUFFER_HEADER_T * | mmal_queue_get (MMAL_QUEUE_T *queue) |
MMAL_BUFFER_HEADER_T * | mmal_queue_wait (MMAL_QUEUE_T *queue) |
MMAL_BUFFER_HEADER_T * | mmal_queue_timedwait (MMAL_QUEUE_T *queue, VCOS_UNSIGNED timeout) |
unsigned int | mmal_queue_length (MMAL_QUEUE_T *queue) |
void | mmal_queue_destroy (MMAL_QUEUE_T *queue) |
This provides a thread-safe implementation of a queue of buffer headers (MMAL_BUFFER_HEADER_T). The queue works in a first-in, first-out basis so the buffer headers will be dequeued in the order they have been queued.
typedef struct MMAL_QUEUE_T MMAL_QUEUE_T |
Definition at line 43 of file mmal_queue.h.
MMAL_QUEUE_T* mmal_queue_create | ( | void | ) |
Create a queue of MMAL_BUFFER_HEADER_T
void mmal_queue_destroy | ( | MMAL_QUEUE_T * | queue | ) |
Destroy a queue of MMAL_BUFFER_HEADER_T.
queue | Pointer to a queue |
MMAL_BUFFER_HEADER_T* mmal_queue_get | ( | MMAL_QUEUE_T * | queue | ) |
Get a MMAL_BUFFER_HEADER_T from a queue
queue | Pointer to a queue |
unsigned int mmal_queue_length | ( | MMAL_QUEUE_T * | queue | ) |
Get the number of MMAL_BUFFER_HEADER_T currently in a queue.
queue | Pointer to a queue |
void mmal_queue_put | ( | MMAL_QUEUE_T * | queue, |
MMAL_BUFFER_HEADER_T * | buffer | ||
) |
Put a MMAL_BUFFER_HEADER_T into a queue
queue | Pointer to a queue |
buffer | Pointer to the MMAL_BUFFER_HEADER_T to add to the queue |
void mmal_queue_put_back | ( | MMAL_QUEUE_T * | queue, |
MMAL_BUFFER_HEADER_T * | buffer | ||
) |
Put a MMAL_BUFFER_HEADER_T back at the start of a queue. This is used when a buffer header was removed from the queue but not fully processed and needs to be put back where it was originally taken.
queue | Pointer to a queue |
buffer | Pointer to the MMAL_BUFFER_HEADER_T to add to the queue |
MMAL_BUFFER_HEADER_T* mmal_queue_timedwait | ( | MMAL_QUEUE_T * | queue, |
VCOS_UNSIGNED | timeout | ||
) |
Wait for a MMAL_BUFFER_HEADER_T from a queue, up to a given timeout. This is the same as a wait, except that it will abort in case of timeout.
queue | Pointer to a queue |
timeout | Number of milliseconds to wait before returning if the semaphore can't be acquired. |
MMAL_BUFFER_HEADER_T* mmal_queue_wait | ( | MMAL_QUEUE_T * | queue | ) |
Wait for a MMAL_BUFFER_HEADER_T from a queue. This is the same as a get except that this will block until a buffer header is available.
queue | Pointer to a queue |