[libcamera-devel,2/7] libcamera: pipeline: vimc: Introduce rawStream_

Message ID 20200722133009.26528-3-kgupta@es.iitr.ac.in
State New
Delegated to: Kieran Bingham
Headers show
Series
  • vimc: Introduce multiple streaming
Related show

Commit Message

Kaaira Gupta July 22, 2020, 1:30 p.m. UTC
Change "stream_" to "rgbStream_" as it represents stream at RGB/YUV
Capture, and introduce a raw stream for streaming with RAW capture 1

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
---
 src/libcamera/pipeline/vimc/vimc.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Patch

diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 4f461b9..bd6ddde 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -66,7 +66,8 @@  public:
 	V4L2Subdevice *scaler_;
 	V4L2VideoDevice *video_;
 	V4L2VideoDevice *raw_;
-	Stream stream_;
+	Stream rgbStream_;
+	Stream rawStream_;
 };
 
 class VimcCameraConfiguration : public CameraConfiguration
@@ -290,7 +291,7 @@  int PipelineHandlerVimc::configure(Camera *camera, CameraConfiguration *config)
 	if (ret)
 		return ret;
 
-	cfg.setStream(&data->stream_);
+	cfg.setStream(&data->rgbStream_);
 
 	return 0;
 }
@@ -307,7 +308,7 @@  int PipelineHandlerVimc::exportFrameBuffers(Camera *camera, Stream *stream,
 int PipelineHandlerVimc::start(Camera *camera)
 {
 	VimcCameraData *data = cameraData(camera);
-	unsigned int count = data->stream_.configuration().bufferCount;
+	unsigned int count = data->rgbStream_.configuration().bufferCount;
 
 	int ret = data->video_->importBuffers(count);
 	if (ret < 0)
@@ -380,7 +381,7 @@  int PipelineHandlerVimc::processControls(VimcCameraData *data, Request *request)
 int PipelineHandlerVimc::queueRequestDevice(Camera *camera, Request *request)
 {
 	VimcCameraData *data = cameraData(camera);
-	FrameBuffer *buffer = request->findBuffer(&data->stream_);
+	FrameBuffer *buffer = request->findBuffer(&data->rgbStream_);
 	if (!buffer) {
 		LOG(VIMC, Error)
 			<< "Attempt to queue request with invalid stream";
@@ -433,7 +434,7 @@  bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
 
 	/* Create and register the camera. */
 	std::string name{ "VIMC " + data->sensor_->model() };
-	std::set<Stream *> streams{ &data->stream_ };
+	std::set<Stream *> streams{ &data->rgbStream_, &data->rawStream_ };
 	std::shared_ptr<Camera> camera = Camera::create(this, name, streams);
 	registerCamera(std::move(camera), std::move(data));