libcamera: geometry: Give constructors to Rectangle

Rectangle, unlike Size, has no constructor, requiring the users to
explicitly initialize the instances. This is error-prone, add
constructors.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2020-07-15 01:41:07 +03:00
parent 935aec66ae
commit 4f509caa8e
6 changed files with 41 additions and 19 deletions

View File

@@ -487,7 +487,7 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const
info->model = model();
/* Get the active area size. */
Rectangle rect = {};
Rectangle rect;
int ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &rect);
if (ret) {
LOG(CameraSensor, Error)