GstQueue "half full" signal?

turbogrill carl.hakenas at gmail.com
Wed Jan 6 13:50:08 UTC 2021


Hi,

Is there a clever way to know if a GstQueue is half full? (I can't use
Queue2)

Ideally I would like to have a "halffull" signal similar to how there is a
overrun/underrun signal.
I might be able to play around with the threshold but that would introduce
latency.

My current plan is to call the "current-level-bytes" property from a timer
that runs often.
I haven't got it working yet but it's obviously not the most elegant
solution.

Is there a user callback that can be invoked everytime there is new
data/buffer pushed into the queue? That way I could read the amount of data
there. Maybe on the queue pad?


My application is pretty straight forward, it streams data from a cam to
YouTube. I have a leaky Queue that will signal when the buffer is overrun
and I will then lower the bitrate/resolution. Getting a half full event
would make the rate controller even better.





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list