Answer the question
In order to leave comments, you need to log in
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
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?
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 questionAsk a Question
731 491 924 answers to any question