diff options
author | Stefan Kost <ensonic@users.sf.net> | 2010-10-13 23:26:35 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2010-10-13 23:30:55 +0300 |
commit | 2a00fefd2adaf4c1c87a5f368b9252ef016f9e26 (patch) | |
tree | 466a7e1e250bc44015af98905344d7144d8f06ca | |
parent | 67eb5311631beaa8052a27f44cbb74f1bb224f8c (diff) |
*decodebin*: set pad-templates on ghostpads
This makes calling gst_pad_get_pad_template() work.
-rw-r--r-- | gst/playback/gstdecodebin.c | 6 | ||||
-rw-r--r-- | gst/playback/gstdecodebin2.c | 4 | ||||
-rw-r--r-- | gst/playback/gsturidecodebin.c | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index fc1f813e4..afb8d60ab 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -404,7 +404,8 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) pad = gst_element_get_static_pad (decode_bin->typefind, "sink"); /* ghost the sink pad to ourself */ - gpad = gst_ghost_pad_new ("sink", pad); + gpad = gst_ghost_pad_new_from_template ("sink", pad, + gst_static_pad_template_get (&decoder_bin_sink_template)); gst_pad_set_active (gpad, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), gpad); @@ -914,7 +915,8 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps, decode_bin->numpads++; /* make it a ghostpad */ - ghost = gst_ghost_pad_new (padname, pad); + ghost = gst_ghost_pad_new_from_template (padname, pad, + gst_static_pad_template_get (&decoder_bin_src_template)); gst_pad_set_active (ghost, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), ghost); diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 72beab5f5..f8c459fe5 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -931,7 +931,8 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) pad = gst_element_get_static_pad (decode_bin->typefind, "sink"); /* ghost the sink pad to ourself */ - gpad = gst_ghost_pad_new ("sink", pad); + gpad = gst_ghost_pad_new_from_template ("sink", pad, + gst_static_pad_template_get (&decoder_bin_sink_template)); gst_pad_set_active (gpad, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), gpad); @@ -3401,6 +3402,7 @@ gst_decode_pad_new (GstDecodeBin * dbin, GstPad * pad, GstDecodeChain * chain) GST_DEBUG_OBJECT (dbin, "making new decodepad"); dpad = g_object_new (GST_TYPE_DECODE_PAD, "direction", GST_PAD_DIRECTION (pad), + "template", gst_static_pad_template_get (&decoder_bin_src_template), NULL); gst_ghost_pad_construct (GST_GHOST_PAD_CAST (dpad)); gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (dpad), pad); diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index f71c4099a..19af7d149 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -842,7 +842,8 @@ new_decoded_pad_cb (GstElement * element, GstPad * pad, gboolean last, decoder->numpads++; GST_URI_DECODE_BIN_UNLOCK (decoder); - newpad = gst_ghost_pad_new (padname, pad); + newpad = gst_ghost_pad_new_from_template (padname, pad, + gst_static_pad_template_get (&srctemplate)); g_free (padname); /* store ref to the ghostpad so we can remove it */ |