Go to the documentation of this file.
22 #ifndef AVFILTER_FRAMEQUEUE_H
23 #define AVFILTER_FRAMEQUEUE_H
FFFrameBucket first_bucket
Pre-allocated bucket for queues of size 1.
int ff_framequeue_add(FFFrameQueue *fq, AVFrame *frame)
Add a frame.
This structure describes decoded (raw) audio or video data.
FFFrameBucket * queue
Array of allocated buckets, used as a circular buffer.
size_t allocated
Size of the array of buckets.
FFFrameQueue: simple AVFrame queue API.
uint64_t total_samples_tail
Total number of samples dequeued from the queue.
size_t queued
Number of currently queued frames.
int samples_skipped
Indicate that samples are skipped.
Structure to hold global options and statistics for frame queues.
void ff_framequeue_global_init(FFFrameQueueGlobal *fqg)
Init a global structure.
AVFrame * ff_framequeue_peek(FFFrameQueue *fq, size_t idx)
Access a frame in the queue, without removing it.
void ff_framequeue_skip_samples(FFFrameQueue *fq, size_t samples, AVRational time_base)
Skip samples from the first frame in the queue.
Rational number (pair of numerator and denominator).
uint64_t total_frames_head
Total number of frames entered in the queue.
Queue of AVFrame pointers.
size_t tail
Tail of the queue.
uint64_t total_samples_head
Total number of samples entered in the queue.
static uint64_t ff_framequeue_queued_samples(const FFFrameQueue *fq)
Get the number of queued samples.
void ff_framequeue_init(FFFrameQueue *fq, FFFrameQueueGlobal *fqg)
Init a frame queue and attach it to a global structure.
uint64_t total_frames_tail
Total number of frames dequeued from the queue.
static size_t ff_framequeue_queued_frames(const FFFrameQueue *fq)
Get the number of queued frames.
AVFrame * ff_framequeue_take(FFFrameQueue *fq)
Take the first frame in the queue.
Filter the word “frame” indicates either a video frame or a group of audio samples
void ff_framequeue_free(FFFrameQueue *fq)
Free the queue and all queued frames.
static void ff_framequeue_update_peeked(FFFrameQueue *fq, size_t idx)
Update the statistics after a frame accessed using ff_framequeue_peek() was modified.