mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
*decodebin*: set pad-templates on ghostpads
This makes calling gst_pad_get_pad_template() work.
This commit is contained in:
parent
67eb531163
commit
2a00fefd2a
3 changed files with 9 additions and 4 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue