mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
Set the pipeline to the paused state when doing dynimic connects.
Original commit message from CVS: Set the pipeline to the paused state when doing dynimic connects.
This commit is contained in:
parent
df73d4391b
commit
f5e46974ef
1 changed files with 4 additions and 0 deletions
|
@ -67,6 +67,7 @@ gst_parse_newpad(GstElement *element,GstPad *pad,launch_delayed_pad *peer)
|
|||
typedef struct {
|
||||
gchar *srcpadname;
|
||||
GstPad *target;
|
||||
GstElement *pipeline;
|
||||
} dyn_connect;
|
||||
|
||||
static void have_eos (void)
|
||||
|
@ -81,7 +82,9 @@ dynamic_connect (GstElement *element, GstPad *newpad, gpointer data)
|
|||
dyn_connect *connect = (dyn_connect *)data;
|
||||
|
||||
if (!strcmp (gst_pad_get_name (newpad), connect->srcpadname)) {
|
||||
gst_element_set_state (connect->pipeline, GST_STATE_PAUSED);
|
||||
gst_pad_connect (newpad, connect->target);
|
||||
gst_element_set_state (connect->pipeline, GST_STATE_PLAYING);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -375,6 +378,7 @@ gst_parse_launch_cmdline(int argc,char *argv[],GstBin *parent,gst_parse_priv *pr
|
|||
|
||||
connect->srcpadname = srcpadname;
|
||||
connect->target = GST_PARSE_LISTPAD(sinkpads);
|
||||
connect->pipeline = parent;
|
||||
|
||||
GST_DEBUG(0,"SETTING UP dynamic connection %s:%s and %s:%s\n",
|
||||
gst_element_get_name (previous),
|
||||
|
|
Loading…
Reference in a new issue