mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
elements: Use gst_pad_set_caps() instead of manual event fiddling
This commit is contained in:
parent
7994b4f5b5
commit
233622437f
5 changed files with 5 additions and 5 deletions
|
@ -373,7 +373,7 @@ gst_visual_src_setcaps (GstVisual * visual, GstCaps * caps)
|
||||||
visual->duration =
|
visual->duration =
|
||||||
gst_util_uint64_scale_int (GST_SECOND, visual->fps_d, visual->fps_n);
|
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;
|
return res;
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,7 @@ gst_ogg_avi_parse_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
/* set caps */
|
/* set caps */
|
||||||
outcaps = gst_caps_new_empty_simple ("audio/x-vorbis");
|
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);
|
gst_caps_unref (outcaps);
|
||||||
|
|
||||||
/* copy header data */
|
/* copy header data */
|
||||||
|
|
|
@ -773,7 +773,7 @@ gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay, GstCaps * caps)
|
||||||
overlay->width = GST_VIDEO_INFO_WIDTH (&info);
|
overlay->width = GST_VIDEO_INFO_WIDTH (&info);
|
||||||
overlay->height = GST_VIDEO_INFO_HEIGHT (&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) {
|
if (ret) {
|
||||||
GST_BASE_TEXT_OVERLAY_LOCK (overlay);
|
GST_BASE_TEXT_OVERLAY_LOCK (overlay);
|
||||||
|
|
|
@ -371,7 +371,7 @@ gst_text_render_src_setcaps (GstTextRender * render, GstCaps * caps)
|
||||||
|
|
||||||
gst_text_render_check_argb (render);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,7 +420,7 @@ verify_convert (const gchar * which, void *in, int inlength,
|
||||||
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
|
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
|
||||||
"could not set to playing");
|
"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);
|
GST_DEBUG ("Creating buffer of %d bytes", inlength);
|
||||||
inbuffer = gst_buffer_new_and_alloc (inlength);
|
inbuffer = gst_buffer_new_and_alloc (inlength);
|
||||||
|
|
Loading…
Reference in a new issue