multiple processes accessing parts of gstreamer pipeline

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple processes accessing parts of gstreamer pipeline

Erik Rull
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.

- Erik
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: multiple processes accessing parts of gstreamer pipeline

Nicolas Dufresne-5


Le dim. 30 juin 2019 09 h 10, Erik Rull <[hidden email]> 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:



- Erik
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel