gst: add rate control to the sink

Track the elapsed time between buffers and try to keep the buffer fill
level constant by changing the rate of the stream.

See #4374
This commit is contained in:
Wim Taymans 2024-11-26 17:45:41 +01:00
parent 22f0b858b1
commit 9419a12e74
5 changed files with 66 additions and 7 deletions

View file

@ -50,6 +50,8 @@ struct _GstPipeWireSink {
/* video state */
gboolean negotiated;
gboolean rate_match;
gint rate;
GstPipeWireSinkMode mode;
};