mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
elements: Use gst_pad_set_caps() instead of manual event fiddling
This commit is contained in:
parent
54a58e6c3d
commit
a1948e34d2
5 changed files with 5 additions and 5 deletions
|
@ -2299,7 +2299,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
|
|||
avi->num_streams++;
|
||||
|
||||
gst_pad_set_active (pad, TRUE);
|
||||
gst_pad_push_event (pad, gst_event_new_caps (caps));
|
||||
gst_pad_set_caps (pad, caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
/* make tags */
|
||||
|
|
|
@ -235,7 +235,7 @@ gst_goom_src_setcaps (GstGoom * goom, GstCaps * caps)
|
|||
GST_DEBUG_OBJECT (goom, "dimension %dx%d, framerate %d/%d, spf %d",
|
||||
goom->width, goom->height, goom->fps_n, goom->fps_d, goom->spf);
|
||||
|
||||
res = gst_pad_push_event (goom->srcpad, gst_event_new_caps (caps));
|
||||
res = gst_pad_set_caps (goom->srcpad, caps);
|
||||
|
||||
return res;
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ gst_goom_src_setcaps (GstGoom * goom, GstCaps * caps)
|
|||
GST_DEBUG_OBJECT (goom, "dimension %dx%d, framerate %d/%d, spf %d",
|
||||
goom->width, goom->height, goom->fps_n, goom->fps_d, goom->spf);
|
||||
|
||||
return gst_pad_push_event (goom->srcpad, gst_event_new_caps (caps));
|
||||
return gst_pad_set_caps (goom->srcpad, caps);
|
||||
|
||||
/* ERRORS */
|
||||
error:
|
||||
|
|
|
@ -214,7 +214,7 @@ gst_monoscope_src_setcaps (GstMonoscope * monoscope, GstCaps * caps)
|
|||
|
||||
monoscope->visstate = monoscope_init (monoscope->width, monoscope->height);
|
||||
|
||||
res = gst_pad_push_event (monoscope->srcpad, gst_event_new_caps (caps));
|
||||
res = gst_pad_set_caps (monoscope->srcpad, caps);
|
||||
|
||||
return res && (monoscope->visstate != NULL);
|
||||
}
|
||||
|
|
|
@ -521,7 +521,7 @@ gst_rtp_dec_chain_rtp (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
session->recv_rtp_src = gst_pad_new_from_template (templ, name);
|
||||
g_free (name);
|
||||
|
||||
gst_pad_push_event (session->recv_rtp_src, gst_event_new_caps (caps));
|
||||
gst_pad_set_caps (session->recv_rtp_src, caps);
|
||||
|
||||
gst_pad_set_element_private (session->recv_rtp_src, session);
|
||||
gst_pad_set_query_function (session->recv_rtp_src, gst_rtp_dec_query_src);
|
||||
|
|
Loading…
Reference in a new issue