android: Cleanup libcamera namespace usage
Usually .cpp files are equipped with using namespace libcamera; Hence, it is unnecessary mentioning the explicit namespace of libcamera at certain places. While at it, a small typo in a comment was noticed and fixed as part of this patch. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
This commit is contained in:
parent
e6886f6352
commit
8ae20f38bf
6 changed files with 16 additions and 17 deletions
|
@ -378,7 +378,7 @@ void CameraCapabilities::computeHwLevel(
|
|||
hwLevel_ = hwLevel;
|
||||
}
|
||||
|
||||
int CameraCapabilities::initialize(std::shared_ptr<libcamera::Camera> camera,
|
||||
int CameraCapabilities::initialize(std::shared_ptr<Camera> camera,
|
||||
int orientation, int facing)
|
||||
{
|
||||
camera_ = camera;
|
||||
|
@ -429,7 +429,7 @@ CameraCapabilities::initializeYUVResolutions(const PixelFormat &pixelFormat,
|
|||
}
|
||||
|
||||
std::vector<Size>
|
||||
CameraCapabilities::initializeRawResolutions(const libcamera::PixelFormat &pixelFormat)
|
||||
CameraCapabilities::initializeRawResolutions(const PixelFormat &pixelFormat)
|
||||
{
|
||||
std::unique_ptr<CameraConfiguration> cameraConfig =
|
||||
camera_->generateConfiguration({ StreamRole::Raw });
|
||||
|
|
|
@ -746,8 +746,8 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
|
|||
}
|
||||
|
||||
FrameBuffer *CameraDevice::createFrameBuffer(const buffer_handle_t camera3buffer,
|
||||
libcamera::PixelFormat pixelFormat,
|
||||
const libcamera::Size &size)
|
||||
PixelFormat pixelFormat,
|
||||
const Size &size)
|
||||
{
|
||||
FileDescriptor fd;
|
||||
/*
|
||||
|
@ -1140,7 +1140,7 @@ void CameraDevice::requestComplete(Request *request)
|
|||
if (!resultMetadata) {
|
||||
notifyError(descriptor.frameNumber_, nullptr, CAMERA3_MSG_ERROR_RESULT);
|
||||
|
||||
/* The camera framework expects an empy metadata pack on error. */
|
||||
/* The camera framework expects an empty metadata pack on error. */
|
||||
resultMetadata = std::make_unique<CameraMetadata>(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ int CameraStream::configure()
|
|||
return 0;
|
||||
}
|
||||
|
||||
int CameraStream::process(const libcamera::FrameBuffer &source,
|
||||
int CameraStream::process(const FrameBuffer &source,
|
||||
buffer_handle_t camera3Dest,
|
||||
const CameraMetadata &requestMetadata,
|
||||
CameraMetadata *resultMetadata)
|
||||
|
@ -139,7 +139,7 @@ FrameBuffer *CameraStream::getBuffer()
|
|||
return buffer;
|
||||
}
|
||||
|
||||
void CameraStream::putBuffer(libcamera::FrameBuffer *buffer)
|
||||
void CameraStream::putBuffer(FrameBuffer *buffer)
|
||||
{
|
||||
if (!allocator_)
|
||||
return;
|
||||
|
|
|
@ -27,7 +27,7 @@ LOG_DECLARE_CATEGORY(HAL)
|
|||
* by the CameraWorker which queues it to the libcamera::Camera after handling
|
||||
* fences.
|
||||
*/
|
||||
CaptureRequest::CaptureRequest(libcamera::Camera *camera)
|
||||
CaptureRequest::CaptureRequest(Camera *camera)
|
||||
: camera_(camera)
|
||||
{
|
||||
request_ = camera_->createRequest(reinterpret_cast<uint64_t>(this));
|
||||
|
|
|
@ -21,7 +21,7 @@ class CameraBuffer::Private : public Extensible::Private
|
|||
|
||||
public:
|
||||
Private(CameraBuffer *cameraBuffer, buffer_handle_t camera3Buffer,
|
||||
libcamera::PixelFormat pixelFormat, const libcamera::Size &size,
|
||||
PixelFormat pixelFormat, const Size &size,
|
||||
int flags);
|
||||
~Private();
|
||||
|
||||
|
@ -53,8 +53,8 @@ private:
|
|||
|
||||
CameraBuffer::Private::Private([[maybe_unused]] CameraBuffer *cameraBuffer,
|
||||
buffer_handle_t camera3Buffer,
|
||||
[[maybe_unused]] libcamera::PixelFormat pixelFormat,
|
||||
[[maybe_unused]] const libcamera::Size &size,
|
||||
[[maybe_unused]] PixelFormat pixelFormat,
|
||||
[[maybe_unused]] const Size &size,
|
||||
[[maybe_unused]] int flags)
|
||||
: handle_(camera3Buffer), numPlanes_(0), mapped_(false),
|
||||
registered_(false)
|
||||
|
|
|
@ -20,14 +20,13 @@ using namespace libcamera;
|
|||
LOG_DECLARE_CATEGORY(HAL)
|
||||
|
||||
class CameraBuffer::Private : public Extensible::Private,
|
||||
public libcamera::MappedBuffer
|
||||
public MappedBuffer
|
||||
{
|
||||
LIBCAMERA_DECLARE_PUBLIC(CameraBuffer)
|
||||
|
||||
public:
|
||||
Private(CameraBuffer *cameraBuffer, buffer_handle_t camera3Buffer,
|
||||
libcamera::PixelFormat pixelFormat, const libcamera::Size &size,
|
||||
int flags);
|
||||
PixelFormat pixelFormat, const Size &size, int flags);
|
||||
~Private();
|
||||
|
||||
unsigned int numPlanes() const;
|
||||
|
@ -58,13 +57,13 @@ private:
|
|||
|
||||
CameraBuffer::Private::Private([[maybe_unused]] CameraBuffer *cameraBuffer,
|
||||
buffer_handle_t camera3Buffer,
|
||||
libcamera::PixelFormat pixelFormat,
|
||||
const libcamera::Size &size, int flags)
|
||||
PixelFormat pixelFormat,
|
||||
const Size &size, int flags)
|
||||
: fd_(-1), flags_(flags), bufferLength_(-1), mapped_(false)
|
||||
{
|
||||
error_ = 0;
|
||||
|
||||
const auto &info = libcamera::PixelFormatInfo::info(pixelFormat);
|
||||
const auto &info = PixelFormatInfo::info(pixelFormat);
|
||||
if (!info.isValid()) {
|
||||
error_ = -EINVAL;
|
||||
LOG(HAL, Error) << "Invalid pixel format: "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue