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>
This commit is contained in:
Laurent Pinchart 2019-05-17 23:36:00 +03:00
parent 75de3bff9e
commit adc61fc3ce
4 changed files with 79 additions and 79 deletions

View file

@ -20,6 +20,25 @@ namespace libcamera {
LOG_DEFINE_CATEGORY(VIMC)
class VimcCameraData : public CameraData
{
public:
VimcCameraData(PipelineHandler *pipe)
: CameraData(pipe)
{
}
~VimcCameraData()
{
delete video_;
}
void bufferReady(Buffer *buffer);
V4L2Device *video_;
Stream stream_;
};
class PipelineHandlerVimc : public PipelineHandler
{
public:
@ -42,25 +61,6 @@ public:
bool match(DeviceEnumerator *enumerator) override;
private:
class VimcCameraData : public CameraData
{
public:
VimcCameraData(PipelineHandler *pipe)
: CameraData(pipe)
{
}
~VimcCameraData()
{
delete video_;
}
void bufferReady(Buffer *buffer);
V4L2Device *video_;
Stream stream_;
};
VimcCameraData *cameraData(const Camera *camera)
{
return static_cast<VimcCameraData *>(
@ -202,7 +202,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
return true;
}
void PipelineHandlerVimc::VimcCameraData::bufferReady(Buffer *buffer)
void VimcCameraData::bufferReady(Buffer *buffer)
{
Request *request = queuedRequests_.front();