Two pipelines - link them - merge them - easy handling...

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

Two pipelines - link them - merge them - easy handling...

Maurer, Martin

Hello,

 

I have two (sub-) pipelines, which I create via two gst_parse_launch calls.

 

pipe1 = gst_parse_launch(“…”);

pipe2 = gst_parse_launch(“…”);

 

I have different pipe2 pipelines, which I create for different use cases.

 

Now I want to dynamically link them together, so I get a big pipeline out of the two smaller ones.

Just link the end of the first pipeline with the beginning of the second pipeline.

 

I assume this is only possible if all my elements are inside one pipeline? Not distributed over two pipelines. Is this correct?

So is there perhaps some function to merge pipe2 into pipe1 (and all link info also taken over)?

Some enumeration over all elements of pipe2 and calling add/link for pipe1?

(ok, problem could be, if and how I can remove the added part, how to identify what was pipe2 inside pipe1,

but this is a secondary problem, perhaps I can live without it)

 

Or some function call similar to gst_parse_launch, where I can insert an already existing pipeline?

 

A solution, which could perhaps be possible, to use appsink at end of pipe 1 and appsrc in the beginning of pipe2.

But then I must forward the buffers (and more) by hand…

 

Or gst-interpipe? https://github.com/RidgeRun/gst-interpipe

 

But in my opinion these last both are (too) heavy things for just the problem of basic (easy?) pipeline/element handling.

 

I know it is possible to use gst_element_factory_make, gst_bin_add_many, gst_element_link_many, …

but this is not as comfortable and easy to use like the pipeline strings in gst_parse_launch.

(reading what element was added, which were linked in which order,

and modifying it: e.g. adding/removing a new element doesn’t affect multiple places)

 

Best regards,

 

Marie

 

 

 

 


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

AW: Two pipelines - link them - merge them - easy handling...

Maurer, Martin

Additional notice:

 

Pipe1 alone is a fully functional pipeline, contain a tee.

Pipe2 is then attached to a new pad of the tee.

 

So not possible to just concatenate the both strings, convert it together again via gst_parse_launch

and work with the newly created pipeline. Sorry.

 

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Maurer, Martin
Gesendet: Donnerstag, 12. April 2018 17:40
An: [hidden email]
Betreff: Two pipelines - link them - merge them - easy handling...

 

Hello,

 

I have two (sub-) pipelines, which I create via two gst_parse_launch calls.

 

pipe1 = gst_parse_launch(“…”);

pipe2 = gst_parse_launch(“…”);

 

I have different pipe2 pipelines, which I create for different use cases.

 

Now I want to dynamically link them together, so I get a big pipeline out of the two smaller ones.

Just link the end of the first pipeline with the beginning of the second pipeline.

 

I assume this is only possible if all my elements are inside one pipeline? Not distributed over two pipelines. Is this correct?

So is there perhaps some function to merge pipe2 into pipe1 (and all link info also taken over)?

Some enumeration over all elements of pipe2 and calling add/link for pipe1?

(ok, problem could be, if and how I can remove the added part, how to identify what was pipe2 inside pipe1,

but this is a secondary problem, perhaps I can live without it)

 

Or some function call similar to gst_parse_launch, where I can insert an already existing pipeline?

 

A solution, which could perhaps be possible, to use appsink at end of pipe 1 and appsrc in the beginning of pipe2.

But then I must forward the buffers (and more) by hand…

 

Or gst-interpipe? https://github.com/RidgeRun/gst-interpipe

 

But in my opinion these last both are (too) heavy things for just the problem of basic (easy?) pipeline/element handling.

 

I know it is possible to use gst_element_factory_make, gst_bin_add_many, gst_element_link_many, …

but this is not as comfortable and easy to use like the pipeline strings in gst_parse_launch.

(reading what element was added, which were linked in which order,

and modifying it: e.g. adding/removing a new element doesn’t affect multiple places)

 

Best regards,

 

Marie

 

 

 

 


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

Re: Two pipelines - link them - merge them - easy handling...

Martin Vachovski

Hi Martin,


Sounds like you can use something like

intervideosrc​ / intervideosink

interaudiosrc / interaudiosink

elements, which allow you to communicate audio or video data between different pipelines

which run in the same process.


Or in a more general setting, you can try

appsink / appsrc

elements.

These allow you to extract data (in terms of GstBuffer* objects) from a running pipeline into your app's memory

and then to inject it into another running pipeline


Hope one of these helps you

Martin





From: gstreamer-devel <[hidden email]> on behalf of Maurer, Martin <[hidden email]>
Sent: Thursday, April 12, 2018 4:58 PM
To: Discussion of the development of and with GStreamer
Subject: AW: Two pipelines - link them - merge them - easy handling...
 

Additional notice:

 

Pipe1 alone is a fully functional pipeline, contain a tee.

Pipe2 is then attached to a new pad of the tee.

 

So not possible to just concatenate the both strings, convert it together again via gst_parse_launch

and work with the newly created pipeline. Sorry.

 

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Maurer, Martin
Gesendet: Donnerstag, 12. April 2018 17:40
An: [hidden email]
Betreff: Two pipelines - link them - merge them - easy handling...

 

Hello,

 

I have two (sub-) pipelines, which I create via two gst_parse_launch calls.

 

pipe1 = gst_parse_launch(“…”);

pipe2 = gst_parse_launch(“…”);

 

I have different pipe2 pipelines, which I create for different use cases.

 

Now I want to dynamically link them together, so I get a big pipeline out of the two smaller ones.

Just link the end of the first pipeline with the beginning of the second pipeline.

 

I assume this is only possible if all my elements are inside one pipeline? Not distributed over two pipelines. Is this correct?

So is there perhaps some function to merge pipe2 into pipe1 (and all link info also taken over)?

Some enumeration over all elements of pipe2 and calling add/link for pipe1?

(ok, problem could be, if and how I can remove the added part, how to identify what was pipe2 inside pipe1,

but this is a secondary problem, perhaps I can live without it)

 

Or some function call similar to gst_parse_launch, where I can insert an already existing pipeline?

 

A solution, which could perhaps be possible, to use appsink at end of pipe 1 and appsrc in the beginning of pipe2.

But then I must forward the buffers (and more) by hand…

 

Or gst-interpipe? https://github.com/RidgeRun/gst-interpipe

 

But in my opinion these last both are (too) heavy things for just the problem of basic (easy?) pipeline/element handling.

 

I know it is possible to use gst_element_factory_make, gst_bin_add_many, gst_element_link_many, …

but this is not as comfortable and easy to use like the pipeline strings in gst_parse_launch.

(reading what element was added, which were linked in which order,

and modifying it: e.g. adding/removing a new element doesn’t affect multiple places)

 

Best regards,

 

Marie

 

 

 

 


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

Re: AW: Two pipelines - link them - merge them - easy handling...

Krzysztof Konopko-3
In reply to this post by Maurer, Martin
Consider maybe using `gst_parse_bin_from_description()` for each segment of the overall pipeline:

Kris

On Thu, 2018-04-12 at 15:58 +0000, Maurer, Martin wrote:

Additional notice:

 

Pipe1 alone is a fully functional pipeline, contain a tee.

Pipe2 is then attached to a new pad of the tee.

 

So not possible to just concatenate the both strings, convert it together again via gst_parse_launch

and work with the newly created pipeline. Sorry.

 

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Maurer, Martin
Gesendet: Donnerstag, 12. April 2018 17:40
An: [hidden email]
Betreff: Two pipelines - link them - merge them - easy handling...

 

Hello,

 

I have two (sub-) pipelines, which I create via two gst_parse_launch calls.

 

pipe1 = gst_parse_launch(“…”);

pipe2 = gst_parse_launch(“…”);

 

I have different pipe2 pipelines, which I create for different use cases.

 

Now I want to dynamically link them together, so I get a big pipeline out of the two smaller ones.

Just link the end of the first pipeline with the beginning of the second pipeline.

 

I assume this is only possible if all my elements are inside one pipeline? Not distributed over two pipelines. Is this correct?

So is there perhaps some function to merge pipe2 into pipe1 (and all link info also taken over)?

Some enumeration over all elements of pipe2 and calling add/link for pipe1?

(ok, problem could be, if and how I can remove the added part, how to identify what was pipe2 inside pipe1,

but this is a secondary problem, perhaps I can live without it)

 

Or some function call similar to gst_parse_launch, where I can insert an already existing pipeline?

 

A solution, which could perhaps be possible, to use appsink at end of pipe 1 and appsrc in the beginning of pipe2.

But then I must forward the buffers (and more) by hand…

 

Or gst-interpipe? https://github.com/RidgeRun/gst-interpipe

 

But in my opinion these last both are (too) heavy things for just the problem of basic (easy?) pipeline/element handling.

 

I know it is possible to use gst_element_factory_make, gst_bin_add_many, gst_element_link_many, …

but this is not as comfortable and easy to use like the pipeline strings in gst_parse_launch.

(reading what element was added, which were linked in which order,

and modifying it: e.g. adding/removing a new element doesn’t affect multiple places)

 

Best regards,

 

Marie

 

 

 

 

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Two pipelines - link them - merge them - easy handling...

Arjen Veenhuizen
In reply to this post by Martin Vachovski
You could perhaps also use the ipcpipeline element, see the 1.14  release
notes <https://gstreamer.freedesktop.org/releases/1.14/>  :


> ipcpipeline: new plugin that allows splitting a pipeline across multiple
> processes

I have no experience with it, but it might be what you are looking for.

More info:
https://www.collabora.com/news-and-blog/blog/2017/11/17/ipcpipeline-splitting-a-gstreamer-pipeline-into-multiple-processes/



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel