mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
gst/playback/gstdecodebin2.c (expose_pad): Fix typo: unset target instead of setting it.
Original commit message from CVS: 2008-10-08 Andy Wingo <wingo@pobox.com> * gst/playback/gstdecodebin2.c (expose_pad): Fix typo: unset target instead of setting it. (gst_decode_pad_activate, gst_decode_pad_unblock): This is now the API for a decode pad. The bugfix is that we set the group in activate(), not when the pad was created because it might be NULL then. (gst_decode_group_control_source_pad, gst_decode_group_expose): Update to use the API.
This commit is contained in:
parent
6c7e1c8a9b
commit
3329abde33
1 changed files with 24 additions and 7 deletions
|
@ -288,8 +288,9 @@ G_DEFINE_TYPE (GstDecodePad, gst_decode_pad, GST_TYPE_GHOST_PAD);
|
|||
|
||||
static GstDecodePad *gst_decode_pad_new (GstDecodeBin * dbin, GstPad * pad,
|
||||
GstDecodeGroup * group);
|
||||
static void gst_decode_pad_set_blocked (GstDecodePad * pad, gboolean blocked);
|
||||
static void gst_decode_pad_add_drained_check (GstDecodePad * dpad);
|
||||
static void gst_decode_pad_activate (GstDecodePad * dpad,
|
||||
GstDecodeGroup * group);
|
||||
static void gst_decode_pad_unblock (GstDecodePad * dpad);
|
||||
|
||||
/* TempPadStruct
|
||||
* Internal structure used for pads which have more than one structure.
|
||||
|
@ -1385,7 +1386,7 @@ expose_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad,
|
|||
if (isdemux) {
|
||||
GST_LOG_OBJECT (src, "connecting the pad through multiqueue");
|
||||
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (dpad), pad);
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (dpad), NULL);
|
||||
if (!(mqpad = gst_decode_group_control_demuxer_pad (group, pad)))
|
||||
goto beach;
|
||||
pad = mqpad;
|
||||
|
@ -1785,9 +1786,7 @@ gst_decode_group_control_source_pad (GstDecodeGroup * group,
|
|||
GST_DEBUG_OBJECT (dpad, "adding decode pad to group %p", group);
|
||||
|
||||
/* FIXME : check if pad is already controlled */
|
||||
gst_pad_set_active (GST_PAD (dpad), TRUE);
|
||||
gst_decode_pad_set_blocked (dpad, TRUE);
|
||||
gst_decode_pad_add_drained_check (dpad);
|
||||
gst_decode_pad_activate (dpad, group);
|
||||
|
||||
GROUP_MUTEX_LOCK (group);
|
||||
group->endpads = g_list_append (group->endpads, gst_object_ref (dpad));
|
||||
|
@ -2055,7 +2054,7 @@ gst_decode_group_expose (GstDecodeGroup * group)
|
|||
next = g_list_next (tmp);
|
||||
|
||||
GST_DEBUG_OBJECT (dpad, "unblocking");
|
||||
gst_decode_pad_set_blocked (dpad, FALSE);
|
||||
gst_decode_pad_unblock (dpad);
|
||||
GST_DEBUG_OBJECT (dpad, "unblocked");
|
||||
}
|
||||
|
||||
|
@ -2305,6 +2304,24 @@ gst_decode_pad_add_drained_check (GstDecodePad * dpad)
|
|||
G_CALLBACK (source_pad_event_probe), dpad);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_decode_pad_activate (GstDecodePad * dpad, GstDecodeGroup * group)
|
||||
{
|
||||
g_return_if_fail (dpad->group == NULL);
|
||||
g_return_if_fail (group != NULL);
|
||||
|
||||
dpad->group = group;
|
||||
gst_pad_set_active (GST_PAD (dpad), TRUE);
|
||||
gst_decode_pad_set_blocked (dpad, TRUE);
|
||||
gst_decode_pad_add_drained_check (dpad);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_decode_pad_unblock (GstDecodePad * dpad)
|
||||
{
|
||||
gst_decode_pad_set_blocked (dpad, FALSE);
|
||||
}
|
||||
|
||||
/*gst_decode_pad_new:
|
||||
*
|
||||
* Creates a new GstDecodePad for the given pad.
|
||||
|
|
Loading…
Reference in a new issue