From: Sebastian Dröge Date: Fri, 8 Jun 2012 13:51:06 +0000 (+0200) Subject: elements: Use gst_pad_set_caps() instead of manual event fiddling X-Git-Tag: 1.19.3~511^2~6342 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=233622437fe2072087435e17c420b775104e6106;p=platform%2Fupstream%2Fgstreamer.git elements: Use gst_pad_set_caps() instead of manual event fiddling --- diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c index 39c7e4d..aa26a79 100644 --- a/ext/libvisual/visual.c +++ b/ext/libvisual/visual.c @@ -373,7 +373,7 @@ gst_visual_src_setcaps (GstVisual * visual, GstCaps * caps) visual->duration = gst_util_uint64_scale_int (GST_SECOND, visual->fps_d, visual->fps_n); - res = gst_pad_push_event (visual->srcpad, gst_event_new_caps (caps)); + res = gst_pad_set_caps (visual->srcpad, caps); return res; diff --git a/ext/ogg/gstoggaviparse.c b/ext/ogg/gstoggaviparse.c index 95a2ae9..c5dc8ae 100644 --- a/ext/ogg/gstoggaviparse.c +++ b/ext/ogg/gstoggaviparse.c @@ -254,7 +254,7 @@ gst_ogg_avi_parse_setcaps (GstPad * pad, GstCaps * caps) /* set caps */ outcaps = gst_caps_new_empty_simple ("audio/x-vorbis"); - gst_pad_push_event (ogg->srcpad, gst_event_new_caps (outcaps)); + gst_pad_set_caps (ogg->srcpad, outcaps); gst_caps_unref (outcaps); /* copy header data */ diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c index 5e12d50..44c86ad 100644 --- a/ext/pango/gstbasetextoverlay.c +++ b/ext/pango/gstbasetextoverlay.c @@ -773,7 +773,7 @@ gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay, GstCaps * caps) overlay->width = GST_VIDEO_INFO_WIDTH (&info); overlay->height = GST_VIDEO_INFO_HEIGHT (&info); - ret = gst_pad_push_event (overlay->srcpad, gst_event_new_caps (caps)); + ret = gst_pad_set_caps (overlay->srcpad, caps); if (ret) { GST_BASE_TEXT_OVERLAY_LOCK (overlay); diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index 222c57e..6c0a07c 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -371,7 +371,7 @@ gst_text_render_src_setcaps (GstTextRender * render, GstCaps * caps) gst_text_render_check_argb (render); - ret = gst_pad_push_event (render->srcpad, gst_event_new_caps (caps)); + ret = gst_pad_set_caps (render->srcpad, caps); return ret; } diff --git a/tests/check/elements/audioconvert.c b/tests/check/elements/audioconvert.c index bfb6e7c..4e28c0d 100644 --- a/tests/check/elements/audioconvert.c +++ b/tests/check/elements/audioconvert.c @@ -420,7 +420,7 @@ verify_convert (const gchar * which, void *in, int inlength, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, "could not set to playing"); - gst_pad_push_event (mysrcpad, gst_event_new_caps (incaps)); + gst_pad_set_caps (mysrcpad, incaps); GST_DEBUG ("Creating buffer of %d bytes", inlength); inbuffer = gst_buffer_new_and_alloc (inlength);