libcamera: camera_sensor: Provide fall-back for sensor properties

Support for the V4L2 selection API is currently optional in the
CameraSensor class. Properties registered by using values read through
that API are defaulted in several different places (the Android camera
HAL or the CameraSensor class).

In the future support for the selection API will be made mandatory, but to
give time to sensor drivers in all test platforms to be updated, use
sensor resolution as fallback values for sensor pixel array properties
and cache them as class member variables.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi
2020-12-30 17:02:36 +01:00
parent 8502d4c52d
commit 125ee6ddd6
2 changed files with 24 additions and 36 deletions

View File

@@ -84,6 +84,9 @@ private:
std::vector<unsigned int> mbusCodes_;
std::vector<Size> sizes_;
Size pixelArraySize_;
Rectangle activeArea_;
ControlList properties_;
};