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/uvcvideo.cpp | |
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/uvcvideo.cpp')
-rw-r--r-- | src/libcamera/pipeline/uvcvideo.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp index 120d8d3a..4ffe52aa 100644 --- a/src/libcamera/pipeline/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo.cpp @@ -20,6 +20,25 @@ namespace libcamera { LOG_DEFINE_CATEGORY(UVC) +class UVCCameraData : public CameraData +{ +public: + UVCCameraData(PipelineHandler *pipe) + : CameraData(pipe), video_(nullptr) + { + } + + ~UVCCameraData() + { + delete video_; + } + + void bufferReady(Buffer *buffer); + + V4L2Device *video_; + Stream stream_; +}; + class PipelineHandlerUVC : public PipelineHandler { public: @@ -42,25 +61,6 @@ public: bool match(DeviceEnumerator *enumerator) override; private: - class UVCCameraData : public CameraData - { - public: - UVCCameraData(PipelineHandler *pipe) - : CameraData(pipe), video_(nullptr) - { - } - - ~UVCCameraData() - { - delete video_; - } - - void bufferReady(Buffer *buffer); - - V4L2Device *video_; - Stream stream_; - }; - UVCCameraData *cameraData(const Camera *camera) { return static_cast<UVCCameraData *>( @@ -206,7 +206,7 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator) return true; } -void PipelineHandlerUVC::UVCCameraData::bufferReady(Buffer *buffer) +void UVCCameraData::bufferReady(Buffer *buffer) { Request *request = queuedRequests_.front(); |