QCameraViewfinderSettingsControl Class

The QCameraViewfinderSettingsControl class provides an abstract class for controlling camera viewfinder parameters. More...

Header: #include <QCameraViewfinderSettingsControl>
qmake: QT += multimedia
Inherits: QMediaControl

This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Public Types

enum ViewfinderParameter { Resolution, PixelAspectRatio, MinimumFrameRate, MaximumFrameRate, PixelFormat, UserParameter }

Public Functions

virtual ~QCameraViewfinderSettingsControl()
virtual bool isViewfinderParameterSupported(QCameraViewfinderSettingsControl::ViewfinderParameter parameter) const = 0
virtual void setViewfinderParameter(QCameraViewfinderSettingsControl::ViewfinderParameter parameter, const QVariant &value) = 0
virtual QVariant viewfinderParameter(QCameraViewfinderSettingsControl::ViewfinderParameter parameter) const = 0

Protected Functions

QCameraViewfinderSettingsControl(QObject *parent = nullptr)

Macros

Detailed Description

The interface name of QCameraViewfinderSettingsControl is org.qt-project.qt.cameraviewfindersettingscontrol/5.0 as defined in QCameraViewfinderSettingsControl_iid.

Warning: New backends should implement QCameraViewfinderSettingsControl2 instead. Application developers should request this control only if QCameraViewfinderSettingsControl2 is not available.

See also QMediaService::requestControl(), QCameraViewfinderSettingsControl2, and QCamera.

Member Type Documentation

enum QCameraViewfinderSettingsControl::ViewfinderParameter

ConstantValueDescription
QCameraViewfinderSettingsControl::Resolution0Viewfinder resolution, QSize.
QCameraViewfinderSettingsControl::PixelAspectRatio1Pixel aspect ratio, QSize as in QVideoSurfaceFormat::pixelAspectRatio
QCameraViewfinderSettingsControl::MinimumFrameRate2Minimum viewfinder frame rate, qreal
QCameraViewfinderSettingsControl::MaximumFrameRate3Maximum viewfinder frame rate, qreal
QCameraViewfinderSettingsControl::PixelFormat4Viewfinder pixel format, QVideoFrame::PixelFormat
QCameraViewfinderSettingsControl::UserParameter1000The base value for platform specific extended parameters. For such parameters the sequential values starting from UserParameter should be used.

Member Function Documentation

[protected] QCameraViewfinderSettingsControl::QCameraViewfinderSettingsControl(QObject *parent = nullptr)

Constructs a camera viewfinder control object with parent.

[virtual] QCameraViewfinderSettingsControl::~QCameraViewfinderSettingsControl()

Destroys the camera viewfinder control object.

[pure virtual] bool QCameraViewfinderSettingsControl::isViewfinderParameterSupported(QCameraViewfinderSettingsControl::ViewfinderParameter parameter) const

Returns true if configuration of viewfinder parameter is supported by camera backend.

[pure virtual] void QCameraViewfinderSettingsControl::setViewfinderParameter(QCameraViewfinderSettingsControl::ViewfinderParameter parameter, const QVariant &value)

Set the prefferred value of viewfinder parameter.

Calling this while the camera is active may result in the camera being stopped and reloaded. If video recording is in progress, this call may be ignored.

If an unsupported parameter is specified the camera may fail to load, or the setting may be ignored.

Viewfinder parameters may also depend on other camera settings, especially in video capture mode. If camera configuration conflicts with viewfinder settings, the camara configuration is usually preferred.

See also viewfinderParameter().

[pure virtual] QVariant QCameraViewfinderSettingsControl::viewfinderParameter(QCameraViewfinderSettingsControl::ViewfinderParameter parameter) const

Returns the value of viewfinder parameter.

See also setViewfinderParameter().

Macro Documentation

QCameraViewfinderSettingsControl_iid

org.qt-project.qt.cameraviewfindersettingscontrol/5.0

Defines the interface name of the QCameraViewfinderSettingsControl class.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.