diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-06-27 04:14:48 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-06-28 14:25:46 +0200 |
commit | 1e0cd804f07d126af2e248a54dbb4042d861487b (patch) | |
tree | cd2a19b87853fdbb13e473aeb81e36ff36cee935 /src/libcamera/pipeline/ipu3/imgu.h | |
parent | 003645f5989002c1ee8be582b2ee8bf9228e5e41 (diff) |
libcamera: ipu3: imgu: Remove ImgUOutput
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 <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/ipu3/imgu.h')
-rw-r--r-- | src/libcamera/pipeline/ipu3/imgu.h | 32 |
1 files changed, 11 insertions, 21 deletions
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: |