#include "avfilter.h"
#include "libavutil/avassert.h"
Go to the source code of this file.
Data Structures | |
struct | FFBufQueue |
Structure holding the queue. More... | |
Defines | |
#define | FF_BUFQUEUE_SIZE 32 |
FFBufQueue: simple AVFilterBufferRef queue API. | |
#define | BUCKET(i) queue->queue[(queue->head + (i)) % FF_BUFQUEUE_SIZE] |
Functions | |
static void | ff_bufqueue_add (void *log, struct FFBufQueue *queue, AVFilterBufferRef *buf) |
Add a buffer to the queue. | |
static AVFilterBufferRef * | ff_bufqueue_peek (struct FFBufQueue *queue, unsigned index) |
Get a buffer from the queue without altering it. | |
static AVFilterBufferRef * | ff_bufqueue_get (struct FFBufQueue *queue) |
Get the first buffer from the queue and remove it. | |
static void | ff_bufqueue_discard_all (struct FFBufQueue *queue) |
Unref and remove all buffers from the queue. |
#define BUCKET | ( | i | ) | queue->queue[(queue->head + (i)) % FF_BUFQUEUE_SIZE] |
Definition at line 55 of file bufferqueue.h.
Referenced by ff_bufqueue_add(), and ff_bufqueue_peek().
#define FF_BUFQUEUE_SIZE 32 |
FFBufQueue: simple AVFilterBufferRef queue API.
Note: this API is not thread-safe. Concurrent access to the same queue must be protected by a mutex or any synchronization mechanism. Maximum size of the queue.
This value can be overridden by definying it before including this header. Powers of 2 are recommended.
Definition at line 40 of file bufferqueue.h.
static void ff_bufqueue_add | ( | void * | log, | |
struct FFBufQueue * | queue, | |||
AVFilterBufferRef * | buf | |||
) | [inline, static] |
Add a buffer to the queue.
If the queue is already full, then the current last buffer is dropped (and unrefed) with a warning before adding the new buffer.
Definition at line 63 of file bufferqueue.h.
Referenced by end_frame(), end_frame_over(), filter_samples(), process_frame(), and start_frame_main().
static void ff_bufqueue_discard_all | ( | struct FFBufQueue * | queue | ) | [inline, static] |
Unref and remove all buffers from the queue.
Definition at line 103 of file bufferqueue.h.
Referenced by uninit().
static AVFilterBufferRef* ff_bufqueue_get | ( | struct FFBufQueue * | queue | ) | [inline, static] |
Get the first buffer from the queue and remove it.
Do not use on an empty queue.
Definition at line 90 of file bufferqueue.h.
Referenced by end_frame(), ff_bufqueue_discard_all(), flush_segment(), try_start_frame(), and try_start_next_frame().
static AVFilterBufferRef* ff_bufqueue_peek | ( | struct FFBufQueue * | queue, | |
unsigned | index | |||
) | [inline, static] |
Get a buffer from the queue without altering it.
Buffer with index 0 is the first buffer in the queue. Return NULL if the queue has not enough buffers.
Definition at line 79 of file bufferqueue.h.
Referenced by end_frame(), filter_samples(), request_frame(), try_start_frame(), and try_start_next_frame().