diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-12-06 22:02:36 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-12-07 18:59:42 +0200 |
commit | 17d8b89deb1feb35ceba2f1310f4eea35fcb1d73 (patch) | |
tree | 6c6f5a0045a1c4091dbe97fb9b54e2f14f6d43b2 | |
parent | efcda47985cbb631418449a57f3ade80ca12f8cb (diff) |
test: gstreamer: Remove videoconvert element from pipeline
The GStreamer single stream test uses the following pipeline:
libcamerasrc ! videoconvert ! fakesink
The videoconvert element isn't useful as the data is thrown away by the
fakesink anyway. We can shorten the pipeline to
libcamerasrc ! fakesink
to save CPU time and to avoid depending on the gstreamer1.0-plugins-base
package to run the unit tests.
The test could be further simplified by replacing
gst_parse_bin_from_description_full() with gst_element_factory_make(),
now that we only add one element to the bin. The extra cost incurred by
the bin only impacts initialization time, and using a bin will make it
easier to add other elements in the future if needed. Keep the bin, and
only drop the videoconvert element.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | test/gstreamer/gstreamer_single_stream_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp index a0dd12cf..301e4a93 100644 --- a/test/gstreamer/gstreamer_single_stream_test.cpp +++ b/test/gstreamer/gstreamer_single_stream_test.cpp @@ -29,7 +29,7 @@ protected: if (status_ != TestPass) return status_; - const gchar *streamDescription = "videoconvert ! fakesink"; + const gchar *streamDescription = "fakesink"; g_autoptr(GError) error0 = NULL; stream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE, NULL, |