mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
camerabin2: Use videotestsrc on the tests
Use videotestsrc to avoid openning the camera device on the tests.
This commit is contained in:
parent
07d58dbf84
commit
5ce8d0356d
1 changed files with 8 additions and 0 deletions
|
@ -250,6 +250,7 @@ setup (void)
|
|||
GstElement *vfbin;
|
||||
GstElement *fakevideosink;
|
||||
GstElement *src;
|
||||
GstElement *testsrc;
|
||||
|
||||
GST_INFO ("init");
|
||||
|
||||
|
@ -258,6 +259,13 @@ setup (void)
|
|||
camera = gst_check_setup_element ("camerabin2");
|
||||
fakevideosink = gst_check_setup_element ("fakesink");
|
||||
src = gst_check_setup_element ("v4l2camerasrc");
|
||||
testsrc = gst_check_setup_element ("videotestsrc");
|
||||
|
||||
g_object_set (G_OBJECT (testsrc), "is-live", TRUE, NULL);
|
||||
g_object_set (G_OBJECT (src), "video-src", testsrc, NULL);
|
||||
g_object_set (G_OBJECT (camera), "camera-src", src, NULL);
|
||||
gst_object_unref (src);
|
||||
gst_object_unref (testsrc);
|
||||
|
||||
vfbin = gst_bin_get_by_name (GST_BIN (camera), "vf-bin");
|
||||
g_object_set (G_OBJECT (vfbin), "video-sink", fakevideosink, NULL);
|
||||
|
|
Loading…
Reference in a new issue