@@ -1049,6 +1049,12 @@ int PipelineHandlerIPU3::registerCameras()
/* Initialize the camera properties. */
data->properties_ = cio2->sensor()->properties();
+ /*
+ * \todo Make sure this is correct even after the stream is
+ * configured to CIO2
+ */
+ data->properties_.set(properties::MinNumRequests, 1);
+
ret = initControls(data.get());
if (ret)
continue;
@@ -1035,6 +1035,12 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
/* Initialize the camera properties. */
data->properties_ = data->sensor_->properties();
+ /*
+ * \todo Make sure this is correct after the stream is configured for
+ * any of the roles
+ */
+ data->properties_.set(properties::MinNumRequests, 1);
+
/*
* Set a default value for the ScalerCropMaximum property to show
* that we support its use, however, initialise it to zero because
@@ -21,6 +21,7 @@
#include <libcamera/ipa/core_ipa_interface.h>
#include <libcamera/ipa/rkisp1_ipa_interface.h>
#include <libcamera/ipa/rkisp1_ipa_proxy.h>
+#include <libcamera/property_ids.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
@@ -943,6 +944,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
/* Initialize the camera properties. */
data->properties_ = data->sensor_->properties();
+ data->properties_.set(properties::MinNumRequests, 3);
/*
* \todo Read dealy values from the sensor itself or from a
@@ -23,6 +23,7 @@
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
+#include <libcamera/property_ids.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
@@ -425,6 +426,7 @@ int SimpleCameraData::init()
}
properties_ = sensor_->properties();
+ properties_.set(properties::MinNumRequests, 3);
return 0;
}
@@ -525,6 +525,8 @@ int UVCCameraData::init(MediaDevice *media)
properties_.set(properties::PixelArraySize, resolution);
properties_.set(properties::PixelArrayActiveAreas, { Rectangle(resolution) });
+ properties_.set(properties::MinNumRequests, 1);
+
/* Initialise the supported controls. */
ControlInfoMap::Map ctrls;
@@ -20,6 +20,7 @@
#include <libcamera/formats.h>
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/ipa_module_info.h>
+#include <libcamera/property_ids.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
@@ -516,6 +517,8 @@ int VimcCameraData::init()
/* Initialize the camera properties. */
properties_ = sensor_->properties();
+ properties_.set(properties::MinNumRequests, 2);
+
return 0;
}
@@ -678,6 +678,15 @@ controls:
\todo Turn this property into a "maximum control value" for the
ScalerCrop control once "dynamic" controls have been implemented.
+ - MinNumRequests:
+ type: int32_t
+ description: |
+ The bare minimum number of requests needed in the camera pipeline for
+ capture to be possible, as required by the driver. Note that this
+ quantity does not guarantee that frames won't be dropped or that manual
+ per-frame controls will be applied properly.
+
+
# ----------------------------------------------------------------------------
# Draft properties section
The MinNumRequests property reports the bare minimum number of requests needed in the camera pipeline for capture to be possible. It is equal to the number of buffers required by the driver. At this quantity, there's no guarantee that frames won't be dropped or that manual per-frame controls will apply correctly. The quantity needed for those may be added as separate properties in the future. Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com> --- src/libcamera/pipeline/ipu3/ipu3.cpp | 6 ++++++ src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 ++++++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 ++ src/libcamera/pipeline/simple/simple.cpp | 2 ++ src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 2 ++ src/libcamera/pipeline/vimc/vimc.cpp | 3 +++ src/libcamera/property_ids.yaml | 9 +++++++++ 7 files changed, 30 insertions(+)