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:
@@ -40,6 +40,8 @@ struct Size {
|
||||
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
|
||||
const std::string toString() const;
|
||||
};
|
||||
|
||||
bool operator==(const Size &lhs, const Size &rhs);
|
||||
|
||||
@@ -17,9 +17,8 @@ namespace libcamera {
|
||||
class Camera;
|
||||
|
||||
struct StreamConfiguration {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int pixelFormat;
|
||||
Size size;
|
||||
|
||||
unsigned int bufferCount;
|
||||
|
||||
@@ -40,7 +39,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit StreamUsage(Role role);
|
||||
StreamUsage(Role role, int width, int height);
|
||||
StreamUsage(Role role, const Size &size);
|
||||
|
||||
private:
|
||||
Role role_;
|
||||
|
||||
Reference in New Issue
Block a user