[RFC,5/9] fixups: Make it compile
diff mbox series

Message ID 20240717100913.16640-6-jacopo.mondi@ideasonboard.com
State Superseded
Headers show
Series
  • Handle Converter features differently
Related show

Commit Message

Jacopo Mondi July 17, 2024, 10:09 a.m. UTC
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 src/libcamera/converter.cpp                    | 4 ++--
 src/libcamera/converter/converter_v4l2_m2m.cpp | 8 ++------
 2 files changed, 4 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/converter.cpp b/src/libcamera/converter.cpp
index 65f4f96bafa5..a959003aaa73 100644
--- a/src/libcamera/converter.cpp
+++ b/src/libcamera/converter.cpp
@@ -177,7 +177,7 @@  Converter::~Converter()
  */
 int Converter::setCrop([[maybe_unused]] const Stream *stream, [[maybe_unused]] Rectangle *rect)
 {
-	if (!(getFeatures() & Feature::Crop)) {
+	if (!(features() & Feature::Crop)) {
 		LOG(Converter, Error) << "Converter doesn't support cropping capabilities";
 		return -ENOTSUP;
 	}
@@ -200,7 +200,7 @@  std::pair<Rectangle, Rectangle> Converter::getCropBounds([[maybe_unused]] const
 	const StreamConfiguration &config = stream->configuration();
 	Rectangle rect;
 
-	if (!(getFeatures() & Feature::Crop))
+	if (!(features() & Feature::Crop))
 		LOG(Converter, Error) << "Converter doesn't support cropping capabilities";
 
 	/*
diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp
index eaae35288194..e381e474c1c7 100644
--- a/src/libcamera/converter/converter_v4l2_m2m.cpp
+++ b/src/libcamera/converter/converter_v4l2_m2m.cpp
@@ -389,7 +389,7 @@  int V4L2M2MConverter::exportBuffers(const Stream *stream, unsigned int count,
  */
 int V4L2M2MConverter::setCrop(const Stream *stream, Rectangle *rect)
 {
-	if (!(getFeatures() & Feature::Crop))
+	if (!(features() & Feature::Crop))
 		return -ENOTSUP;
 
 	auto iter = streams_.find(stream);
@@ -414,7 +414,7 @@  V4L2M2MConverter::getCropBounds(const Stream *stream)
 	maxCrop.width = UINT_MAX;
 	maxCrop.height = UINT_MAX;
 
-	if (!(getFeatures() & Feature::Crop)) {
+	if (!(features() & Feature::Crop)) {
 		LOG(Converter, Error) << "Crop functionality is not supported";
 		return {};
 	}
@@ -532,10 +532,6 @@  int V4L2M2MConverter::queueBuffers(FrameBuffer *input,
 	return 0;
 }
 
-/*
- * \todo: This should be extended to include Feature::Flag to denote
- * what each converter supports feature-wise.
- */
 static std::initializer_list<std::string> compatibles = {
 	"mtk-mdp",
 	"pxp",