multiple processes accessing parts of gstreamer pipeline

Nicolas Dufresne nicolas at ndufresne.ca
Sun Jun 30 22:06:33 UTC 2019


Le dim. 30 juin 2019 09 h 10, Erik Rull <erik.rull at rdsoftware.de> a écrit :

> Hi all,
>
> I'm trying to solve this pipeline task, but I have not yet found a smart
> solution:
>
> My environment looks like this:
>
> I want to capture a video from a camera (then modify the data) and display
> it
> inside a gtk application.
> This part works for the 1:1 routing of the camera image through gstreamer
> and
> starting the stream inside the gtk application.
>
> Next step:
> I want to modifiy the video and add additional data on the video (overlay)
> by an
> external application that modifies the video (some resizing, converting,
> adding
> the overlay that cannot be done by gstreamer) and pushing it back to the
> pipeline that then displays it inside the gtk application.
>
> I checked several interfaces and the one that looks best for me are the
> appsrc
> and appsink elements.
>
> But those have to be created by the "sink" and "src" application. I don't
> have
> access then to the gtk application where I would like to display the
> results.
>
> Is there a way to solve my task by having a pipeline that can be accessed
> by
> multiple processes? Either to get the appsrc part into the application that
> provides the modified data or get the ximagesink connected to the gtk
> application?
> Of course - the first part of the pipeline could be split off the rest and
> completely handled by the modifying application. But the second part seems
> to
> become tricky.
>
> Any hints, comments or ideas appreciated.
>
> Thanks in advance.
>

GStreamer library isn't I internally multi-process, so there isn't any
generic API/IPC to so so. On Linux, most app will use DBus IPC for such use
case. DBus object exist for all GApplication. On top of this, you can
define your own control interface.

If you need to share some data, you can use fdsrc/sink to stream or
shmsrc/sink if you need zero-copy streaming between processes.

Another option, to though it's quite specific to sandbox, is IP pipeline:

https://gstreamer.freedesktop.org/documentation/ipcpipeline/index.html?gi-language=c


> - Erik
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190630/c02983c8/attachment.html>


More information about the gstreamer-devel mailing list