elements: Use gst_pad_set_caps() instead of manual event fiddling

This commit is contained in:
Sebastian Dröge 2012-06-08 15:55:28 +02:00
parent 03824f2520
commit 2ec36a9c0a
3 changed files with 3 additions and 3 deletions

View file

@ -342,7 +342,7 @@ gst_synaesthesia_src_setcaps (GstSynaesthesia * synaesthesia, GstCaps * caps)
synaesthesia->width, synaesthesia->height,
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:
return res;

View file

@ -75,7 +75,7 @@ setup_amrnbenc (void)
"could not set to playing");
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);
buffers = NULL;

View file

@ -142,7 +142,7 @@ test_video_profile (const gchar * profile, gint profile_id)
gst_pad_use_fixed_caps (mysinkpad);
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);
/* corresponds to I420 buffer for the size mentioned in the caps */