This makes calling gst_pad_get_pad_template() work.
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);
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);
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);
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);
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 */