QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
UVCDevices Namespace Reference

Functions

QStringList deviceNames ()
 Descriptions of the attached cameras.
QCameraDevice device (const QString &description)
 The attached camera of description description; a null device when none is.
bool deviceExists (const QString &description)
QString pixelFormatName (QVideoFrameFormat::PixelFormat pixelFormat)
 "MJPEG", "YUYV", "NV12", ...; empty for an invalid format.
QString formatName (const QCameraFormat &format)
 "1920x1080 30 fps MJPEG": a camera format as settings store it and menus show it.
QStringList formatNames (const QCameraDevice &device)
QCameraFormat format (const QCameraDevice &device, const QString &name)
 The format of device that formatName() calls name; a null format for none.
void requestPermission (QObject *context, std::function< void()> granted)

Detailed Description

USB (UVC) cameras offered as video sources. A camera's description is its video source name. UVCCameraController, the VideoReceiver of a camera, runs the selected one through Qt Multimedia.

Function Documentation

◆ device()

QCameraDevice UVCDevices::device ( const QString & description)

The attached camera of description description; a null device when none is.

Definition at line 21 of file UVCDevices.cc.

Referenced by deviceExists(), format(), and formatNames().

◆ deviceExists()

bool UVCDevices::deviceExists ( const QString & description)

Definition at line 33 of file UVCDevices.cc.

References device().

◆ deviceNames()

QStringList UVCDevices::deviceNames ( )

Descriptions of the attached cameras.

Definition at line 12 of file UVCDevices.cc.

◆ format()

QCameraFormat UVCDevices::format ( const QCameraDevice & device,
const QString & name )

The format of device that formatName() calls name; a null format for none.

Definition at line 78 of file UVCDevices.cc.

References device(), and format().

Referenced by format(), formatName(), and formatNames().

◆ formatName()

QString UVCDevices::formatName ( const QCameraFormat & format)

"1920x1080 30 fps MJPEG": a camera format as settings store it and menus show it.

Definition at line 51 of file UVCDevices.cc.

References format(), and pixelFormatName().

Referenced by formatNames().

◆ formatNames()

QStringList UVCDevices::formatNames ( const QCameraDevice & device)

The formats device offers, as formatName() strings without duplicates, best first: more pixels, then a higher frame rate.

Definition at line 60 of file UVCDevices.cc.

References device(), format(), and formatName().

◆ pixelFormatName()

QString UVCDevices::pixelFormatName ( QVideoFrameFormat::PixelFormat pixelFormat)

"MJPEG", "YUYV", "NV12", ...; empty for an invalid format.

Definition at line 38 of file UVCDevices.cc.

Referenced by formatName().

◆ requestPermission()

void UVCDevices::requestPermission ( QObject * context,
std::function< void()> granted )

Asks for camera permission unless the user already answered. granted is then called, on context's thread, if the user grants it; the user is told when it is refused.

Definition at line 89 of file UVCDevices.cc.

References qApp, and QGC::showAppMessage().