Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtV4L2 Namespace Reference

Classes

class  QV4L2Camera
class  QV4L2CameraDevices
class  QV4L2FileDescriptor
class  QV4L2MemoryTransfer
struct  V4L2CameraInfo
struct  V4L2FormatMapEntry

Typedefs

using QV4L2FileDescriptorPtr = std::shared_ptr<QV4L2FileDescriptor>
using QV4L2MemoryTransferUPtr = std::unique_ptr<QV4L2MemoryTransfer>

Functions

 Q_STATIC_LOGGING_CATEGORY (qLcV4L2Camera, "qt.multimedia.v4l2.camera")
static std::chrono::microseconds toMicroseconds (const timeval &tv)
 Q_STATIC_LOGGING_CATEGORY (qLcV4L2CameraDevices, "qt.multimedia.v4l2.cameradevices")
static bool areCamerasEqual (QSpan< const QCameraDevice > aa, QSpan< const QCameraDevice > bb)
 Q_STATIC_LOGGING_CATEGORY (qLcV4L2MemoryTransfer, "qt.multimedia.v4l2.memorytransfer")
QV4L2MemoryTransferUPtr makeUserPtrMemoryTransfer (QV4L2FileDescriptorPtr fileDescriptor, const v4l2_pix_format &formatformat)
QV4L2MemoryTransferUPtr makeMMapMemoryTransfer (QV4L2FileDescriptorPtr fileDescriptor, const v4l2_pix_format &formatformat)
QVideoFrameFormat::PixelFormat formatForV4L2Format (uint32_t v4l2Format)
std::optional< uint32_t > v4l2FormatForPixelFormat (QVideoFrameFormat::PixelFormat formatformat)
QVideoFrameFormat::ColorSpace colorSpaceForV4L2Colorspace (v4l2_colorspace colorspace)
std::optional< v4l2_colorspace > v4l2ColorspaceForColorSpace (QVideoFrameFormat::ColorSpace colorSpace)
QSize sizeForV4L2Format (const v4l2_pix_format &pixFormat)

Variables

constexpr V4L2FormatMapEntry formatMap []

Typedef Documentation

◆ QV4L2FileDescriptorPtr

Definition at line 34 of file qv4l2memorytransfer_p.h.

◆ QV4L2MemoryTransferUPtr

Definition at line 65 of file qv4l2memorytransfer_p.h.

Function Documentation

◆ areCamerasEqual()

bool QtV4L2::areCamerasEqual ( QSpan< const QCameraDevice > a,
QSpan< const QCameraDevice > b )
static

Definition at line 25 of file qv4l2cameradevices.cpp.

◆ colorSpaceForV4L2Colorspace()

QVideoFrameFormat::ColorSpace QtV4L2::colorSpaceForV4L2Colorspace ( v4l2_colorspace colorspace)
inline

Definition at line 82 of file qv4l2formats_p.h.

◆ formatForV4L2Format()

QVideoFrameFormat::PixelFormat QtV4L2::formatForV4L2Format ( uint32_t v4l2Format)
inline

Definition at line 60 of file qv4l2formats_p.h.

◆ makeMMapMemoryTransfer()

QV4L2MemoryTransferUPtr QtV4L2::makeMMapMemoryTransfer ( QV4L2FileDescriptorPtr fileDescriptor,
const v4l2_pix_format & format )

Definition at line 389 of file qv4l2memorytransfer.cpp.

◆ makeUserPtrMemoryTransfer()

QV4L2MemoryTransferUPtr QtV4L2::makeUserPtrMemoryTransfer ( QV4L2FileDescriptorPtr fileDescriptor,
const v4l2_pix_format & format )

Definition at line 382 of file qv4l2memorytransfer.cpp.

◆ Q_STATIC_LOGGING_CATEGORY() [1/3]

QtV4L2::Q_STATIC_LOGGING_CATEGORY ( qLcV4L2Camera ,
"qt.multimedia.v4l2.camera"  )

◆ Q_STATIC_LOGGING_CATEGORY() [2/3]

QtV4L2::Q_STATIC_LOGGING_CATEGORY ( qLcV4L2CameraDevices ,
"qt.multimedia.v4l2.cameradevices"  )

◆ Q_STATIC_LOGGING_CATEGORY() [3/3]

QtV4L2::Q_STATIC_LOGGING_CATEGORY ( qLcV4L2MemoryTransfer ,
"qt.multimedia.v4l2.memorytransfer"  )

◆ sizeForV4L2Format()

QSize QtV4L2::sizeForV4L2Format ( const v4l2_pix_format & pixFormat)
inline

Definition at line 118 of file qv4l2formats_p.h.

◆ toMicroseconds()

std::chrono::microseconds QtV4L2::toMicroseconds ( const timeval & tv)
static

Definition at line 28 of file qv4l2camera.cpp.

◆ v4l2ColorspaceForColorSpace()

std::optional< v4l2_colorspace > QtV4L2::v4l2ColorspaceForColorSpace ( QVideoFrameFormat::ColorSpace colorSpace)
inline

Definition at line 101 of file qv4l2formats_p.h.

◆ v4l2FormatForPixelFormat()

std::optional< uint32_t > QtV4L2::v4l2FormatForPixelFormat ( QVideoFrameFormat::PixelFormat format)
inline

Definition at line 71 of file qv4l2formats_p.h.

References formatMap.

Variable Documentation

◆ formatMap

V4L2FormatMapEntry QtV4L2::formatMap[]
inlineconstexpr
Initial value:
= {
{ QVideoFrameFormat::Format_YUV420P, V4L2_PIX_FMT_YUV420 },
{ QVideoFrameFormat::Format_YUV422P, V4L2_PIX_FMT_YUV422P },
{ QVideoFrameFormat::Format_YUYV, V4L2_PIX_FMT_YUYV },
{ QVideoFrameFormat::Format_UYVY, V4L2_PIX_FMT_UYVY },
{ QVideoFrameFormat::Format_XBGR8888, V4L2_PIX_FMT_XBGR32 },
{ QVideoFrameFormat::Format_XRGB8888, V4L2_PIX_FMT_XRGB32 },
{ QVideoFrameFormat::Format_ABGR8888, V4L2_PIX_FMT_ABGR32 },
{ QVideoFrameFormat::Format_ARGB8888, V4L2_PIX_FMT_ARGB32 },
{ QVideoFrameFormat::Format_BGRX8888, V4L2_PIX_FMT_BGR32 },
{ QVideoFrameFormat::Format_RGBX8888, V4L2_PIX_FMT_RGB32 },
{ QVideoFrameFormat::Format_BGRA8888, V4L2_PIX_FMT_BGRA32 },
{ QVideoFrameFormat::Format_RGBA8888, V4L2_PIX_FMT_RGBA32 },
{ QVideoFrameFormat::Format_Y8, V4L2_PIX_FMT_GREY },
{ QVideoFrameFormat::Format_Y16, V4L2_PIX_FMT_Y16 },
{ QVideoFrameFormat::Format_NV12, V4L2_PIX_FMT_NV12 },
{ QVideoFrameFormat::Format_NV21, V4L2_PIX_FMT_NV21 },
{ QVideoFrameFormat::Format_Jpeg, V4L2_PIX_FMT_MJPEG },
{ QVideoFrameFormat::Format_Jpeg, V4L2_PIX_FMT_JPEG },
}

Definition at line 37 of file qv4l2formats_p.h.

Referenced by v4l2FormatForPixelFormat().