Src element changes stream position by itself

Nicolas Dufresne nicolas at
Wed Apr 5 18:17:41 UTC 2023

Le mercredi 05 avril 2023 à 16:04 +0300, Vladan Jovanovic via gstreamer-devel a
écrit :
> Hi
> I hope somebody can clarify the following question: what causes the stream
> position of a src (uridecodebin3) element in PLAYING state to change when
> adding it dynamically to a pipeline (which is also in PLAYING state but with
> different base_time and running_time)?
> I can see that after a gst_bin_add() of the src element to a pipeline,
> base_time of the src element is changed (I understand it is by the pipeline
> which manages base_time for all it's elements).

> What is confusing is that stream position changes at some point as well (not
> by gst_bin_add() though), and I don't understand why. I see there's no SEEK
> events being sent by the pipeline sink upwards to the source. So is position
> changed by the src element itself because base_time and running_time are
> changed when added to the pipeline? Or what is the mechanism for this change?

The position is reported through a query. The element handling that query will
be the one driving the pipeline. Most of the time this is a demuxer. A live
source will simply report the time that have passed since it started (in live
source stream time and running time are the same, well except if you do RTSP
based fast forward, but I'm trying to not over-complicate it).

> Basically looking for a way for src element to keep its stream position and
> just continue where it was prior to being added to a new pipeline.

Best is to write a minimal test app to show the issue, its is a bit too abstract
to understand what is going on for you.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list