libcamera: geometry: SizeRange: Extend with step information

The size range described might be subject to certain step
limitations. Make it possible to record this information.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund 2019-05-25 00:11:44 +02:00
parent 85a9b66134
commit ed56f16c4b
2 changed files with 57 additions and 5 deletions

View file

@ -73,18 +73,27 @@ struct SizeRange {
}
SizeRange(unsigned int width, unsigned int height)
: min(width, height), max(width, height)
: min(width, height), max(width, height), hStep(1), vStep(1)
{
}
SizeRange(unsigned int minW, unsigned int minH,
unsigned int maxW, unsigned int maxH)
: min(minW, minH), max(maxW, maxH)
: min(minW, minH), max(maxW, maxH), hStep(1), vStep(1)
{
}
SizeRange(unsigned int minW, unsigned int minH,
unsigned int maxW, unsigned int maxH,
unsigned int hstep, unsigned int vstep)
: min(minW, minH), max(maxW, maxH), hStep(hstep), vStep(vstep)
{
}
Size min;
Size max;
unsigned int hStep;
unsigned int vStep;
};
bool operator==(const SizeRange &lhs, const SizeRange &rhs);