diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-05-17 23:36:00 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-05-23 01:07:38 +0300 |
commit | adc61fc3ce911f32128b4d8f37d42272baf42d7b (patch) | |
tree | e926084b08381595ac0cfc05ce4b72ae46733d31 /src/libcamera/pipeline/ipu3 | |
parent | 75de3bff9e165e512be5f53e19f31c7388dc08b1 (diff) |
libcamera: pipeline: Move camera data classes to the top level scope
Move the pipeline handler camera data classes, defined in the scope of
the respective pipeline handler class, to the top level of the libcamera
namespace. This prepares for the introduction of other classes that will
make use of them in the IPU3 and RkISP1 pipeline handlers. The UVC and
VIMC pipeline handlers are updated as well for consistency.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/pipeline/ipu3')
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 3acf82ff..5b46fb68 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -145,6 +145,25 @@ public: ImgUDevice::ImgUOutput *device_; }; +class IPU3CameraData : public CameraData +{ +public: + IPU3CameraData(PipelineHandler *pipe) + : CameraData(pipe) + { + } + + void imguOutputBufferReady(Buffer *buffer); + void imguInputBufferReady(Buffer *buffer); + void cio2BufferReady(Buffer *buffer); + + CIO2Device cio2_; + ImgUDevice *imgu_; + + IPU3Stream outStream_; + IPU3Stream vfStream_; +}; + class PipelineHandlerIPU3 : public PipelineHandler { public: @@ -167,25 +186,6 @@ public: bool match(DeviceEnumerator *enumerator) override; private: - class IPU3CameraData : public CameraData - { - public: - IPU3CameraData(PipelineHandler *pipe) - : CameraData(pipe) - { - } - - void imguOutputBufferReady(Buffer *buffer); - void imguInputBufferReady(Buffer *buffer); - void cio2BufferReady(Buffer *buffer); - - CIO2Device cio2_; - ImgUDevice *imgu_; - - IPU3Stream outStream_; - IPU3Stream vfStream_; - }; - static constexpr unsigned int IPU3_BUFFER_COUNT = 4; IPU3CameraData *cameraData(const Camera *camera) @@ -749,7 +749,7 @@ int PipelineHandlerIPU3::registerCameras() * Buffers completed from the ImgU input are immediately queued back to the * CIO2 unit to continue frame capture. */ -void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer) +void IPU3CameraData::imguInputBufferReady(Buffer *buffer) { cio2_.output_->queueBuffer(buffer); } @@ -760,7 +760,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer) * * Buffers completed from the ImgU output are directed to the application. */ -void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer) +void IPU3CameraData::imguOutputBufferReady(Buffer *buffer) { Request *request = buffer->request(); @@ -785,7 +785,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer) * Buffers completed from the CIO2 are immediately queued to the ImgU unit * for further processing. */ -void PipelineHandlerIPU3::IPU3CameraData::cio2BufferReady(Buffer *buffer) +void IPU3CameraData::cio2BufferReady(Buffer *buffer) { imgu_->input_->queueBuffer(buffer); } |