From 74e51721811c9bb570688bd48b1e8061b6c10c2a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 13 Dec 2007 12:31:38 +0000 Subject: [PATCH] gst/playback/gstdecodebin2.c: Expose the right pad in the right place with the right element. Original commit message from CVS: * gst/playback/gstdecodebin2.c: (analyze_new_pad), (connect_pad): Expose the right pad in the right place with the right element. --- ChangeLog | 5 +++++ gst/playback/gstdecodebin2.c | 18 +++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70f7b99..999b6ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-13 Wim Taymans + + * gst/playback/gstdecodebin2.c: (analyze_new_pad), (connect_pad): + Expose the right pad in the right place with the right element. + 2007-12-13 Tim-Philipp Müller * gst-libs/gst/pbutils/descriptions.c: (formats): diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 314481d..3647e0c 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -846,7 +846,7 @@ static gboolean is_demuxer_element (GstElement * srcelement); static gboolean connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, GstCaps * caps, GValueArray * factories, - GstDecodeGroup * group, gboolean * expose); + GstDecodeGroup * group); static gboolean connect_element (GstDecodeBin * dbin, GstElement * element, GstDecodeGroup * group); static void expose_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, @@ -884,7 +884,6 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, { gboolean apcontinue = TRUE; GValueArray *factories = NULL, *result = NULL; - gboolean expose; GST_DEBUG_OBJECT (dbin, "Pad %s:%s caps:%" GST_PTR_FORMAT, GST_DEBUG_PAD_NAME (pad), caps); @@ -936,13 +935,10 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, /* 1.e else continue autoplugging something from the list. */ GST_LOG_OBJECT (pad, "Let's continue discovery on this pad"); - connect_pad (dbin, src, pad, caps, factories, group, &expose); + connect_pad (dbin, src, pad, caps, factories, group); g_value_array_free (factories); - if (expose) - goto expose_pad; - return; expose_pad: @@ -1015,8 +1011,7 @@ setup_caps_delay: */ static gboolean connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, - GstCaps * caps, GValueArray * factories, GstDecodeGroup * group, - gboolean * expose) + GstCaps * caps, GValueArray * factories, GstDecodeGroup * group) { gboolean res = FALSE; GstPad *mqpad = NULL; @@ -1024,8 +1019,6 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, g_return_val_if_fail (factories != NULL, FALSE); g_return_val_if_fail (factories->n_values > 0, FALSE); - *expose = FALSE; - GST_DEBUG_OBJECT (dbin, "pad %s:%s , group:%p", GST_DEBUG_PAD_NAME (pad), group); @@ -1043,6 +1036,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, if (!(mqpad = gst_decode_group_control_demuxer_pad (group, pad))) goto beach; + src = group->multiqueue; pad = mqpad; } @@ -1069,7 +1063,9 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, break; case GST_AUTOPLUG_SELECT_EXPOSE: GST_DEBUG_OBJECT (dbin, "autoplug select requested expose"); - *expose = TRUE; + /* expose the pad, we don't have the source element */ + expose_pad (dbin, src, pad, group); + res = TRUE; goto beach; case GST_AUTOPLUG_SELECT_SKIP: GST_DEBUG_OBJECT (dbin, "autoplug select requested skip"); -- 2.7.4