From 1e0cd804f07d126af2e248a54dbb4042d861487b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sat, 27 Jun 2020 04:14:48 +0200 Subject: libcamera: ipu3: imgu: Remove ImgUOutput MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The struct ImgUOutput now only contains one member that is in use, the video device. Remove the struct and use the video device directly instead. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/imgu.h | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'src/libcamera/pipeline/ipu3/imgu.h') diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h index 2ad2a65d..66146911 100644 --- a/src/libcamera/pipeline/ipu3/imgu.h +++ b/src/libcamera/pipeline/ipu3/imgu.h @@ -22,28 +22,19 @@ struct StreamConfiguration; class ImgUDevice { public: - /* ImgU output descriptor: group data specific to an ImgU output. */ - struct ImgUOutput { - V4L2VideoDevice *dev; - unsigned int pad; - std::string name; - }; - ImgUDevice() - : imgu_(nullptr), input_(nullptr) + : imgu_(nullptr), input_(nullptr), output_(nullptr), + viewfinder_(nullptr), stat_(nullptr) { - output_.dev = nullptr; - viewfinder_.dev = nullptr; - stat_.dev = nullptr; } ~ImgUDevice() { delete imgu_; delete input_; - delete output_.dev; - delete viewfinder_.dev; - delete stat_.dev; + delete output_; + delete viewfinder_; + delete stat_; } int init(MediaDevice *media, unsigned int index); @@ -53,22 +44,21 @@ public: int configureOutput(const StreamConfiguration &cfg, V4L2DeviceFormat *outputFormat) { - return configureVideoDevice(output_.dev, PAD_OUTPUT, cfg, + return configureVideoDevice(output_, PAD_OUTPUT, cfg, outputFormat); } int configureViewfinder(const StreamConfiguration &cfg, V4L2DeviceFormat *outputFormat) { - return configureVideoDevice(viewfinder_.dev, PAD_VF, cfg, + return configureVideoDevice(viewfinder_, PAD_VF, cfg, outputFormat); } int configureStat(const StreamConfiguration &cfg, V4L2DeviceFormat *outputFormat) { - return configureVideoDevice(stat_.dev, PAD_STAT, cfg, - outputFormat); + return configureVideoDevice(stat_, PAD_STAT, cfg, outputFormat); } int allocateBuffers(unsigned int bufferCount); @@ -81,9 +71,9 @@ public: V4L2Subdevice *imgu_; V4L2VideoDevice *input_; - ImgUOutput output_; - ImgUOutput viewfinder_; - ImgUOutput stat_; + V4L2VideoDevice *output_; + V4L2VideoDevice *viewfinder_; + V4L2VideoDevice *stat_; /* \todo Add param video device for 3A tuning */ private: -- cgit v1.2.1