pad: notify caps property change in callsetcaps

Notify the caps property change in the backwards compatible function to call the
setcaps function.
This commit is contained in:
Wim Taymans 2011-05-18 15:29:25 +02:00
parent 6ad530a8b0
commit fa6bcde7e3

View file

@ -2044,7 +2044,6 @@ gst_pad_link_full (GstPad * srcpad, GstPad * sinkpad, GstPadLinkCheck flags)
{
GstPadLinkReturn result;
GstElement *parent;
GstCaps *oldcaps, *newcaps;
g_return_val_if_fail (GST_IS_PAD (srcpad), GST_PAD_LINK_REFUSED);
g_return_val_if_fail (GST_PAD_IS_SRC (srcpad), GST_PAD_LINK_WRONG_DIRECTION);
@ -2076,17 +2075,12 @@ gst_pad_link_full (GstPad * srcpad, GstPad * sinkpad, GstPadLinkCheck flags)
/* make sure we push the events from the source to this new peer, for this we
* copy the events on the sinkpad and mark EVENTS_PENDING */
oldcaps = get_pad_caps (sinkpad);
replace_events (srcpad->priv->events, sinkpad->priv->events);
newcaps = get_pad_caps (sinkpad);
GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_NEED_EVENTS);
GST_OBJECT_UNLOCK (sinkpad);
GST_OBJECT_UNLOCK (srcpad);
if (oldcaps != newcaps)
g_object_notify_by_pspec ((GObject *) sinkpad, pspec_caps);
/* FIXME released the locks here, concurrent thread might link
* something else. */
if (GST_PAD_LINKFUNC (srcpad)) {
@ -2761,6 +2755,8 @@ gst_pad_call_setcaps (GstPad * pad, GstCaps * caps)
}
GST_OBJECT_UNLOCK (pad);
g_object_notify_by_pspec ((GObject *) pad, pspec_caps);
return TRUE;
/* ERRORS */
@ -4521,7 +4517,6 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
{
GstPad *peerpad;
gboolean result;
GstCaps *oldcaps = NULL, *newcaps = NULL;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
@ -4587,20 +4582,15 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
GST_LOG_OBJECT (pad, "storing sticky event %s at index %u",
GST_EVENT_TYPE_NAME (event), idx);
oldcaps = get_pad_caps (pad);
/* srcpad sticky events always become active immediately */
gst_event_replace (&pad->priv->events[idx].event, event);
pad->priv->events[idx].active = TRUE;
newcaps = get_pad_caps (pad);
}
if ((peerpad = GST_PAD_PEER (pad)))
gst_object_ref (peerpad);
GST_OBJECT_UNLOCK (pad);
if (oldcaps != newcaps)
g_object_notify_by_pspec ((GObject *) pad, pspec_caps);
/* backwards compatibility mode for caps */
if (GST_EVENT_TYPE (event) == GST_EVENT_CAPS) {
GstCaps *caps;