QCameraFormat 类描述摄像头设备所支持的视频格式。 更多...
头: | #include <QCameraFormat> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia) |
qmake: | QT += multimedia |
QCameraFormat () | |
QCameraFormat (const QCameraFormat & other ) | |
~QCameraFormat () | |
bool | isNull () const |
float | maxFrameRate () const |
float | minFrameRate () const |
QVideoFrameFormat::PixelFormat | pixelFormat () const |
QSize | resolution () const |
bool | operator!= (const QCameraFormat & other ) const |
QCameraFormat & | operator= (const QCameraFormat & other ) |
bool | operator== (const QCameraFormat & other ) const |
QCameraFormat represents a certain video format supported by a camera device.
The format is a combination of a 像素格式 , resolution and a range of frame rates.
QCameraFormat objects can be queried from QCameraDevice to inspect the set of supported video formats.
另请参阅 QCameraDevice and QCamera .
[read-only]
maxFrameRate
: const
float
Returns the highest frame rate defined by this format.
In 6.2, the camera will always try to use the highest frame rate supported by a certain video format.
访问函数:
float | maxFrameRate () const |
[read-only]
minFrameRate
: const
float
Returns the lowest frame rate defined by this format.
访问函数:
float | minFrameRate () const |
[read-only]
pixelFormat
: const
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.
访问函数:
QVideoFrameFormat::PixelFormat | pixelFormat () const |
另请参阅 QVideoFrameFormat::PixelFormat .
[read-only]
resolution
: const
QSize
Returns the resolution.
访问函数:
QSize | resolution () const |
Constructs a null camera format.
另请参阅 isNull ().
Copy constructs a camera format from the other 格式。
Destructs the camera format object.
Returns true if this is a default constructed QCameraFormat .
返回
false
若
other
format is equal to this camera format, otherwise
true
.
赋值 other to this.
返回
true
若
other
format is equal to this camera format, otherwise
false
.