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>
* gst-libs/gst/floatcast/floatcast.h:

View file

@ -323,7 +323,7 @@ gst_decode_bin_init (GstDecodeBin * decode_bin)
if (!decode_bin->typefind) {
g_warning ("can't find typefind element, decodebin will not work");
} else {
GstPad *pad;
GstPad *pad, *gpad;
/* add the typefind element */
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");
/* ghost the sink pad to ourself */
gst_element_add_pad (GST_ELEMENT (decode_bin),
gst_ghost_pad_new ("sink", pad));
gpad = 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);
@ -685,6 +686,7 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps,
/* make it a ghostpad */
ghost = gst_ghost_pad_new (padname, pad);
gst_pad_set_active (ghost, TRUE);
gst_element_add_pad (GST_ELEMENT (decode_bin), ghost);
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 */
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 */
sig = g_signal_connect (G_OBJECT (sinkpad), "unlinked",
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 */
g_object_set_data (G_OBJECT (pad), "pb_sel_pad", sinkpad);
gst_pad_set_active (sinkpad, TRUE);
gst_pad_link (pad, sinkpad);
gst_object_unref (sinkpad);