libcamera: Use the Size class through libcamera

Several of our structures include width and height fields that model a
size while we have a Size class for that purpose. Use the Size class
through libcamera, and give it a toString() method like other geometry
and format classes.

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
2019-04-30 21:16:28 +03:00
parent baad55d009
commit a2dddf7c26
19 changed files with 93 additions and 121 deletions
+2 -2
View File
@@ -13,6 +13,7 @@
#include <linux/videodev2.h>
#include <libcamera/geometry.h>
#include <libcamera/signal.h>
#include "log.h"
@@ -92,9 +93,8 @@ struct V4L2Capability final : v4l2_capability {
class V4L2DeviceFormat
{
public:
uint32_t width;
uint32_t height;
uint32_t fourcc;
Size size;
struct {
uint32_t size;
+1 -2
View File
@@ -23,8 +23,7 @@ class MediaDevice;
struct V4L2SubdeviceFormat {
uint32_t mbus_code;
uint32_t width;
uint32_t height;
Size size;
const std::string toString() const;
};