mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
gst/playback/gstdecodebin2.c: Be a bit more useful, unblock the pads after we fired the no-more-pads signal so that w...
Original commit message from CVS: * gst/playback/gstdecodebin2.c: (gst_decode_group_expose): Be a bit more useful, unblock the pads after we fired the no-more-pads signal so that we can use the signal to inspect and connect all pads without having to keep extra state outside of decodebin.
This commit is contained in:
parent
b68d48e6bd
commit
b55c61c933
2 changed files with 20 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-10-30 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
|
* gst/playback/gstdecodebin2.c: (gst_decode_group_expose):
|
||||||
|
Be a bit more useful, unblock the pads after we fired the no-more-pads
|
||||||
|
signal so that we can use the signal to inspect and connect all pads
|
||||||
|
without having to keep extra state outside of decodebin.
|
||||||
|
|
||||||
2007-10-30 Wim Taymans <wim.taymans@gmail.com>
|
2007-10-30 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
* gst/playback/gsturidecodebin.c:
|
* gst/playback/gsturidecodebin.c:
|
||||||
|
|
|
@ -1941,13 +1941,24 @@ gst_decode_group_expose (GstDecodeGroup * group)
|
||||||
gst_decode_bin_signals[SIGNAL_NEW_DECODED_PAD], 0, ghost,
|
gst_decode_bin_signals[SIGNAL_NEW_DECODED_PAD], 0, ghost,
|
||||||
(next == NULL));
|
(next == NULL));
|
||||||
GST_DEBUG_OBJECT (group->dbin, "emitted new-decoded-pad");
|
GST_DEBUG_OBJECT (group->dbin, "emitted new-decoded-pad");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* signal no-more-pads. This allows the application to hook stuff to the
|
||||||
|
* exposed pads */
|
||||||
|
GST_LOG_OBJECT (group->dbin, "signalling no-more-pads");
|
||||||
|
gst_element_no_more_pads (GST_ELEMENT (group->dbin));
|
||||||
|
|
||||||
|
/* 3. Unblock internal pads. The application should have connected stuff now
|
||||||
|
* so that streaming can continue. */
|
||||||
|
for (tmp = group->endpads; tmp; tmp = next) {
|
||||||
|
GstDecodePad *dpad = (GstDecodePad *) tmp->data;
|
||||||
|
|
||||||
|
next = g_list_next (tmp);
|
||||||
|
|
||||||
/* 3. Unblock internal pad */
|
|
||||||
GST_DEBUG_OBJECT (dpad->pad, "unblocking");
|
GST_DEBUG_OBJECT (dpad->pad, "unblocking");
|
||||||
gst_pad_set_blocked_async (dpad->pad, FALSE,
|
gst_pad_set_blocked_async (dpad->pad, FALSE,
|
||||||
(GstPadBlockCallback) source_pad_blocked_cb, dpad);
|
(GstPadBlockCallback) source_pad_blocked_cb, dpad);
|
||||||
GST_DEBUG_OBJECT (dpad->pad, "unblocked");
|
GST_DEBUG_OBJECT (dpad->pad, "unblocked");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group->dbin->activegroup = group;
|
group->dbin->activegroup = group;
|
||||||
|
@ -1960,9 +1971,6 @@ gst_decode_group_expose (GstDecodeGroup * group)
|
||||||
|
|
||||||
group->exposed = TRUE;
|
group->exposed = TRUE;
|
||||||
|
|
||||||
GST_LOG_OBJECT (group->dbin, "signalling no-more-pads");
|
|
||||||
gst_element_no_more_pads (GST_ELEMENT (group->dbin));
|
|
||||||
|
|
||||||
GST_LOG_OBJECT (group->dbin, "Group %p exposed", group);
|
GST_LOG_OBJECT (group->dbin, "Group %p exposed", group);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue