diff options
author | Marton Balint <cus@passwd.hu> | 2025-07-06 10:03:46 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2025-07-14 22:03:36 +0200 |
commit | 71468e85ae720cb63aa9689f0d94e9e9689b9de9 (patch) | |
tree | 94b791807a25eb401dae1127dfb9b1d63995a12b /libavfilter/framequeue.h | |
parent | 35a6de137a39f274d5e01ed0e0e6c4f04d0aaf07 (diff) | |
download | ffmpeg-71468e85ae720cb63aa9689f0d94e9e9689b9de9.tar.gz |
avfilter/framequeue: add support for limiting and tracking buffered frames in the queues
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavfilter/framequeue.h')
-rw-r--r-- | libavfilter/framequeue.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libavfilter/framequeue.h b/libavfilter/framequeue.h index c49d872e85..405a43c65d 100644 --- a/libavfilter/framequeue.h +++ b/libavfilter/framequeue.h @@ -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; /** @@ -53,6 +60,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. */ FFFrameBucket *queue; |