elements: Use gst_pad_set_caps() instead of manual event fiddling

This commit is contained in:
Sebastian Dröge 2012-06-08 15:51:06 +02:00
parent 7994b4f5b5
commit 233622437f
5 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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 */

View file

@ -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);

View file

@ -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;
}

View file

@ -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);