1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avfilter/framequeue: add support for limiting and tracking buffered frames in the queues

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint
2025-07-06 10:03:46 +02:00
parent 35a6de137a
commit 71468e85ae
2 changed files with 22 additions and 3 deletions

View File

@@ -40,11 +40,18 @@ typedef struct FFFrameBucket {
*
* This structure is intended to allow implementing global control of the
* frame queues, including memory consumption caps.
*
* It is currently empty.
*/
typedef struct FFFrameQueueGlobal {
char dummy; /* C does not allow empty structs */
/**
* Maximum number of allowed frames in the queues combined.
*/
size_t max_queued;
/**
* Total number of queued frames in the queues combined.
*/
size_t queued;
} FFFrameQueueGlobal;
/**
@@ -52,6 +59,11 @@ typedef struct FFFrameQueueGlobal {
*/
typedef struct FFFrameQueue {
/**
* Pointer to the global frame queue struct holding statistics and limits
*/
FFFrameQueueGlobal *global;
/**
* Array of allocated buckets, used as a circular buffer.
*/