[libcamera-devel,RFC,5/6] pipeline: simple: rename setupFormats to setupStreamProperties
diff mbox series

Message ID 20210316155211.6679-6-m.cichy@pengutronix.de
State Superseded
Headers show
Series
  • Add propagation of sensor frame interval
Related show

Commit Message

Marian Cichy March 16, 2021, 3:52 p.m. UTC
This function does not only setup the format anymore but also propagates
the frame interval from the camera sensor to the camera interface, so
lets choose a more generic name for it.

Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
---
 src/libcamera/pipeline/simple/simple.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 296412e2..bc969125 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -150,7 +150,7 @@  public:
 
 	int init();
 	int setupLinks();
-	int setupFormats(V4L2SubdeviceFormat *format,
+	int setupStreamProperties(V4L2SubdeviceFormat *format,
 			 V4L2Subdevice::Whence whence);
 
 	unsigned int streamIndex(const Stream *stream) const
@@ -354,7 +354,7 @@  int SimpleCameraData::init()
 	for (unsigned int code : sensor_->mbusCodes()) {
 		V4L2SubdeviceFormat format{ code, sensor_->resolution() };
 
-		ret = setupFormats(&format, V4L2Subdevice::TryFormat);
+		ret = setupStreamProperties(&format, V4L2Subdevice::TryFormat);
 		if (ret < 0) {
 			LOG(SimplePipeline, Debug)
 				<< "Media bus code " << utils::hex(code, 4)
@@ -455,7 +455,7 @@  int SimpleCameraData::setupLinks()
 	return 0;
 }
 
-int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format,
+int SimpleCameraData::setupStreamProperties(V4L2SubdeviceFormat *format,
 				   V4L2Subdevice::Whence whence)
 {
 	SimplePipelineHandler *pipe = static_cast<SimplePipelineHandler *>(pipe_);
@@ -719,7 +719,7 @@  int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
 	const SimpleCameraData::Configuration *pipeConfig = config->pipeConfig();
 	V4L2SubdeviceFormat format{ pipeConfig->code, data->sensor_->resolution() };
 
-	ret = data->setupFormats(&format, V4L2Subdevice::ActiveFormat);
+	ret = data->setupStreamProperties(&format, V4L2Subdevice::ActiveFormat);
 	if (ret < 0)
 		return ret;