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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user