From 73b18967b6c04c2b6170d6f84685262b8c380cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 29 Jun 2020 17:27:15 +0200 Subject: libcamera: ipu3: cio2: Do not proxy signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not proxy the signal in the CI2Device when there is no need for it, remove it. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/cio2.cpp | 14 +------------- src/libcamera/pipeline/ipu3/cio2.h | 6 +++--- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp index aa1459fb..97a434a7 100644 --- a/src/libcamera/pipeline/ipu3/cio2.cpp +++ b/src/libcamera/pipeline/ipu3/cio2.cpp @@ -15,7 +15,6 @@ #include "libcamera/internal/camera_sensor.h" #include "libcamera/internal/media_device.h" #include "libcamera/internal/v4l2_subdevice.h" -#include "libcamera/internal/v4l2_videodevice.h" namespace libcamera { @@ -121,13 +120,7 @@ int CIO2Device::init(const MediaDevice *media, unsigned int index) std::string cio2Name = "ipu3-cio2 " + std::to_string(index); output_ = V4L2VideoDevice::fromEntityName(media, cio2Name); - ret = output_->open(); - if (ret) - return ret; - - output_->bufferReady.connect(this, &CIO2Device::cio2BufferReady); - - return 0; + return output_->open(); } /** @@ -289,9 +282,4 @@ void CIO2Device::freeBuffers() LOG(IPU3, Error) << "Failed to release CIO2 buffers"; } -void CIO2Device::cio2BufferReady(FrameBuffer *buffer) -{ - bufferReady.emit(buffer); -} - } /* namespace libcamera */ diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h index dc764b10..4fd949f8 100644 --- a/src/libcamera/pipeline/ipu3/cio2.h +++ b/src/libcamera/pipeline/ipu3/cio2.h @@ -13,15 +13,15 @@ #include +#include "libcamera/internal/v4l2_videodevice.h" + namespace libcamera { class CameraSensor; class FrameBuffer; class MediaDevice; class Request; -class V4L2DeviceFormat; class V4L2Subdevice; -class V4L2VideoDevice; struct Size; struct StreamConfiguration; @@ -48,7 +48,7 @@ public: int queueBuffer(Request *request, FrameBuffer *rawBuffer); void tryReturnBuffer(FrameBuffer *buffer); - Signal bufferReady; + Signal &bufferReady() { return output_->bufferReady; } private: void freeBuffers(); diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 958d8362..00559ce3 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -805,7 +805,7 @@ int PipelineHandlerIPU3::registerCameras() * associated ImgU input where they get processed and * returned through the ImgU main and secondary outputs. */ - data->cio2_.bufferReady.connect(data.get(), + data->cio2_.bufferReady().connect(data.get(), &IPU3CameraData::cio2BufferReady); data->imgu_->input_->bufferReady.connect(&data->cio2_, &CIO2Device::tryReturnBuffer); -- cgit v1.2.1