summaryrefslogtreecommitdiff
path: root/utils/raspberrypi/ctt/alsc_only.py
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2022-07-21 01:40:04 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-11-25 10:52:06 +0200
commit4c30ed47f656d67b619470b9091ebf6661b8a778 (patch)
treed40635f78715e841a0ea58d048ce313dbc6808d5 /utils/raspberrypi/ctt/alsc_only.py
parent72721611fa5d772a3a2b7cd037e38c5db13dc265 (diff)
pipeline: rkisp1: Query the driver for formats
Query the driver for the output formats and sizes that it supports, instead of hardcoding them. This allows future-proofing for formats that are supported by some but not all versions of the driver. As the rkisp1 driver currently does not support VIDIOC_ENUM_FRAMESIZES, fallback to the hardcoded list of supported formats and framesizes. This feature will be added to the driver in parallel, though we cannot guarantee that users will have a new enough kernel for it. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'utils/raspberrypi/ctt/alsc_only.py')
0 files changed, 0 insertions, 0 deletions
lass="hl ppc">#include <unistd.h> #include <libcamera/libcamera.h> #include <gst/gst.h> #include "gstreamer_test.h" #include "test.h" #if !GST_CHECK_VERSION(1, 19, 1) static inline GstPad *gst_element_request_pad_simple(GstElement *element, const gchar *name) { return gst_element_get_request_pad(element, name); } #endif using namespace std; class GstreamerMultiStreamTest : public GstreamerTest, public Test { public: GstreamerMultiStreamTest() : GstreamerTest(2) { } protected: int init() override { if (status_ != TestPass) return status_; const gchar *streamDescription = "queue ! fakesink"; g_autoptr(GError) error = NULL; stream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE, NULL, GST_PARSE_FLAG_FATAL_ERRORS, &error); if (!stream0_) { g_printerr("Stream0 could not be created (%s)\n", error->message); return TestFail; } g_object_ref_sink(stream0_); stream1_ = gst_parse_bin_from_description_full(streamDescription, TRUE, NULL, GST_PARSE_FLAG_FATAL_ERRORS, &error); if (!stream1_) { g_printerr("Stream1 could not be created (%s)\n", error->message); return TestFail; } g_object_ref_sink(stream1_); if (createPipeline() != TestPass) return TestFail; return TestPass; } int run() override { g_object_set(libcameraSrc_, "camera-name", cameraName_.c_str(), NULL); /* Build the pipeline */ gst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_, stream0_, stream1_, NULL); g_autoptr(GstPad) src_pad = gst_element_get_static_pad(libcameraSrc_, "src"); g_autoptr(GstPad) request_pad = gst_element_request_pad_simple(libcameraSrc_, "src_%u"); { g_autoptr(GstPad) queue0_sink_pad = gst_element_get_static_pad(stream0_, "sink");