Dynamic Replacement of a source element in pipeline

Daniel Sperka djsperka at ucdavis.edu
Wed Sep 18 22:19:38 UTC 2019


I've had success setting the offset on the sink pad, not the src pad.
Splice the new pads into the appropriate sink pads, but at each of those
SINK pads, set the offset.

On Tue, Sep 17, 2019 at 9:19 PM Pascal Jacquemart <pascal at fluffyspider.com>
wrote:

>
> Ok but it does not make sense to set 0 as pad offset
> You should set the offset as the running time of the pipeline instead
>
> Otherwise, if it does not work, you might be able to use the
> input-selector element. This element has some capabilities to
> synchronise various inputs to the same running time.
>
> On Tue, 17 Sep 2019 04:22:05 -0500 (CDT)
> "lorenzo.m" <lorenzo at muscariello.com> wrote:
>
> > Hi Pascal,
> > thank you for your reply.
> > I've tried two different paths to achieve this (limiting the example
> > to the video part / audio is completely discarded) starting from a
> > common approach:
> >
> > the common approach consists on dynamic linking the new created
> > uridecodebin element to the rest of the pipeline capturing the
> > pad-added singals on this element; as soon as the element adds a pad
> > of type video/x-raw this is linked to the sink pad of the
> > videoconvert element and if the link is successful:
> >
> > 1 - Pipeline seeking:
> > seeking to 0 doing
> > gst_element_seek(pipeline,1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
> >                          GST_SEEK_TYPE_SET, 0,
> >                          GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)
> >
> > this works as expected, but is pushing the pipeline back to 0.
> >
> > 2 - Setting the offset on the pad just added:
> >
> >       gst_pad_set_offset(new_pad,0);
> >
> > this is not working at all.
> >
> > What I'm missing?
> > Thanks in advance,
> >
> > Kind Regards
> > Lorenzo
> >
> >
> >
> >
> > --
> > Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



-- 
Daniel J. Sperka, Ph. D.
UC Davis Center for Neuroscience
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190918/3dc8d207/attachment.html>


More information about the gstreamer-devel mailing list