Pausing/resuming buffering of HTTP-delivered media?
Samuel de Moura
samueldemouramoreira at gmail.com
Tue Mar 9 12:06:57 UTC 2021
I'm currently developing an application where I need to have control over the buffering of HTTP-delivered media. Specifically, I need to at least be able to pause/resume buffering even before preroll has finished. The pipeline is just a regular playbin with custom audio/video/text sinks.
Initially I tried setting the connection-speed property on the playbin itself before discovering that it's not an actual speed limiter. After that, I tried iterating over the elements in the bin and, for each queue/queue2/multiqueue object, changing its size limit to the amount of data it was currently holding (and, since this needs to happen before preroll finishes, I also added an element-added callback to also set the properties on any new queue elements that may get added to the pipeline). That also didn't work: the bus keeps receiving buffering messages in a pattern like 0%-4%-0%-4%-0% for a few seconds, and then simply proceeds to buffer normally after a little while.
My next idea was to go mess with souphttpsrc's implementation directly, but before doing that I came here to ask for help in case there's a simpler solution I'm missing.
More information about the gstreamer-devel