Rename a few controls.
The encoder controls could be confused with actual encoding, so make clear they are just settings. Also, the end point selector controls were not named very well. Change-Id: I27f8bf9c865c5f295abad97c01ef98752af42613 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
b834fe032f
commit
bba28afe55
@@ -51,7 +51,7 @@
|
||||
#include <qmediarecordercontrol.h>
|
||||
#include <qcameraimageprocessingcontrol.h>
|
||||
#include <qcameraimagecapturecontrol.h>
|
||||
#include <qvideodevicecontrol.h>
|
||||
#include <qvideodeviceselectorcontrol.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
QMediaServiceProvider *provider;
|
||||
|
||||
QCameraControl *control;
|
||||
QVideoDeviceControl *deviceControl;
|
||||
QVideoDeviceSelectorControl *deviceControl;
|
||||
QCameraLocksControl *locksControl;
|
||||
|
||||
QCameraExposure *cameraExposure;
|
||||
@@ -245,7 +245,7 @@ void QCameraPrivate::initControls()
|
||||
if (service) {
|
||||
control = qobject_cast<QCameraControl *>(service->requestControl(QCameraControl_iid));
|
||||
locksControl = qobject_cast<QCameraLocksControl *>(service->requestControl(QCameraLocksControl_iid));
|
||||
deviceControl = qobject_cast<QVideoDeviceControl*>(service->requestControl(QVideoDeviceControl_iid));
|
||||
deviceControl = qobject_cast<QVideoDeviceSelectorControl*>(service->requestControl(QVideoDeviceSelectorControl_iid));
|
||||
|
||||
if (control) {
|
||||
q->connect(control, SIGNAL(stateChanged(QCamera::State)), q, SLOT(_q_updateState(QCamera::State)));
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <qcamerazoomcontrol.h>
|
||||
#include <qmediarecordercontrol.h>
|
||||
#include <qcameraimagecapturecontrol.h>
|
||||
#include <qvideodevicecontrol.h>
|
||||
#include <qvideodeviceselectorcontrol.h>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <qmediarecordercontrol.h>
|
||||
#include <qcameraimageprocessingcontrol.h>
|
||||
#include <qcameraimagecapturecontrol.h>
|
||||
#include <qvideodevicecontrol.h>
|
||||
#include <qvideodeviceselectorcontrol.h>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ INCLUDEPATH += controls
|
||||
|
||||
PUBLIC_HEADERS += \
|
||||
controls/qaudiodecodercontrol.h \
|
||||
controls/qaudioencodercontrol.h \
|
||||
controls/qaudioendpointselector.h \
|
||||
controls/qaudioencodersettingscontrol.h \
|
||||
controls/qaudioendpointselectorcontrol.h \
|
||||
controls/qcameracapturebufferformatcontrol.h \
|
||||
controls/qcameracapturedestinationcontrol.h \
|
||||
controls/qcameracontrol.h \
|
||||
@@ -28,8 +28,8 @@ PUBLIC_HEADERS += \
|
||||
controls/qmetadatawritercontrol.h \
|
||||
controls/qradiodatacontrol.h \
|
||||
controls/qradiotunercontrol.h \
|
||||
controls/qvideodevicecontrol.h \
|
||||
controls/qvideoencodercontrol.h \
|
||||
controls/qvideodeviceselectorcontrol.h \
|
||||
controls/qvideoencodersettingscontrol.h \
|
||||
controls/qvideorenderercontrol.h \
|
||||
controls/qvideowindowcontrol.h \
|
||||
controls/qmediaaudioprobecontrol.h \
|
||||
@@ -41,8 +41,6 @@ PRIVATE_HEADERS += \
|
||||
controls/qmediaplaylistsourcecontrol_p.h
|
||||
|
||||
SOURCES += \
|
||||
controls/qaudioencodercontrol.cpp \
|
||||
controls/qaudioendpointselector.cpp \
|
||||
controls/qcameracapturebufferformatcontrol.cpp \
|
||||
controls/qcameracapturedestinationcontrol.cpp \
|
||||
controls/qcameracontrol.cpp \
|
||||
@@ -68,13 +66,15 @@ SOURCES += \
|
||||
controls/qmetadatawritercontrol.cpp \
|
||||
controls/qradiodatacontrol.cpp \
|
||||
controls/qradiotunercontrol.cpp \
|
||||
controls/qvideodevicecontrol.cpp \
|
||||
controls/qvideoencodercontrol.cpp \
|
||||
controls/qvideorenderercontrol.cpp \
|
||||
controls/qvideowindowcontrol.cpp \
|
||||
controls/qmediaaudioprobecontrol.cpp \
|
||||
controls/qmediavideoprobecontrol.cpp \
|
||||
controls/qmediaavailabilitycontrol.cpp \
|
||||
controls/qaudiodecodercontrol.cpp
|
||||
controls/qaudiodecodercontrol.cpp \
|
||||
controls/qvideoencodersettingscontrol.cpp \
|
||||
controls/qaudioencodersettingscontrol.cpp \
|
||||
controls/qaudioendpointselectorcontrol.cpp \
|
||||
controls/qvideodeviceselectorcontrol.cpp
|
||||
|
||||
|
||||
|
||||
@@ -39,74 +39,74 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qaudioencodercontrol.h"
|
||||
#include "qaudioencodersettingscontrol.h"
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
/*!
|
||||
\class QAudioEncoderControl
|
||||
\class QAudioEncoderSettingsControl
|
||||
\inmodule QtMultimedia
|
||||
|
||||
\ingroup multimedia_control
|
||||
|
||||
\brief The QAudioEncoderControl class provides access to the settings of a
|
||||
\brief The QAudioEncoderSettingsControl class provides access to the settings of a
|
||||
media service that performs audio encoding.
|
||||
|
||||
If a QMediaService supports encoding audio data it will implement
|
||||
QAudioEncoderControl. This control provides information about the limits
|
||||
QAudioEncoderSettingsControl. This control provides information about the limits
|
||||
of restricted audio encoder options and allows the selection of a set of
|
||||
audio encoder settings as specified in a QAudioEncoderSettings object.
|
||||
|
||||
The functionality provided by this control is exposed to application code through the
|
||||
QMediaRecorder class.
|
||||
|
||||
The interface name of QAudioEncoderControl is \c org.qt-project.qt.audioencodercontrol/5.0 as
|
||||
defined in QAudioEncoderControl_iid.
|
||||
The interface name of QAudioEncoderSettingsControl is \c org.qt-project.qt.audioencodersettingscontrol/5.0 as
|
||||
defined in QAudioEncoderSettingsControl_iid.
|
||||
|
||||
\sa QMediaService::requestControl(), QMediaRecorder
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro QAudioEncoderControl_iid
|
||||
\macro QAudioEncoderSettingsControl_iid
|
||||
|
||||
\c org.qt-project.qt.audioencodercontrol/5.0
|
||||
\c org.qt-project.qt.audioencodersettingscontrol/5.0
|
||||
|
||||
Defines the interface name of the QAudioEncoderControl class.
|
||||
Defines the interface name of the QAudioEncoderSettingsControl class.
|
||||
|
||||
\relates QAudioEncoderControl
|
||||
\relates QAudioEncoderSettingsControl
|
||||
*/
|
||||
|
||||
/*!
|
||||
Create a new audio encode control object with the given \a parent.
|
||||
Create a new audio encoder settings control object with the given \a parent.
|
||||
*/
|
||||
QAudioEncoderControl::QAudioEncoderControl(QObject *parent)
|
||||
QAudioEncoderSettingsControl::QAudioEncoderSettingsControl(QObject *parent)
|
||||
:QMediaControl(parent)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destroys the audio encode control.
|
||||
Destroys the audio encoder settings control.
|
||||
*/
|
||||
QAudioEncoderControl::~QAudioEncoderControl()
|
||||
QAudioEncoderSettingsControl::~QAudioEncoderSettingsControl()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QAudioEncoderControl::supportedAudioCodecs() const
|
||||
\fn QAudioEncoderSettingsControl::supportedAudioCodecs() const
|
||||
|
||||
Returns the list of supported audio codec names.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAudioEncoderControl::codecDescription(const QString &codec) const
|
||||
\fn QAudioEncoderSettingsControl::codecDescription(const QString &codec) const
|
||||
|
||||
Returns description of audio \a codec.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAudioEncoderControl::supportedSampleRates(const QAudioEncoderSettings &settings = QAudioEncoderSettings(),
|
||||
\fn QAudioEncoderSettingsControl::supportedSampleRates(const QAudioEncoderSettings &settings = QAudioEncoderSettings(),
|
||||
bool *continuous) const
|
||||
|
||||
Returns the list of supported audio sample rates, if known.
|
||||
@@ -121,21 +121,21 @@ QAudioEncoderControl::~QAudioEncoderControl()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAudioEncoderControl::audioSettings() const
|
||||
\fn QAudioEncoderSettingsControl::audioSettings() const
|
||||
|
||||
Returns the audio encoder settings.
|
||||
|
||||
The returned value may be different tha passed to QAudioEncoderControl::setAudioSettings()
|
||||
The returned value may be different tha passed to QAudioEncoderSettingsControl::setAudioSettings()
|
||||
if the settings contains the default or undefined parameters.
|
||||
In this case if the undefined parameters are already resolved, they should be returned.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAudioEncoderControl::setAudioSettings(const QAudioEncoderSettings &settings)
|
||||
\fn QAudioEncoderSettingsControl::setAudioSettings(const QAudioEncoderSettings &settings)
|
||||
|
||||
Sets the selected audio \a settings.
|
||||
*/
|
||||
|
||||
#include "moc_qaudioencodercontrol.cpp"
|
||||
#include "moc_qaudioencodersettingscontrol.cpp"
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QAUDIOENCODERCONTROL_H
|
||||
#define QAUDIOENCODERCONTROL_H
|
||||
#ifndef QAUDIOENCODERSETTINGSCONTROL_H
|
||||
#define QAUDIOENCODERSETTINGSCONTROL_H
|
||||
|
||||
#include "qmediacontrol.h"
|
||||
#include "qmediarecorder.h"
|
||||
@@ -62,12 +62,12 @@ QT_BEGIN_NAMESPACE
|
||||
// Required for QDoc workaround
|
||||
class QString;
|
||||
|
||||
class Q_MULTIMEDIA_EXPORT QAudioEncoderControl : public QMediaControl
|
||||
class Q_MULTIMEDIA_EXPORT QAudioEncoderSettingsControl : public QMediaControl
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual ~QAudioEncoderControl();
|
||||
virtual ~QAudioEncoderSettingsControl();
|
||||
|
||||
virtual QStringList supportedAudioCodecs() const = 0;
|
||||
virtual QString codecDescription(const QString &codecName) const = 0;
|
||||
@@ -79,15 +79,15 @@ public:
|
||||
virtual void setAudioSettings(const QAudioEncoderSettings&) = 0;
|
||||
|
||||
protected:
|
||||
QAudioEncoderControl(QObject *parent = 0);
|
||||
QAudioEncoderSettingsControl(QObject *parent = 0);
|
||||
};
|
||||
|
||||
#define QAudioEncoderControl_iid "org.qt-project.qt.audioencodercontrol/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QAudioEncoderControl, QAudioEncoderControl_iid)
|
||||
#define QAudioEncoderSettingsControl_iid "org.qt-project.qt.audioencodersettingscontrol/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QAudioEncoderSettingsControl, QAudioEncoderSettingsControl_iid)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
|
||||
#endif // QAUDIOCAPTUREPROPERTIESCONTROL_H
|
||||
#endif // QAUDIOENCODERSETTINGSCONTROL_H
|
||||
@@ -39,94 +39,94 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qaudioendpointselector.h"
|
||||
#include "qaudioendpointselectorcontrol.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QAudioEndpointSelector
|
||||
\class QAudioEndpointSelectorControl
|
||||
|
||||
\brief The QAudioEndpointSelector class provides an audio endpoint selector media control.
|
||||
\brief The QAudioEndpointSelectorControl class provides an audio endpoint selector media control.
|
||||
\inmodule QtMultimedia
|
||||
\ingroup multimedia_control
|
||||
|
||||
The QAudioEndpointSelector class provides descriptions of the audio
|
||||
The QAudioEndpointSelectorControl class provides descriptions of the audio
|
||||
endpoints available on a system and allows one to be selected as the audio
|
||||
of a media service.
|
||||
|
||||
The interface name of QAudioEndpointSelector is \c org.qt-project.qt.audioendpointselector/5.0 as
|
||||
defined in QAudioEndpointSelector_iid.
|
||||
The interface name of QAudioEndpointSelectorControl is \c org.qt-project.qt.audioendpointselectorcontrol/5.0 as
|
||||
defined in QAudioEndpointSelectorControl_iid.
|
||||
|
||||
\sa QMediaService::requestControl()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro QAudioEndpointSelector_iid
|
||||
\macro QAudioEndpointSelectorControl_iid
|
||||
|
||||
\c org.qt-project.qt.audioendpointselector/5.0
|
||||
\c org.qt-project.qt.audioendpointselectorcontrol/5.0
|
||||
|
||||
Defines the interface name of the QAudioEndpointSelector class.
|
||||
Defines the interface name of the QAudioEndpointSelectorControl class.
|
||||
|
||||
\relates QAudioEndpointSelector
|
||||
\relates QAudioEndpointSelectorControl
|
||||
*/
|
||||
|
||||
/*!
|
||||
Constructs a new audio endpoint selector with the given \a parent.
|
||||
Constructs a new audio endpoint selector control with the given \a parent.
|
||||
*/
|
||||
QAudioEndpointSelector::QAudioEndpointSelector(QObject *parent)
|
||||
QAudioEndpointSelectorControl::QAudioEndpointSelectorControl(QObject *parent)
|
||||
:QMediaControl(parent)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destroys an audio endpoint selector.
|
||||
Destroys an audio endpoint selector control.
|
||||
*/
|
||||
QAudioEndpointSelector::~QAudioEndpointSelector()
|
||||
QAudioEndpointSelectorControl::~QAudioEndpointSelectorControl()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QList<QString> QAudioEndpointSelector::availableEndpoints() const
|
||||
\fn QList<QString> QAudioEndpointSelectorControl::availableEndpoints() const
|
||||
|
||||
Returns a list of the names of the available audio endpoints.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QString QAudioEndpointSelector::endpointDescription(const QString& name) const
|
||||
\fn QString QAudioEndpointSelectorControl::endpointDescription(const QString& name) const
|
||||
|
||||
Returns the description of the endpoint \a name.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QString QAudioEndpointSelector::defaultEndpoint() const
|
||||
\fn QString QAudioEndpointSelectorControl::defaultEndpoint() const
|
||||
|
||||
Returns the name of the default audio endpoint.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QString QAudioEndpointSelector::activeEndpoint() const
|
||||
\fn QString QAudioEndpointSelectorControl::activeEndpoint() const
|
||||
|
||||
Returns the name of the currently selected audio endpoint.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAudioEndpointSelector::setActiveEndpoint(const QString& name)
|
||||
\fn QAudioEndpointSelectorControl::setActiveEndpoint(const QString& name)
|
||||
|
||||
Set the active audio endpoint to \a name.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAudioEndpointSelector::activeEndpointChanged(const QString& name)
|
||||
\fn QAudioEndpointSelectorControl::activeEndpointChanged(const QString& name)
|
||||
|
||||
Signals that the audio endpoint has changed to \a name.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAudioEndpointSelector::availableEndpointsChanged()
|
||||
\fn QAudioEndpointSelectorControl::availableEndpointsChanged()
|
||||
|
||||
Signals that list of available endpoints has changed.
|
||||
*/
|
||||
|
||||
#include "moc_qaudioendpointselector.cpp"
|
||||
#include "moc_qaudioendpointselectorcontrol.cpp"
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QAUDIOENDPOINTSELECTOR_H
|
||||
#define QAUDIOENDPOINTSELECTOR_H
|
||||
#ifndef QAUDIOENDPOINTSELECTORCONTROL_H
|
||||
#define QAUDIOENDPOINTSELECTORCONTROL_H
|
||||
|
||||
#include <qaudio.h>
|
||||
#include <qmediacontrol.h>
|
||||
@@ -54,12 +54,12 @@ QT_MODULE(Multimedia)
|
||||
|
||||
// Class forward declaration required for QDoc bug
|
||||
class QString;
|
||||
class Q_MULTIMEDIA_EXPORT QAudioEndpointSelector : public QMediaControl
|
||||
class Q_MULTIMEDIA_EXPORT QAudioEndpointSelectorControl : public QMediaControl
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual ~QAudioEndpointSelector();
|
||||
virtual ~QAudioEndpointSelectorControl();
|
||||
|
||||
virtual QList<QString> availableEndpoints() const = 0;
|
||||
virtual QString endpointDescription(const QString& name) const = 0;
|
||||
@@ -74,15 +74,15 @@ Q_SIGNALS:
|
||||
void availableEndpointsChanged();
|
||||
|
||||
protected:
|
||||
QAudioEndpointSelector(QObject *parent = 0);
|
||||
QAudioEndpointSelectorControl(QObject *parent = 0);
|
||||
};
|
||||
|
||||
#define QAudioEndpointSelector_iid "org.qt-project.qt.audioendpointselector/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QAudioEndpointSelector, QAudioEndpointSelector_iid)
|
||||
#define QAudioEndpointSelectorControl_iid "org.qt-project.qt.audioendpointselectorcontrol/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QAudioEndpointSelectorControl, QAudioEndpointSelectorControl_iid)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
|
||||
#endif // QAUDIOENDPOINTSELECTOR_H
|
||||
#endif // QAUDIOENDPOINTSELECTORCONTROL_H
|
||||
@@ -39,106 +39,106 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qvideodevicecontrol.h"
|
||||
#include "qvideodeviceselectorcontrol.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QVideoDeviceControl
|
||||
\class QVideoDeviceSelectorControl
|
||||
|
||||
\brief The QVideoDeviceControl class provides an video device selector media control.
|
||||
\brief The QVideoDeviceSelectorControl class provides an video device selector media control.
|
||||
\inmodule QtMultimedia
|
||||
|
||||
|
||||
\ingroup multimedia_control
|
||||
|
||||
The QVideoDeviceControl class provides descriptions of the video devices
|
||||
The QVideoDeviceSelectorControl class provides descriptions of the video devices
|
||||
available on a system and allows one to be selected as the endpoint of a
|
||||
media service.
|
||||
|
||||
The interface name of QVideoDeviceControl is \c org.qt-project.qt.videodevicecontrol/5.0 as
|
||||
defined in QVideoDeviceControl_iid.
|
||||
The interface name of QVideoDeviceSelectorControl is \c org.qt-project.qt.videodeviceselectorcontrol/5.0 as
|
||||
defined in QVideoDeviceSelectorControl_iid.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro QVideoDeviceControl_iid
|
||||
\macro QVideoDeviceSelectorControl_iid
|
||||
|
||||
\c org.qt-project.qt.videodevicecontrol/5.0
|
||||
\c org.qt-project.qt.videodeviceselectorcontrol/5.0
|
||||
|
||||
Defines the interface name of the QVideoDeviceControl class.
|
||||
Defines the interface name of the QVideoDeviceSelectorControl class.
|
||||
|
||||
\relates QVideoDeviceControl
|
||||
\relates QVideoDeviceSelectorControl
|
||||
*/
|
||||
|
||||
/*!
|
||||
Constructs a video device control with the given \a parent.
|
||||
Constructs a video device selector control with the given \a parent.
|
||||
*/
|
||||
QVideoDeviceControl::QVideoDeviceControl(QObject *parent)
|
||||
QVideoDeviceSelectorControl::QVideoDeviceSelectorControl(QObject *parent)
|
||||
:QMediaControl(parent)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destroys a video device control.
|
||||
Destroys a video device selector control.
|
||||
*/
|
||||
QVideoDeviceControl::~QVideoDeviceControl()
|
||||
QVideoDeviceSelectorControl::~QVideoDeviceSelectorControl()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::deviceCount() const
|
||||
\fn QVideoDeviceSelectorControl::deviceCount() const
|
||||
|
||||
Returns the number of available video devices;
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::deviceName(int index) const
|
||||
\fn QVideoDeviceSelectorControl::deviceName(int index) const
|
||||
|
||||
Returns the name of the video device at \a index.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::deviceDescription(int index) const
|
||||
\fn QVideoDeviceSelectorControl::deviceDescription(int index) const
|
||||
|
||||
Returns a description of the video device at \a index.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::defaultDevice() const
|
||||
\fn QVideoDeviceSelectorControl::defaultDevice() const
|
||||
|
||||
Returns the index of the default video device.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::selectedDevice() const
|
||||
\fn QVideoDeviceSelectorControl::selectedDevice() const
|
||||
|
||||
Returns the index of the selected video device.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::setSelectedDevice(int index)
|
||||
\fn QVideoDeviceSelectorControl::setSelectedDevice(int index)
|
||||
|
||||
Sets the selected video device \a index.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::devicesChanged()
|
||||
\fn QVideoDeviceSelectorControl::devicesChanged()
|
||||
|
||||
Signals that the list of available video devices has changed.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::selectedDeviceChanged(int index)
|
||||
\fn QVideoDeviceSelectorControl::selectedDeviceChanged(int index)
|
||||
|
||||
Signals that the selected video device \a index has changed.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoDeviceControl::selectedDeviceChanged(const QString &name)
|
||||
\fn QVideoDeviceSelectorControl::selectedDeviceChanged(const QString &name)
|
||||
|
||||
Signals that the selected video device \a name has changed.
|
||||
*/
|
||||
|
||||
#include "moc_qvideodevicecontrol.cpp"
|
||||
#include "moc_qvideodeviceselectorcontrol.cpp"
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QVIDEODEVICECONTROL_H
|
||||
#define QVIDEODEVICECONTROL_H
|
||||
#ifndef QVIDEODEVICESELECTORCONTROL_H
|
||||
#define QVIDEODEVICESELECTORCONTROL_H
|
||||
|
||||
#include "qmediacontrol.h"
|
||||
|
||||
@@ -53,12 +53,12 @@ QT_MODULE(Multimedia)
|
||||
// Required for QDoc workaround
|
||||
class QString;
|
||||
|
||||
class Q_MULTIMEDIA_EXPORT QVideoDeviceControl : public QMediaControl
|
||||
class Q_MULTIMEDIA_EXPORT QVideoDeviceSelectorControl : public QMediaControl
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual ~QVideoDeviceControl();
|
||||
virtual ~QVideoDeviceSelectorControl();
|
||||
|
||||
virtual int deviceCount() const = 0;
|
||||
|
||||
@@ -77,14 +77,14 @@ Q_SIGNALS:
|
||||
void devicesChanged();
|
||||
|
||||
protected:
|
||||
QVideoDeviceControl(QObject *parent = 0);
|
||||
QVideoDeviceSelectorControl(QObject *parent = 0);
|
||||
};
|
||||
|
||||
#define QVideoDeviceControl_iid "org.qt-project.qt.videodevicecontrol/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QVideoDeviceControl, QVideoDeviceControl_iid)
|
||||
#define QVideoDeviceSelectorControl_iid "org.qt-project.qt.videodeviceselectorcontrol/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QVideoDeviceSelectorControl, QVideoDeviceSelectorControl_iid)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QVIDEODEVICECONTROL_H
|
||||
#endif // QVIDEODEVICESELECTORCONTROL_H
|
||||
@@ -39,76 +39,76 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qvideoencodercontrol.h"
|
||||
#include "qvideoencodersettingscontrol.h"
|
||||
#include <QtCore/qstringlist.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QVideoEncoderControl
|
||||
\class QVideoEncoderSettingsControl
|
||||
|
||||
\inmodule QtMultimedia
|
||||
|
||||
|
||||
\ingroup multimedia_control
|
||||
|
||||
\brief The QVideoEncoderControl class provides access to the settings
|
||||
\brief The QVideoEncoderSettingsControl class provides access to the settings
|
||||
of a media service that performs video encoding.
|
||||
|
||||
If a QMediaService supports encoding video data it will implement
|
||||
QVideoEncoderControl. This control provides information about the limits
|
||||
QVideoEncoderSettingsControl. This control provides information about the limits
|
||||
of restricted video encoder options and allows the selection of a set of
|
||||
video encoder settings as specified in a QVideoEncoderSettings object.
|
||||
|
||||
The functionality provided by this control is exposed to application code
|
||||
through the QMediaRecorder class.
|
||||
|
||||
The interface name of QVideoEncoderControl is \c org.qt-project.qt.videoencodercontrol/5.0 as
|
||||
defined in QVideoEncoderControl_iid.
|
||||
The interface name of QVideoEncoderSettingsControl is \c org.qt-project.qt.videoencodersettingscontrol/5.0 as
|
||||
defined in QVideoEncoderSettingsControl_iid.
|
||||
|
||||
\sa QMediaRecorder, QVideoEncoderSettings, QMediaService::requestControl()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro QVideoEncoderControl_iid
|
||||
\macro QVideoEncoderSettingsControl_iid
|
||||
|
||||
\c org.qt-project.qt.videoencodercontrol/5.0
|
||||
\c org.qt-project.qt.videoencodersettingscontrol/5.0
|
||||
|
||||
Defines the interface name of the QVideoEncoderControl class.
|
||||
Defines the interface name of the QVideoEncoderSettingsControl class.
|
||||
|
||||
\relates QVideoEncoderControl
|
||||
\relates QVideoEncoderSettingsControl
|
||||
*/
|
||||
|
||||
/*!
|
||||
Create a new video encoder control object with the given \a parent.
|
||||
Create a new video encoder settings control object with the given \a parent.
|
||||
*/
|
||||
QVideoEncoderControl::QVideoEncoderControl(QObject *parent)
|
||||
QVideoEncoderSettingsControl::QVideoEncoderSettingsControl(QObject *parent)
|
||||
:QMediaControl(parent)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destroys a video encoder control.
|
||||
Destroys a video encoder settings control.
|
||||
*/
|
||||
QVideoEncoderControl::~QVideoEncoderControl()
|
||||
QVideoEncoderSettingsControl::~QVideoEncoderSettingsControl()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QVideoEncoderControl::supportedVideoCodecs() const
|
||||
\fn QVideoEncoderSettingsControl::supportedVideoCodecs() const
|
||||
|
||||
Returns the list of supported video codecs.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoEncoderControl::videoCodecDescription(const QString &codec) const
|
||||
\fn QVideoEncoderSettingsControl::videoCodecDescription(const QString &codec) const
|
||||
|
||||
Returns a description of a video \a codec.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoEncoderControl::supportedResolutions(const QVideoEncoderSettings &settings = QVideoEncoderSettings(),
|
||||
\fn QVideoEncoderSettingsControl::supportedResolutions(const QVideoEncoderSettings &settings = QVideoEncoderSettings(),
|
||||
bool *continuous = 0) const
|
||||
|
||||
Returns a list of supported resolutions.
|
||||
@@ -125,7 +125,7 @@ QVideoEncoderControl::~QVideoEncoderControl()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoEncoderControl::supportedFrameRates(const QVideoEncoderSettings &settings = QVideoEncoderSettings(),
|
||||
\fn QVideoEncoderSettingsControl::supportedFrameRates(const QVideoEncoderSettings &settings = QVideoEncoderSettings(),
|
||||
bool *continuous = 0) const
|
||||
|
||||
Returns a list of supported frame rates.
|
||||
@@ -142,21 +142,21 @@ QVideoEncoderControl::~QVideoEncoderControl()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoEncoderControl::videoSettings() const
|
||||
\fn QVideoEncoderSettingsControl::videoSettings() const
|
||||
|
||||
Returns the video encoder settings.
|
||||
|
||||
The returned value may be different tha passed to QVideoEncoderControl::setVideoSettings()
|
||||
The returned value may be different tha passed to QVideoEncoderSettingsControl::setVideoSettings()
|
||||
if the settings contains the default or undefined parameters.
|
||||
In this case if the undefined parameters are already resolved, they should be returned.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVideoEncoderControl::setVideoSettings(const QVideoEncoderSettings &settings)
|
||||
\fn QVideoEncoderSettingsControl::setVideoSettings(const QVideoEncoderSettings &settings)
|
||||
|
||||
Sets the selected video encoder \a settings.
|
||||
*/
|
||||
|
||||
#include "moc_qvideoencodercontrol.cpp"
|
||||
#include "moc_qvideoencodersettingscontrol.cpp"
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QVIDEOENCODERCONTROL_H
|
||||
#define QVIDEOENCODERCONTROL_H
|
||||
#ifndef QVIDEOENCODERSETTINGSCONTROL_H
|
||||
#define QVIDEOENCODERSETTINGSCONTROL_H
|
||||
|
||||
#include "qmediacontrol.h"
|
||||
#include "qmediarecorder.h"
|
||||
@@ -63,12 +63,12 @@ QT_BEGIN_NAMESPACE
|
||||
// Required for QDoc workaround
|
||||
class QString;
|
||||
|
||||
class Q_MULTIMEDIA_EXPORT QVideoEncoderControl : public QMediaControl
|
||||
class Q_MULTIMEDIA_EXPORT QVideoEncoderSettingsControl : public QMediaControl
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual ~QVideoEncoderControl();
|
||||
virtual ~QVideoEncoderSettingsControl();
|
||||
|
||||
virtual QList<QSize> supportedResolutions(const QVideoEncoderSettings &settings,
|
||||
bool *continuous = 0) const = 0;
|
||||
@@ -83,11 +83,11 @@ public:
|
||||
virtual void setVideoSettings(const QVideoEncoderSettings &settings) = 0;
|
||||
|
||||
protected:
|
||||
QVideoEncoderControl(QObject *parent = 0);
|
||||
QVideoEncoderSettingsControl(QObject *parent = 0);
|
||||
};
|
||||
|
||||
#define QVideoEncoderControl_iid "org.qt-project.qt.videoencodercontrol/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QVideoEncoderControl, QVideoEncoderControl_iid)
|
||||
#define QVideoEncoderSettingsControl_iid "org.qt-project.qt.videoencodersettingscontrol/5.0"
|
||||
Q_MEDIA_DECLARE_CONTROL(QVideoEncoderSettingsControl, QVideoEncoderSettingsControl_iid)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
#ifndef QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
|
||||
#define QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
|
||||
|
||||
#include <qaudioendpointselector.h>
|
||||
#include <qaudioendpointselectorcontrol.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGstreamerAudioInputEndpointSelector : public QAudioEndpointSelector
|
||||
class QGstreamerAudioInputEndpointSelector : public QAudioEndpointSelectorControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
#ifndef QGSTREAMERVIDEOINPUTDEVICECONTROL_H
|
||||
#define QGSTREAMERVIDEOINPUTDEVICECONTROL_H
|
||||
|
||||
#include <qvideodevicecontrol.h>
|
||||
#include <qvideodeviceselectorcontrol.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGstreamerVideoInputDeviceControl : public QVideoDeviceControl
|
||||
class QGstreamerVideoInputDeviceControl : public QVideoDeviceSelectorControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
Required Controls: QAudioDeviceControl
|
||||
Recording Controls (QMediaRecorder):
|
||||
Required: QMediaRecorderControl
|
||||
Recommended: QAudioEncoderControl
|
||||
Recommended: QAudioEncoderSettingsControl
|
||||
Optional: QMediaContainerControl
|
||||
*/
|
||||
#define Q_MEDIASERVICE_AUDIOSOURCE "org.qt-project.qt.audiosource"
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
Still Capture Controls: QCameraImageCaptureControl
|
||||
Video Capture Controls (QMediaRecorder):
|
||||
Required: QMediaRecorderControl
|
||||
Recommended: QAudioEncoderControl, QVideoEncoderControl, QMediaContainerControl
|
||||
Recommended: QAudioEncoderSettingsControl, QVideoEncoderSettingsControl, QMediaContainerControl
|
||||
Viewfinder Video Output Controls (used by QCameraViewfinder and QGraphicsVideoItem):
|
||||
Required: QVideoOutputControl
|
||||
Optional: QVideoWindowControl, QVideoRendererControl, QVideoWidgetControl
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
Required Controls: QRadioTunerControl
|
||||
Recording Controls (Optional, used by QMediaRecorder):
|
||||
Required: QMediaRecorderControl
|
||||
Recommended: QAudioEncoderControl
|
||||
Recommended: QAudioEncoderSettingsControl
|
||||
Optional: QMediaContainerControl
|
||||
*/
|
||||
#define Q_MEDIASERVICE_RADIO "org.qt-project.qt.radio"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qaudiorecorder.h"
|
||||
#include "qaudioendpointselector.h"
|
||||
#include "qaudioendpointselectorcontrol.h"
|
||||
#include "qmediaobject_p.h"
|
||||
#include "qmediarecorder_p.h"
|
||||
#include <qmediaservice.h>
|
||||
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
|
||||
The \l {audiorecorder}{Audio Recorder} example shows how to use this class
|
||||
in more detail.
|
||||
|
||||
\sa QMediaRecorder, QAudioEndpointSelector
|
||||
\sa QMediaRecorder, QAudioEndpointSelectorControl
|
||||
*/
|
||||
|
||||
class QAudioRecorderObject : public QMediaObject
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
QMediaService *service = mediaObject ? mediaObject->service() : 0;
|
||||
|
||||
if (service != 0)
|
||||
audioEndpointSelector = qobject_cast<QAudioEndpointSelector*>(service->requestControl(QAudioEndpointSelector_iid));
|
||||
audioEndpointSelector = qobject_cast<QAudioEndpointSelectorControl*>(service->requestControl(QAudioEndpointSelectorControl_iid));
|
||||
|
||||
if (audioEndpointSelector) {
|
||||
q->connect(audioEndpointSelector, SIGNAL(activeEndpointChanged(QString)),
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
audioEndpointSelector(0) {}
|
||||
|
||||
QMediaServiceProvider *provider;
|
||||
QAudioEndpointSelector *audioEndpointSelector;
|
||||
QAudioEndpointSelectorControl *audioEndpointSelector;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
|
||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio encoder settings
|
||||
|
||||
\sa QMediaRecorder, QAudioEncoderControl
|
||||
\sa QMediaRecorder, QAudioEncoderSettingsControl
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -427,7 +427,7 @@ private:
|
||||
|
||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Video encoder settings
|
||||
|
||||
\sa QMediaRecorder, QVideoEncoderControl
|
||||
\sa QMediaRecorder, QVideoEncoderSettingsControl
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
#include <qmediaservice.h>
|
||||
#include <qmediaserviceprovider_p.h>
|
||||
#include <qmetadatawritercontrol.h>
|
||||
#include <qaudioencodercontrol.h>
|
||||
#include <qvideoencodercontrol.h>
|
||||
#include <qaudioencodersettingscontrol.h>
|
||||
#include <qvideoencodersettingscontrol.h>
|
||||
#include <qmediacontainercontrol.h>
|
||||
#include <qmediaavailabilitycontrol.h>
|
||||
#include <qcamera.h>
|
||||
@@ -350,8 +350,8 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
|
||||
|
||||
if (d->control) {
|
||||
d->formatControl = qobject_cast<QMediaContainerControl *>(service->requestControl(QMediaContainerControl_iid));
|
||||
d->audioControl = qobject_cast<QAudioEncoderControl *>(service->requestControl(QAudioEncoderControl_iid));
|
||||
d->videoControl = qobject_cast<QVideoEncoderControl *>(service->requestControl(QVideoEncoderControl_iid));
|
||||
d->audioControl = qobject_cast<QAudioEncoderSettingsControl *>(service->requestControl(QAudioEncoderSettingsControl_iid));
|
||||
d->videoControl = qobject_cast<QVideoEncoderSettingsControl *>(service->requestControl(QVideoEncoderSettingsControl_iid));
|
||||
|
||||
QMediaControl *control = service->requestControl(QMetaDataWriterControl_iid);
|
||||
if (control) {
|
||||
|
||||
@@ -50,8 +50,8 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QMediaRecorderControl;
|
||||
class QMediaContainerControl;
|
||||
class QAudioEncoderControl;
|
||||
class QVideoEncoderControl;
|
||||
class QAudioEncoderSettingsControl;
|
||||
class QVideoEncoderSettingsControl;
|
||||
class QMetaDataWriterControl;
|
||||
class QMediaAvailabilityControl;
|
||||
class QTimer;
|
||||
@@ -71,8 +71,8 @@ public:
|
||||
|
||||
QMediaRecorderControl *control;
|
||||
QMediaContainerControl *formatControl;
|
||||
QAudioEncoderControl *audioControl;
|
||||
QVideoEncoderControl *videoControl;
|
||||
QAudioEncoderSettingsControl *audioControl;
|
||||
QVideoEncoderSettingsControl *videoControl;
|
||||
QMetaDataWriterControl *metaDataControl;
|
||||
QMediaAvailabilityControl *availabilityControl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user