M
M
Michael Galyuk2013-05-30 20:04:41
ruby
Michael Galyuk, 2013-05-30 20:04:41

Gstreamer: is it possible to connect two Pipelines?

One Pipeline consists of elements.
Everything is good when the elements are packed into one pipeline.

But if I want to connect two or three pipelines?

For example, hang a webcam, a tee, a vp8 encoder
on the first one, a small display on the second pipeline,
and another display on the third.
Then somehow connect these three pipelines.
At the same time, be able to pause some.

Is that possible?
Or do you still have to shove everything into one payline?
And when adding or removing elements, shake the entire pipeline?
Learn how to do it right.

The scheme is something like this:

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael Galyuk, 2013-05-31
@robux

Okay, to simplify the question:
is it possible to at least pause one branch after tee?
Those. so that the data flow does not go to this branch. Something like a pause.
But the pause is not for the entire pipeline, but for its separate branch, m?

N
nickpetrovsky, 2013-12-08
@nickpetrovsky

It is possible without simplifying :), dynamically create a new pad for tee, and add a branch from the created elements.
Both the main sequence and the plug-in sequence must be paused before editing.
An example code for adding a branch:

GstElement *pipeline, *branch;
// Положим, что все элементы созданы и связи между ними настроены
// (pipeline не связан и не содержит в себе branch)
gst_element_set_state (pipeline, GST_STATE_PAUSED);
gst_element_set_state (branch, GST_STATE_PAUSED);
// Запросим pad из основной последовательности, и приёмник из branch
tee_queue1_pad = gst_element_get_request_pad (tee, "src%d");
queue1_queue_pad = gst_element_get_pad (branch, "videosink");
// Настроим связи
gst_bin_add(GST_BIN(pipeline), muxbranch);
gst_pad_link(tee_queue1_pad, queue1_queue_pad);
// Вернём к проигрыванию
gst_element_set_state (branch, GST_STATE_PLAYING);
gst_element_set_state (pipeline, GST_STATE_PLAYING);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question