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
QCameraFormat Class Reference

#include <qcameradevice.h>

Collaboration diagram for QCameraFormat:

Public Member Functions

 QCameraFormat () noexcept
 \qmlvaluetype cameraFormat\inqmlmodule QtMultimedia
 QCameraFormat (const QCameraFormat &other) noexcept
 Copy constructs a camera format from the other format.
QCameraFormatoperator= (const QCameraFormat &other) noexcept
 Assign other to this.
 ~QCameraFormat ()
 Destructs the camera format object.
QVideoFrameFormat::PixelFormat pixelFormat () const noexcept
QSize resolution () const noexcept
float minFrameRate () const noexcept
float maxFrameRate () const noexcept
bool isNull () const noexcept
 Returns true if this is a default constructed QCameraFormat.
bool operator== (const QCameraFormat &other) const
 Returns true if the other format is equal to this camera format, otherwise false.
bool operator!= (const QCameraFormat &other) const
 Returns false if the other format is equal to this camera format, otherwise true.

Properties

QSize resolution
 \qmlproperty size QtMultimedia::cameraFormat::resolution
QVideoFrameFormat::PixelFormat pixelFormat
 \qmlproperty enumeration QtMultimedia::cameraFormat::pixelFormat
float minFrameRate
 \qmlproperty real QtMultimedia::cameraFormat::minFrameRate
float maxFrameRate
 \qmlproperty real QtMultimedia::cameraFormat::maxFrameRate

Friends

class QCameraFormatPrivate
Q_MULTIMEDIA_EXPORT friend QDebug operator<< (QDebug d, const QCameraFormat &format)

Detailed Description

Definition at line 15 of file qcameradevice.h.

Constructor & Destructor Documentation

◆ QCameraFormat() [1/2]

QCameraFormat::QCameraFormat ( )
defaultnoexcept

\qmlvaluetype cameraFormat\inqmlmodule QtMultimedia

\class QCameraFormat
\since 6.2
\brief The QCameraFormat class describes a video format supported by a camera device.
\inmodule QtMultimedia
\ingroup multimedia
\ingroup multimedia_camera

QCameraFormat represents a certain video format supported by a camera device.

! [format-description] The format is a combination of a \l{QVideoFrameFormat::PixelFormat}{pixel format}, resolution and a range of frame rates. ! [format-description]

QCameraFormat objects can be queried from QCameraDevice to inspect the set of
supported video formats.

\sa QCameraDevice, QCamera
Since
6.2 \nativetype QCameraFormat

Describes a video format supported by a camera device.

cameraFormat represents a certain video format supported by a camera device.

format-description

cameraFormat objects can be queried from \l cameraDevice to inspect the set of supported video formats.

See also
cameraDevice, Camera

Constructs a null camera format.

See also
isNull()

◆ QCameraFormat() [2/2]

QCameraFormat::QCameraFormat ( const QCameraFormat & other)
defaultnoexcept

Copy constructs a camera format from the other format.

◆ ~QCameraFormat()

QCameraFormat::~QCameraFormat ( )
default

Destructs the camera format object.

Member Function Documentation

◆ isNull()

bool QCameraFormat::isNull ( ) const
inlinenoexcept

Returns true if this is a default constructed QCameraFormat.

Definition at line 33 of file qcameradevice.h.

◆ maxFrameRate()

float QCameraFormat::maxFrameRate ( ) const
noexcept

Definition at line 156 of file qcameradevice.cpp.

◆ minFrameRate()

float QCameraFormat::minFrameRate ( ) const
noexcept

Definition at line 134 of file qcameradevice.cpp.

◆ operator!=()

bool QCameraFormat::operator!= ( const QCameraFormat & other) const
inline

Returns false if the other format is equal to this camera format, otherwise true.

Definition at line 36 of file qcameradevice.h.

◆ operator=()

QCameraFormat & QCameraFormat::operator= ( const QCameraFormat & other)
defaultnoexcept

Assign other to this.

◆ operator==()

bool QCameraFormat::operator== ( const QCameraFormat & other) const

Returns true if the other format is equal to this camera format, otherwise false.

Definition at line 172 of file qcameradevice.cpp.

◆ pixelFormat()

QVideoFrameFormat::PixelFormat QCameraFormat::pixelFormat ( ) const
noexcept

Definition at line 102 of file qcameradevice.cpp.

◆ resolution()

QSize QCameraFormat::resolution ( ) const
noexcept

Definition at line 118 of file qcameradevice.cpp.

◆ operator<<

Q_MULTIMEDIA_EXPORT friend QDebug operator<< ( QDebug d,
const QCameraFormat & format )
friend

Definition at line 470 of file qcameradevice.cpp.

◆ QCameraFormatPrivate

friend class QCameraFormatPrivate
friend

Definition at line 40 of file qcameradevice.h.

Property Documentation

◆ maxFrameRate

float QCameraFormat::maxFrameRate
read

\qmlproperty real QtMultimedia::cameraFormat::maxFrameRate

Returns the highest frame rate defined by this format.

The camera will always try to use the maximum frame rate supported by a certain video format.

Returns the highest frame rate defined by this format.

The camera will always try to use the highest frame rate supported by a certain video format.

Definition at line 21 of file qcameradevice.h.

◆ minFrameRate

float QCameraFormat::minFrameRate
read

\qmlproperty real QtMultimedia::cameraFormat::minFrameRate

Returns the lowest frame rate defined by this format.

Returns the lowest frame rate defined by this format.

Definition at line 20 of file qcameradevice.h.

◆ pixelFormat

QVideoFrameFormat::PixelFormat QCameraFormat::pixelFormat
read

\qmlproperty enumeration QtMultimedia::cameraFormat::pixelFormat

Holds the pixel format.

Most commonly this is either QVideoFrameFormat::Format_Jpeg or QVideoFrameFormat::Format_YUVY but other formats could also be supported by the camera.

See also
QVideoFrameFormat::PixelFormat

Returns the pixel format.

Most commonly this is either QVideoFrameFormat::Format_Jpeg or QVideoFrameFormat::Format_YUVY but other formats could also be supported by the camera.

See also
QVideoFrameFormat::PixelFormat

Definition at line 19 of file qcameradevice.h.

◆ resolution

QSize QCameraFormat::resolution
read

\qmlproperty size QtMultimedia::cameraFormat::resolution

Returns the resolution.

Returns the resolution.

Definition at line 18 of file qcameradevice.h.


The documentation for this class was generated from the following files: