mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
elements: Use gst_pad_set_caps() instead of manual event fiddling
This commit is contained in:
parent
03824f2520
commit
2ec36a9c0a
3 changed files with 3 additions and 3 deletions
|
@ -342,7 +342,7 @@ gst_synaesthesia_src_setcaps (GstSynaesthesia * synaesthesia, GstCaps * caps)
|
||||||
synaesthesia->width, synaesthesia->height,
|
synaesthesia->width, synaesthesia->height,
|
||||||
synaesthesia->fps_n, synaesthesia->fps_d, synaesthesia->spf);
|
synaesthesia->fps_n, synaesthesia->fps_d, synaesthesia->spf);
|
||||||
|
|
||||||
res = gst_pad_push_event (synaesthesia->srcpad, gst_event_new_caps (caps));
|
res = gst_pad_set_caps (synaesthesia->srcpad, caps);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -75,7 +75,7 @@ setup_amrnbenc (void)
|
||||||
"could not set to playing");
|
"could not set to playing");
|
||||||
|
|
||||||
caps = gst_caps_from_string (SRC_CAPS);
|
caps = gst_caps_from_string (SRC_CAPS);
|
||||||
fail_unless (gst_pad_push_event (srcpad, gst_event_new_caps (caps)));
|
fail_unless (gst_pad_set_caps (srcpad, caps));
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
buffers = NULL;
|
buffers = NULL;
|
||||||
|
|
|
@ -142,7 +142,7 @@ test_video_profile (const gchar * profile, gint profile_id)
|
||||||
gst_pad_use_fixed_caps (mysinkpad);
|
gst_pad_use_fixed_caps (mysinkpad);
|
||||||
|
|
||||||
caps = gst_caps_from_string (VIDEO_CAPS_STRING);
|
caps = gst_caps_from_string (VIDEO_CAPS_STRING);
|
||||||
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_caps (caps)));
|
fail_unless (gst_pad_set_caps (mysrcpad, caps));
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
/* corresponds to I420 buffer for the size mentioned in the caps */
|
/* corresponds to I420 buffer for the size mentioned in the caps */
|
||||||
|
|
Loading…
Reference in a new issue