gst/playback/: Activate dynamic pads before adding them to the element.

Original commit message from CVS:
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(close_pad_link):
* gst/playback/gstplaybasebin.c: (new_decoded_pad_full):
Activate dynamic pads before adding them to the element.
This commit is contained in:
Wim Taymans 2006-10-06 14:37:43 +00:00
parent 0934b396d0
commit 4cc39ec809
3 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2006-10-06 Wim Taymans <wim@fluendo.com>
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(close_pad_link):
* gst/playback/gstplaybasebin.c: (new_decoded_pad_full):
Activate dynamic pads before adding them to the element.
2006-10-06 Michael Smith <msmith@fluendo.com> 2006-10-06 Michael Smith <msmith@fluendo.com>
* gst-libs/gst/floatcast/floatcast.h: * gst-libs/gst/floatcast/floatcast.h:

View File

@ -323,7 +323,7 @@ gst_decode_bin_init (GstDecodeBin * decode_bin)
if (!decode_bin->typefind) { if (!decode_bin->typefind) {
g_warning ("can't find typefind element, decodebin will not work"); g_warning ("can't find typefind element, decodebin will not work");
} else { } else {
GstPad *pad; GstPad *pad, *gpad;
/* add the typefind element */ /* add the typefind element */
if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind)) { if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind)) {
@ -336,8 +336,9 @@ gst_decode_bin_init (GstDecodeBin * decode_bin)
pad = gst_element_get_pad (decode_bin->typefind, "sink"); pad = gst_element_get_pad (decode_bin->typefind, "sink");
/* ghost the sink pad to ourself */ /* ghost the sink pad to ourself */
gst_element_add_pad (GST_ELEMENT (decode_bin), gpad = gst_ghost_pad_new ("sink", pad);
gst_ghost_pad_new ("sink", pad)); gst_pad_set_active (gpad, TRUE);
gst_element_add_pad (GST_ELEMENT (decode_bin), gpad);
gst_object_unref (pad); gst_object_unref (pad);
@ -685,6 +686,7 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps,
/* make it a ghostpad */ /* make it a ghostpad */
ghost = gst_ghost_pad_new (padname, pad); ghost = gst_ghost_pad_new (padname, pad);
gst_pad_set_active (ghost, TRUE);
gst_element_add_pad (GST_ELEMENT (decode_bin), ghost); gst_element_add_pad (GST_ELEMENT (decode_bin), ghost);
data = g_new0 (PadProbeData, 1); data = g_new0 (PadProbeData, 1);

View File

@ -1194,7 +1194,9 @@ new_decoded_pad_full (GstElement * element, GstPad * pad, gboolean last,
} }
/* add to stream selector */ /* add to stream selector */
sinkpad = gst_element_get_pad (group->type[type - 1].selector, "sink%d"); sinkpad =
gst_element_get_request_pad (group->type[type - 1].selector, "sink%d");
/* make sure we catch unlink signals */ /* make sure we catch unlink signals */
sig = g_signal_connect (G_OBJECT (sinkpad), "unlinked", sig = g_signal_connect (G_OBJECT (sinkpad), "unlinked",
G_CALLBACK (preroll_unlinked), play_base_bin); G_CALLBACK (preroll_unlinked), play_base_bin);
@ -1203,6 +1205,7 @@ new_decoded_pad_full (GstElement * element, GstPad * pad, gboolean last,
/* Store a pointer to the stream selector pad for this stream */ /* Store a pointer to the stream selector pad for this stream */
g_object_set_data (G_OBJECT (pad), "pb_sel_pad", sinkpad); g_object_set_data (G_OBJECT (pad), "pb_sel_pad", sinkpad);
gst_pad_set_active (sinkpad, TRUE);
gst_pad_link (pad, sinkpad); gst_pad_link (pad, sinkpad);
gst_object_unref (sinkpad); gst_object_unref (sinkpad);