Running time problem with fast element

Gabor Karsay gabor.karsay at
Sun Jun 13 16:30:23 UTC 2021


I have a problem adjusting the running time I guess.
I have a custom bin with a custom element that is processing audio 
(speech recognition) faster than real-time and pushing the buffers to a 
fakesink. (Results are on the message bus.) The processing speed is not 
constant. The pipeline is driven by a playbin element, the source is 

My problem are position queries to the pipeline. If in playing state, 
everything is fine, however in paused state the query returns the 
running-time (time needed to process the audio) and this results in 
strange jumps of the reported position when changing from paused to 
playing or from playing to paused.

I guess I have to correct the running time. I thought of using 
gst_element_set_start_time(). Setting the current position as start_time 
in the _change_state function of the processing element didn't work, nor 
setting it in the same element for the parent bin.

I have no clue what to do, sending an event or a query? Which one? 
Downstream or upstream? Is it possible to handle this in the element so 
that I can reuse the element in other pipelines?

Could anyone please shed some light on this or give me a clue in which 
direction I should go?


More information about the gstreamer-devel mailing list