Moving element between pipelines in PLAYING state

Vladan Jovanovic vladan.jovanovic at gmail.com
Thu Feb 2 10:53:58 UTC 2023


Hi,

What should be considered when moving an element between two GstPipelines
in PLAYING state when expected behavior is for the element to just continue
generating buffers continuously (without changing stream position)?

Haven't found a good description of this in documentation and I'm
seeing unusual
behavior in a small application in which I'm testing dynamic pipeline
modifications.

For some background of what I'm doing, simplified pipelines are shown below.
 - GstPipeline-1 is the main pipeline where four videos are initially
composed and shown on screen.
 - After 10s GstPipeline-2 is started.
 - Following instructions in (1) I modify pipelines, while in PLAYING
state, so that video1 and video5 elements swap places in pipelines.

I would like that video5 continues from where it was prior to being moved
to GstPipeline-1. However this is not the case, and video5 skips 10s of
video and continues as if it was started at same time as other videos in
GstPipeline-1.

It almost seems that pipelines start_time needs to be the same for all
elements and this affects video5 once it's in GstPipeline-1?
Is there a way to swap in video and just have it continue from the same
stream position where it was prior to being moved to a new GstPipeline?

     .---------------------------------------------------.
     |                                   GstPipeline-1   |
     |  .-----------.    .------------.                  |
     |  |  video1   |--->|            |                  |
     |  '-----------'    |            |                  |
     |  .-----------.    |            |                  |
     |  |  video2   |--->|            |                  |
     |  '-----------'    | compositor |    .------------.|
     |  .-----------.    |            |--->| videosink1 ||
     |  |  video3   |--->|            |    '------------'|
     |  '-----------'    |            |                  |
     |  .-----------.    |            |                  |
     |  |  video4   |--->|            |                  |
     |  '-----------'    '------------'                  |
     |                                                   |
     '---------------------------------------------------'

     .---------------------------------------------------.
     |  .-----------.    .------------.  GstPipeline-2   |
     |  |  video5   |--->| videosink2 |                  |
     |  '-----------'    '------------'                  |
     '---------------------------------------------------'

best regards,
Vladan

(1):
https://gstreamer.freedesktop.org/documentation/tutorials/basic/dynamic-pipelines.html?gi-language=c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230202/cccb70b1/attachment.htm>


More information about the gstreamer-devel mailing list