From: Wim Taymans Date: Sun, 9 Dec 2001 14:44:48 +0000 (+0000) Subject: Set the pipeline to the paused state when doing dynimic connects. X-Git-Tag: BRANCH-BUILD1-200112101-ROOT~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5e46974ef292b01943d4970c4531ce047a3ea77;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/gst/gstparse.c b/gst/gstparse.c index bf8ffd7..8b6ece3 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -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),