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 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
QGstreamerAudioInputEndpointSelector::QGstreamerAudioInputEndpointSelector(QObject *parent)
|
QGstreamerAudioInputEndpointSelector::QGstreamerAudioInputEndpointSelector(QObject *parent)
|
||||||
:QAudioEndpointSelector(parent)
|
:QAudioEndpointSelectorControl(parent)
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
#include <linux/videodev2.h>
|
#include <linux/videodev2.h>
|
||||||
|
|
||||||
QGstreamerVideoInputDeviceControl::QGstreamerVideoInputDeviceControl(QObject *parent)
|
QGstreamerVideoInputDeviceControl::QGstreamerVideoInputDeviceControl(QObject *parent)
|
||||||
:QVideoDeviceControl(parent), m_selectedDevice(0)
|
:QVideoDeviceSelectorControl(parent), m_selectedDevice(0)
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
#include <qmediarecordercontrol.h>
|
#include <qmediarecordercontrol.h>
|
||||||
#include <qcameraimageprocessingcontrol.h>
|
#include <qcameraimageprocessingcontrol.h>
|
||||||
#include <qcameraimagecapturecontrol.h>
|
#include <qcameraimagecapturecontrol.h>
|
||||||
#include <qvideodevicecontrol.h>
|
#include <qvideodeviceselectorcontrol.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ public:
|
|||||||
QMediaServiceProvider *provider;
|
QMediaServiceProvider *provider;
|
||||||
|
|
||||||
QCameraControl *control;
|
QCameraControl *control;
|
||||||
QVideoDeviceControl *deviceControl;
|
QVideoDeviceSelectorControl *deviceControl;
|
||||||
QCameraLocksControl *locksControl;
|
QCameraLocksControl *locksControl;
|
||||||
|
|
||||||
QCameraExposure *cameraExposure;
|
QCameraExposure *cameraExposure;
|
||||||
@@ -245,7 +245,7 @@ void QCameraPrivate::initControls()
|
|||||||
if (service) {
|
if (service) {
|
||||||
control = qobject_cast<QCameraControl *>(service->requestControl(QCameraControl_iid));
|
control = qobject_cast<QCameraControl *>(service->requestControl(QCameraControl_iid));
|
||||||
locksControl = qobject_cast<QCameraLocksControl *>(service->requestControl(QCameraLocksControl_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) {
|
if (control) {
|
||||||
q->connect(control, SIGNAL(stateChanged(QCamera::State)), q, SLOT(_q_updateState(QCamera::State)));
|
q->connect(control, SIGNAL(stateChanged(QCamera::State)), q, SLOT(_q_updateState(QCamera::State)));
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include <qcamerazoomcontrol.h>
|
#include <qcamerazoomcontrol.h>
|
||||||
#include <qmediarecordercontrol.h>
|
#include <qmediarecordercontrol.h>
|
||||||
#include <qcameraimagecapturecontrol.h>
|
#include <qcameraimagecapturecontrol.h>
|
||||||
#include <qvideodevicecontrol.h>
|
#include <qvideodeviceselectorcontrol.h>
|
||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <qmediarecordercontrol.h>
|
#include <qmediarecordercontrol.h>
|
||||||
#include <qcameraimageprocessingcontrol.h>
|
#include <qcameraimageprocessingcontrol.h>
|
||||||
#include <qcameraimagecapturecontrol.h>
|
#include <qcameraimagecapturecontrol.h>
|
||||||
#include <qvideodevicecontrol.h>
|
#include <qvideodeviceselectorcontrol.h>
|
||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ INCLUDEPATH += controls
|
|||||||
|
|
||||||
PUBLIC_HEADERS += \
|
PUBLIC_HEADERS += \
|
||||||
controls/qaudiodecodercontrol.h \
|
controls/qaudiodecodercontrol.h \
|
||||||
controls/qaudioencodercontrol.h \
|
controls/qaudioencodersettingscontrol.h \
|
||||||
controls/qaudioendpointselector.h \
|
controls/qaudioendpointselectorcontrol.h \
|
||||||
controls/qcameracapturebufferformatcontrol.h \
|
controls/qcameracapturebufferformatcontrol.h \
|
||||||
controls/qcameracapturedestinationcontrol.h \
|
controls/qcameracapturedestinationcontrol.h \
|
||||||
controls/qcameracontrol.h \
|
controls/qcameracontrol.h \
|
||||||
@@ -28,8 +28,8 @@ PUBLIC_HEADERS += \
|
|||||||
controls/qmetadatawritercontrol.h \
|
controls/qmetadatawritercontrol.h \
|
||||||
controls/qradiodatacontrol.h \
|
controls/qradiodatacontrol.h \
|
||||||
controls/qradiotunercontrol.h \
|
controls/qradiotunercontrol.h \
|
||||||
controls/qvideodevicecontrol.h \
|
controls/qvideodeviceselectorcontrol.h \
|
||||||
controls/qvideoencodercontrol.h \
|
controls/qvideoencodersettingscontrol.h \
|
||||||
controls/qvideorenderercontrol.h \
|
controls/qvideorenderercontrol.h \
|
||||||
controls/qvideowindowcontrol.h \
|
controls/qvideowindowcontrol.h \
|
||||||
controls/qmediaaudioprobecontrol.h \
|
controls/qmediaaudioprobecontrol.h \
|
||||||
@@ -41,8 +41,6 @@ PRIVATE_HEADERS += \
|
|||||||
controls/qmediaplaylistsourcecontrol_p.h
|
controls/qmediaplaylistsourcecontrol_p.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
controls/qaudioencodercontrol.cpp \
|
|
||||||
controls/qaudioendpointselector.cpp \
|
|
||||||
controls/qcameracapturebufferformatcontrol.cpp \
|
controls/qcameracapturebufferformatcontrol.cpp \
|
||||||
controls/qcameracapturedestinationcontrol.cpp \
|
controls/qcameracapturedestinationcontrol.cpp \
|
||||||
controls/qcameracontrol.cpp \
|
controls/qcameracontrol.cpp \
|
||||||
@@ -68,13 +66,15 @@ SOURCES += \
|
|||||||
controls/qmetadatawritercontrol.cpp \
|
controls/qmetadatawritercontrol.cpp \
|
||||||
controls/qradiodatacontrol.cpp \
|
controls/qradiodatacontrol.cpp \
|
||||||
controls/qradiotunercontrol.cpp \
|
controls/qradiotunercontrol.cpp \
|
||||||
controls/qvideodevicecontrol.cpp \
|
|
||||||
controls/qvideoencodercontrol.cpp \
|
|
||||||
controls/qvideorenderercontrol.cpp \
|
controls/qvideorenderercontrol.cpp \
|
||||||
controls/qvideowindowcontrol.cpp \
|
controls/qvideowindowcontrol.cpp \
|
||||||
controls/qmediaaudioprobecontrol.cpp \
|
controls/qmediaaudioprobecontrol.cpp \
|
||||||
controls/qmediavideoprobecontrol.cpp \
|
controls/qmediavideoprobecontrol.cpp \
|
||||||
controls/qmediaavailabilitycontrol.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>
|
#include <QtCore/qstringlist.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QAudioEncoderControl
|
\class QAudioEncoderSettingsControl
|
||||||
\inmodule QtMultimedia
|
\inmodule QtMultimedia
|
||||||
|
|
||||||
\ingroup multimedia_control
|
\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.
|
media service that performs audio encoding.
|
||||||
|
|
||||||
If a QMediaService supports encoding audio data it will implement
|
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
|
of restricted audio encoder options and allows the selection of a set of
|
||||||
audio encoder settings as specified in a QAudioEncoderSettings object.
|
audio encoder settings as specified in a QAudioEncoderSettings object.
|
||||||
|
|
||||||
The functionality provided by this control is exposed to application code through the
|
The functionality provided by this control is exposed to application code through the
|
||||||
QMediaRecorder class.
|
QMediaRecorder class.
|
||||||
|
|
||||||
The interface name of QAudioEncoderControl is \c org.qt-project.qt.audioencodercontrol/5.0 as
|
The interface name of QAudioEncoderSettingsControl is \c org.qt-project.qt.audioencodersettingscontrol/5.0 as
|
||||||
defined in QAudioEncoderControl_iid.
|
defined in QAudioEncoderSettingsControl_iid.
|
||||||
|
|
||||||
\sa QMediaService::requestControl(), QMediaRecorder
|
\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)
|
: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.
|
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.
|
Returns description of audio \a codec.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QAudioEncoderControl::supportedSampleRates(const QAudioEncoderSettings &settings = QAudioEncoderSettings(),
|
\fn QAudioEncoderSettingsControl::supportedSampleRates(const QAudioEncoderSettings &settings = QAudioEncoderSettings(),
|
||||||
bool *continuous) const
|
bool *continuous) const
|
||||||
|
|
||||||
Returns the list of supported audio sample rates, if known.
|
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.
|
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.
|
if the settings contains the default or undefined parameters.
|
||||||
In this case if the undefined parameters are already resolved, they should be returned.
|
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.
|
Sets the selected audio \a settings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "moc_qaudioencodercontrol.cpp"
|
#include "moc_qaudioencodersettingscontrol.cpp"
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef QAUDIOENCODERCONTROL_H
|
#ifndef QAUDIOENCODERSETTINGSCONTROL_H
|
||||||
#define QAUDIOENCODERCONTROL_H
|
#define QAUDIOENCODERSETTINGSCONTROL_H
|
||||||
|
|
||||||
#include "qmediacontrol.h"
|
#include "qmediacontrol.h"
|
||||||
#include "qmediarecorder.h"
|
#include "qmediarecorder.h"
|
||||||
@@ -62,12 +62,12 @@ QT_BEGIN_NAMESPACE
|
|||||||
// Required for QDoc workaround
|
// Required for QDoc workaround
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
class Q_MULTIMEDIA_EXPORT QAudioEncoderControl : public QMediaControl
|
class Q_MULTIMEDIA_EXPORT QAudioEncoderSettingsControl : public QMediaControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~QAudioEncoderControl();
|
virtual ~QAudioEncoderSettingsControl();
|
||||||
|
|
||||||
virtual QStringList supportedAudioCodecs() const = 0;
|
virtual QStringList supportedAudioCodecs() const = 0;
|
||||||
virtual QString codecDescription(const QString &codecName) const = 0;
|
virtual QString codecDescription(const QString &codecName) const = 0;
|
||||||
@@ -79,15 +79,15 @@ public:
|
|||||||
virtual void setAudioSettings(const QAudioEncoderSettings&) = 0;
|
virtual void setAudioSettings(const QAudioEncoderSettings&) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QAudioEncoderControl(QObject *parent = 0);
|
QAudioEncoderSettingsControl(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QAudioEncoderControl_iid "org.qt-project.qt.audioencodercontrol/5.0"
|
#define QAudioEncoderSettingsControl_iid "org.qt-project.qt.audioencodersettingscontrol/5.0"
|
||||||
Q_MEDIA_DECLARE_CONTROL(QAudioEncoderControl, QAudioEncoderControl_iid)
|
Q_MEDIA_DECLARE_CONTROL(QAudioEncoderSettingsControl, QAudioEncoderSettingsControl_iid)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
QT_END_HEADER
|
QT_END_HEADER
|
||||||
|
|
||||||
|
|
||||||
#endif // QAUDIOCAPTUREPROPERTIESCONTROL_H
|
#endif // QAUDIOENCODERSETTINGSCONTROL_H
|
||||||
@@ -39,94 +39,94 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qaudioendpointselector.h"
|
#include "qaudioendpointselectorcontrol.h"
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
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
|
\inmodule QtMultimedia
|
||||||
\ingroup multimedia_control
|
\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
|
endpoints available on a system and allows one to be selected as the audio
|
||||||
of a media service.
|
of a media service.
|
||||||
|
|
||||||
The interface name of QAudioEndpointSelector is \c org.qt-project.qt.audioendpointselector/5.0 as
|
The interface name of QAudioEndpointSelectorControl is \c org.qt-project.qt.audioendpointselectorcontrol/5.0 as
|
||||||
defined in QAudioEndpointSelector_iid.
|
defined in QAudioEndpointSelectorControl_iid.
|
||||||
|
|
||||||
\sa QMediaService::requestControl()
|
\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)
|
: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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
Signals that the audio endpoint has changed to \a name.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QAudioEndpointSelector::availableEndpointsChanged()
|
\fn QAudioEndpointSelectorControl::availableEndpointsChanged()
|
||||||
|
|
||||||
Signals that list of available endpoints has changed.
|
Signals that list of available endpoints has changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "moc_qaudioendpointselector.cpp"
|
#include "moc_qaudioendpointselectorcontrol.cpp"
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef QAUDIOENDPOINTSELECTOR_H
|
#ifndef QAUDIOENDPOINTSELECTORCONTROL_H
|
||||||
#define QAUDIOENDPOINTSELECTOR_H
|
#define QAUDIOENDPOINTSELECTORCONTROL_H
|
||||||
|
|
||||||
#include <qaudio.h>
|
#include <qaudio.h>
|
||||||
#include <qmediacontrol.h>
|
#include <qmediacontrol.h>
|
||||||
@@ -54,12 +54,12 @@ QT_MODULE(Multimedia)
|
|||||||
|
|
||||||
// Class forward declaration required for QDoc bug
|
// Class forward declaration required for QDoc bug
|
||||||
class QString;
|
class QString;
|
||||||
class Q_MULTIMEDIA_EXPORT QAudioEndpointSelector : public QMediaControl
|
class Q_MULTIMEDIA_EXPORT QAudioEndpointSelectorControl : public QMediaControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~QAudioEndpointSelector();
|
virtual ~QAudioEndpointSelectorControl();
|
||||||
|
|
||||||
virtual QList<QString> availableEndpoints() const = 0;
|
virtual QList<QString> availableEndpoints() const = 0;
|
||||||
virtual QString endpointDescription(const QString& name) const = 0;
|
virtual QString endpointDescription(const QString& name) const = 0;
|
||||||
@@ -74,15 +74,15 @@ Q_SIGNALS:
|
|||||||
void availableEndpointsChanged();
|
void availableEndpointsChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QAudioEndpointSelector(QObject *parent = 0);
|
QAudioEndpointSelectorControl(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QAudioEndpointSelector_iid "org.qt-project.qt.audioendpointselector/5.0"
|
#define QAudioEndpointSelectorControl_iid "org.qt-project.qt.audioendpointselectorcontrol/5.0"
|
||||||
Q_MEDIA_DECLARE_CONTROL(QAudioEndpointSelector, QAudioEndpointSelector_iid)
|
Q_MEDIA_DECLARE_CONTROL(QAudioEndpointSelectorControl, QAudioEndpointSelectorControl_iid)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
QT_END_HEADER
|
QT_END_HEADER
|
||||||
|
|
||||||
|
|
||||||
#endif // QAUDIOENDPOINTSELECTOR_H
|
#endif // QAUDIOENDPOINTSELECTORCONTROL_H
|
||||||
@@ -39,106 +39,106 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qvideodevicecontrol.h"
|
#include "qvideodeviceselectorcontrol.h"
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
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
|
\inmodule QtMultimedia
|
||||||
|
|
||||||
|
|
||||||
\ingroup multimedia_control
|
\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
|
available on a system and allows one to be selected as the endpoint of a
|
||||||
media service.
|
media service.
|
||||||
|
|
||||||
The interface name of QVideoDeviceControl is \c org.qt-project.qt.videodevicecontrol/5.0 as
|
The interface name of QVideoDeviceSelectorControl is \c org.qt-project.qt.videodeviceselectorcontrol/5.0 as
|
||||||
defined in QVideoDeviceControl_iid.
|
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)
|
: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;
|
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.
|
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.
|
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.
|
Returns the index of the default video device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QVideoDeviceControl::selectedDevice() const
|
\fn QVideoDeviceSelectorControl::selectedDevice() const
|
||||||
|
|
||||||
Returns the index of the selected video device.
|
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.
|
Sets the selected video device \a index.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QVideoDeviceControl::devicesChanged()
|
\fn QVideoDeviceSelectorControl::devicesChanged()
|
||||||
|
|
||||||
Signals that the list of available video devices has changed.
|
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.
|
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.
|
Signals that the selected video device \a name has changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "moc_qvideodevicecontrol.cpp"
|
#include "moc_qvideodeviceselectorcontrol.cpp"
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef QVIDEODEVICECONTROL_H
|
#ifndef QVIDEODEVICESELECTORCONTROL_H
|
||||||
#define QVIDEODEVICECONTROL_H
|
#define QVIDEODEVICESELECTORCONTROL_H
|
||||||
|
|
||||||
#include "qmediacontrol.h"
|
#include "qmediacontrol.h"
|
||||||
|
|
||||||
@@ -53,12 +53,12 @@ QT_MODULE(Multimedia)
|
|||||||
// Required for QDoc workaround
|
// Required for QDoc workaround
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
class Q_MULTIMEDIA_EXPORT QVideoDeviceControl : public QMediaControl
|
class Q_MULTIMEDIA_EXPORT QVideoDeviceSelectorControl : public QMediaControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~QVideoDeviceControl();
|
virtual ~QVideoDeviceSelectorControl();
|
||||||
|
|
||||||
virtual int deviceCount() const = 0;
|
virtual int deviceCount() const = 0;
|
||||||
|
|
||||||
@@ -77,14 +77,14 @@ Q_SIGNALS:
|
|||||||
void devicesChanged();
|
void devicesChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QVideoDeviceControl(QObject *parent = 0);
|
QVideoDeviceSelectorControl(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QVideoDeviceControl_iid "org.qt-project.qt.videodevicecontrol/5.0"
|
#define QVideoDeviceSelectorControl_iid "org.qt-project.qt.videodeviceselectorcontrol/5.0"
|
||||||
Q_MEDIA_DECLARE_CONTROL(QVideoDeviceControl, QVideoDeviceControl_iid)
|
Q_MEDIA_DECLARE_CONTROL(QVideoDeviceSelectorControl, QVideoDeviceSelectorControl_iid)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
QT_END_HEADER
|
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/qstringlist.h>
|
||||||
#include <QtCore/qvariant.h>
|
#include <QtCore/qvariant.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QVideoEncoderControl
|
\class QVideoEncoderSettingsControl
|
||||||
|
|
||||||
\inmodule QtMultimedia
|
\inmodule QtMultimedia
|
||||||
|
|
||||||
|
|
||||||
\ingroup multimedia_control
|
\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.
|
of a media service that performs video encoding.
|
||||||
|
|
||||||
If a QMediaService supports encoding video data it will implement
|
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
|
of restricted video encoder options and allows the selection of a set of
|
||||||
video encoder settings as specified in a QVideoEncoderSettings object.
|
video encoder settings as specified in a QVideoEncoderSettings object.
|
||||||
|
|
||||||
The functionality provided by this control is exposed to application code
|
The functionality provided by this control is exposed to application code
|
||||||
through the QMediaRecorder class.
|
through the QMediaRecorder class.
|
||||||
|
|
||||||
The interface name of QVideoEncoderControl is \c org.qt-project.qt.videoencodercontrol/5.0 as
|
The interface name of QVideoEncoderSettingsControl is \c org.qt-project.qt.videoencodersettingscontrol/5.0 as
|
||||||
defined in QVideoEncoderControl_iid.
|
defined in QVideoEncoderSettingsControl_iid.
|
||||||
|
|
||||||
\sa QMediaRecorder, QVideoEncoderSettings, QMediaService::requestControl()
|
\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)
|
: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.
|
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.
|
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
|
bool *continuous = 0) const
|
||||||
|
|
||||||
Returns a list of supported resolutions.
|
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
|
bool *continuous = 0) const
|
||||||
|
|
||||||
Returns a list of supported frame rates.
|
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.
|
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.
|
if the settings contains the default or undefined parameters.
|
||||||
In this case if the undefined parameters are already resolved, they should be returned.
|
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.
|
Sets the selected video encoder \a settings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "moc_qvideoencodercontrol.cpp"
|
#include "moc_qvideoencodersettingscontrol.cpp"
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef QVIDEOENCODERCONTROL_H
|
#ifndef QVIDEOENCODERSETTINGSCONTROL_H
|
||||||
#define QVIDEOENCODERCONTROL_H
|
#define QVIDEOENCODERSETTINGSCONTROL_H
|
||||||
|
|
||||||
#include "qmediacontrol.h"
|
#include "qmediacontrol.h"
|
||||||
#include "qmediarecorder.h"
|
#include "qmediarecorder.h"
|
||||||
@@ -63,12 +63,12 @@ QT_BEGIN_NAMESPACE
|
|||||||
// Required for QDoc workaround
|
// Required for QDoc workaround
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
class Q_MULTIMEDIA_EXPORT QVideoEncoderControl : public QMediaControl
|
class Q_MULTIMEDIA_EXPORT QVideoEncoderSettingsControl : public QMediaControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~QVideoEncoderControl();
|
virtual ~QVideoEncoderSettingsControl();
|
||||||
|
|
||||||
virtual QList<QSize> supportedResolutions(const QVideoEncoderSettings &settings,
|
virtual QList<QSize> supportedResolutions(const QVideoEncoderSettings &settings,
|
||||||
bool *continuous = 0) const = 0;
|
bool *continuous = 0) const = 0;
|
||||||
@@ -83,11 +83,11 @@ public:
|
|||||||
virtual void setVideoSettings(const QVideoEncoderSettings &settings) = 0;
|
virtual void setVideoSettings(const QVideoEncoderSettings &settings) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QVideoEncoderControl(QObject *parent = 0);
|
QVideoEncoderSettingsControl(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QVideoEncoderControl_iid "org.qt-project.qt.videoencodercontrol/5.0"
|
#define QVideoEncoderSettingsControl_iid "org.qt-project.qt.videoencodersettingscontrol/5.0"
|
||||||
Q_MEDIA_DECLARE_CONTROL(QVideoEncoderControl, QVideoEncoderControl_iid)
|
Q_MEDIA_DECLARE_CONTROL(QVideoEncoderSettingsControl, QVideoEncoderSettingsControl_iid)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -42,12 +42,12 @@
|
|||||||
#ifndef QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
|
#ifndef QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
|
||||||
#define QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
|
#define QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H
|
||||||
|
|
||||||
#include <qaudioendpointselector.h>
|
#include <qaudioendpointselectorcontrol.h>
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QGstreamerAudioInputEndpointSelector : public QAudioEndpointSelector
|
class QGstreamerAudioInputEndpointSelector : public QAudioEndpointSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -42,12 +42,12 @@
|
|||||||
#ifndef QGSTREAMERVIDEOINPUTDEVICECONTROL_H
|
#ifndef QGSTREAMERVIDEOINPUTDEVICECONTROL_H
|
||||||
#define QGSTREAMERVIDEOINPUTDEVICECONTROL_H
|
#define QGSTREAMERVIDEOINPUTDEVICECONTROL_H
|
||||||
|
|
||||||
#include <qvideodevicecontrol.h>
|
#include <qvideodeviceselectorcontrol.h>
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QGstreamerVideoInputDeviceControl : public QVideoDeviceControl
|
class QGstreamerVideoInputDeviceControl : public QVideoDeviceSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public:
|
|||||||
Required Controls: QAudioDeviceControl
|
Required Controls: QAudioDeviceControl
|
||||||
Recording Controls (QMediaRecorder):
|
Recording Controls (QMediaRecorder):
|
||||||
Required: QMediaRecorderControl
|
Required: QMediaRecorderControl
|
||||||
Recommended: QAudioEncoderControl
|
Recommended: QAudioEncoderSettingsControl
|
||||||
Optional: QMediaContainerControl
|
Optional: QMediaContainerControl
|
||||||
*/
|
*/
|
||||||
#define Q_MEDIASERVICE_AUDIOSOURCE "org.qt-project.qt.audiosource"
|
#define Q_MEDIASERVICE_AUDIOSOURCE "org.qt-project.qt.audiosource"
|
||||||
@@ -202,7 +202,7 @@ public:
|
|||||||
Still Capture Controls: QCameraImageCaptureControl
|
Still Capture Controls: QCameraImageCaptureControl
|
||||||
Video Capture Controls (QMediaRecorder):
|
Video Capture Controls (QMediaRecorder):
|
||||||
Required: QMediaRecorderControl
|
Required: QMediaRecorderControl
|
||||||
Recommended: QAudioEncoderControl, QVideoEncoderControl, QMediaContainerControl
|
Recommended: QAudioEncoderSettingsControl, QVideoEncoderSettingsControl, QMediaContainerControl
|
||||||
Viewfinder Video Output Controls (used by QCameraViewfinder and QGraphicsVideoItem):
|
Viewfinder Video Output Controls (used by QCameraViewfinder and QGraphicsVideoItem):
|
||||||
Required: QVideoOutputControl
|
Required: QVideoOutputControl
|
||||||
Optional: QVideoWindowControl, QVideoRendererControl, QVideoWidgetControl
|
Optional: QVideoWindowControl, QVideoRendererControl, QVideoWidgetControl
|
||||||
@@ -214,7 +214,7 @@ public:
|
|||||||
Required Controls: QRadioTunerControl
|
Required Controls: QRadioTunerControl
|
||||||
Recording Controls (Optional, used by QMediaRecorder):
|
Recording Controls (Optional, used by QMediaRecorder):
|
||||||
Required: QMediaRecorderControl
|
Required: QMediaRecorderControl
|
||||||
Recommended: QAudioEncoderControl
|
Recommended: QAudioEncoderSettingsControl
|
||||||
Optional: QMediaContainerControl
|
Optional: QMediaContainerControl
|
||||||
*/
|
*/
|
||||||
#define Q_MEDIASERVICE_RADIO "org.qt-project.qt.radio"
|
#define Q_MEDIASERVICE_RADIO "org.qt-project.qt.radio"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qaudiorecorder.h"
|
#include "qaudiorecorder.h"
|
||||||
#include "qaudioendpointselector.h"
|
#include "qaudioendpointselectorcontrol.h"
|
||||||
#include "qmediaobject_p.h"
|
#include "qmediaobject_p.h"
|
||||||
#include "qmediarecorder_p.h"
|
#include "qmediarecorder_p.h"
|
||||||
#include <qmediaservice.h>
|
#include <qmediaservice.h>
|
||||||
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
The \l {audiorecorder}{Audio Recorder} example shows how to use this class
|
The \l {audiorecorder}{Audio Recorder} example shows how to use this class
|
||||||
in more detail.
|
in more detail.
|
||||||
|
|
||||||
\sa QMediaRecorder, QAudioEndpointSelector
|
\sa QMediaRecorder, QAudioEndpointSelectorControl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class QAudioRecorderObject : public QMediaObject
|
class QAudioRecorderObject : public QMediaObject
|
||||||
@@ -105,7 +105,7 @@ public:
|
|||||||
QMediaService *service = mediaObject ? mediaObject->service() : 0;
|
QMediaService *service = mediaObject ? mediaObject->service() : 0;
|
||||||
|
|
||||||
if (service != 0)
|
if (service != 0)
|
||||||
audioEndpointSelector = qobject_cast<QAudioEndpointSelector*>(service->requestControl(QAudioEndpointSelector_iid));
|
audioEndpointSelector = qobject_cast<QAudioEndpointSelectorControl*>(service->requestControl(QAudioEndpointSelectorControl_iid));
|
||||||
|
|
||||||
if (audioEndpointSelector) {
|
if (audioEndpointSelector) {
|
||||||
q->connect(audioEndpointSelector, SIGNAL(activeEndpointChanged(QString)),
|
q->connect(audioEndpointSelector, SIGNAL(activeEndpointChanged(QString)),
|
||||||
@@ -121,7 +121,7 @@ public:
|
|||||||
audioEndpointSelector(0) {}
|
audioEndpointSelector(0) {}
|
||||||
|
|
||||||
QMediaServiceProvider *provider;
|
QMediaServiceProvider *provider;
|
||||||
QAudioEndpointSelector *audioEndpointSelector;
|
QAudioEndpointSelectorControl *audioEndpointSelector;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ private:
|
|||||||
|
|
||||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio encoder settings
|
\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
|
\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 <qmediaservice.h>
|
||||||
#include <qmediaserviceprovider_p.h>
|
#include <qmediaserviceprovider_p.h>
|
||||||
#include <qmetadatawritercontrol.h>
|
#include <qmetadatawritercontrol.h>
|
||||||
#include <qaudioencodercontrol.h>
|
#include <qaudioencodersettingscontrol.h>
|
||||||
#include <qvideoencodercontrol.h>
|
#include <qvideoencodersettingscontrol.h>
|
||||||
#include <qmediacontainercontrol.h>
|
#include <qmediacontainercontrol.h>
|
||||||
#include <qmediaavailabilitycontrol.h>
|
#include <qmediaavailabilitycontrol.h>
|
||||||
#include <qcamera.h>
|
#include <qcamera.h>
|
||||||
@@ -350,8 +350,8 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
|
|||||||
|
|
||||||
if (d->control) {
|
if (d->control) {
|
||||||
d->formatControl = qobject_cast<QMediaContainerControl *>(service->requestControl(QMediaContainerControl_iid));
|
d->formatControl = qobject_cast<QMediaContainerControl *>(service->requestControl(QMediaContainerControl_iid));
|
||||||
d->audioControl = qobject_cast<QAudioEncoderControl *>(service->requestControl(QAudioEncoderControl_iid));
|
d->audioControl = qobject_cast<QAudioEncoderSettingsControl *>(service->requestControl(QAudioEncoderSettingsControl_iid));
|
||||||
d->videoControl = qobject_cast<QVideoEncoderControl *>(service->requestControl(QVideoEncoderControl_iid));
|
d->videoControl = qobject_cast<QVideoEncoderSettingsControl *>(service->requestControl(QVideoEncoderSettingsControl_iid));
|
||||||
|
|
||||||
QMediaControl *control = service->requestControl(QMetaDataWriterControl_iid);
|
QMediaControl *control = service->requestControl(QMetaDataWriterControl_iid);
|
||||||
if (control) {
|
if (control) {
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class QMediaRecorderControl;
|
class QMediaRecorderControl;
|
||||||
class QMediaContainerControl;
|
class QMediaContainerControl;
|
||||||
class QAudioEncoderControl;
|
class QAudioEncoderSettingsControl;
|
||||||
class QVideoEncoderControl;
|
class QVideoEncoderSettingsControl;
|
||||||
class QMetaDataWriterControl;
|
class QMetaDataWriterControl;
|
||||||
class QMediaAvailabilityControl;
|
class QMediaAvailabilityControl;
|
||||||
class QTimer;
|
class QTimer;
|
||||||
@@ -71,8 +71,8 @@ public:
|
|||||||
|
|
||||||
QMediaRecorderControl *control;
|
QMediaRecorderControl *control;
|
||||||
QMediaContainerControl *formatControl;
|
QMediaContainerControl *formatControl;
|
||||||
QAudioEncoderControl *audioControl;
|
QAudioEncoderSettingsControl *audioControl;
|
||||||
QVideoEncoderControl *videoControl;
|
QVideoEncoderSettingsControl *videoControl;
|
||||||
QMetaDataWriterControl *metaDataControl;
|
QMetaDataWriterControl *metaDataControl;
|
||||||
QMediaAvailabilityControl *availabilityControl;
|
QMediaAvailabilityControl *availabilityControl;
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include "qvideowidget_p.h"
|
#include "qvideowidget_p.h"
|
||||||
|
|
||||||
#include <qcamera.h>
|
#include <qcamera.h>
|
||||||
#include <qvideodevicecontrol.h>
|
#include <qvideodeviceselectorcontrol.h>
|
||||||
#include <private/qmediaobject_p.h>
|
#include <private/qmediaobject_p.h>
|
||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|||||||
@@ -70,10 +70,10 @@ QMediaControl *AudioCaptureService::requestControl(const char *name)
|
|||||||
if (qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
if (qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
||||||
return m_mediaControl;
|
return m_mediaControl;
|
||||||
|
|
||||||
if (qstrcmp(name,QAudioEncoderControl_iid) == 0)
|
if (qstrcmp(name,QAudioEncoderSettingsControl_iid) == 0)
|
||||||
return m_encoderControl;
|
return m_encoderControl;
|
||||||
|
|
||||||
if (qstrcmp(name,QAudioEndpointSelector_iid) == 0)
|
if (qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0)
|
||||||
return m_endpointSelector;
|
return m_endpointSelector;
|
||||||
|
|
||||||
if (qstrcmp(name,QMediaContainerControl_iid) == 0)
|
if (qstrcmp(name,QMediaContainerControl_iid) == 0)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
|
|
||||||
AudioEncoderControl::AudioEncoderControl(QObject *parent)
|
AudioEncoderControl::AudioEncoderControl(QObject *parent)
|
||||||
:QAudioEncoderControl(parent)
|
:QAudioEncoderSettingsControl(parent)
|
||||||
{
|
{
|
||||||
m_session = qobject_cast<AudioCaptureSession*>(parent);
|
m_session = qobject_cast<AudioCaptureSession*>(parent);
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#ifndef AUDIOENCODERCONTROL_H
|
#ifndef AUDIOENCODERCONTROL_H
|
||||||
#define AUDIOENCODERCONTROL_H
|
#define AUDIOENCODERCONTROL_H
|
||||||
|
|
||||||
#include "qaudioencodercontrol.h"
|
#include "qaudioencodersettingscontrol.h"
|
||||||
|
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
#include <QtCore/qmap.h>
|
#include <QtCore/qmap.h>
|
||||||
@@ -53,7 +53,7 @@ class AudioCaptureSession;
|
|||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
class AudioEncoderControl : public QAudioEncoderControl
|
class AudioEncoderControl : public QAudioEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
|
|
||||||
AudioEndpointSelector::AudioEndpointSelector(QObject *parent)
|
AudioEndpointSelector::AudioEndpointSelector(QObject *parent)
|
||||||
:QAudioEndpointSelector(parent)
|
:QAudioEndpointSelectorControl(parent)
|
||||||
{
|
{
|
||||||
m_session = qobject_cast<AudioCaptureSession*>(parent);
|
m_session = qobject_cast<AudioCaptureSession*>(parent);
|
||||||
|
|
||||||
|
|||||||
@@ -44,13 +44,13 @@
|
|||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#include "qaudioendpointselector.h"
|
#include "qaudioendpointselectorcontrol.h"
|
||||||
|
|
||||||
class AudioCaptureSession;
|
class AudioCaptureSession;
|
||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
class AudioEndpointSelector : public QAudioEndpointSelector
|
class AudioEndpointSelector : public QAudioEndpointSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ QMediaControl* DSCameraService::requestControl(const char *name)
|
|||||||
if(qstrcmp(name,QVideoRendererControl_iid) == 0)
|
if(qstrcmp(name,QVideoRendererControl_iid) == 0)
|
||||||
return m_videoRenderer;
|
return m_videoRenderer;
|
||||||
|
|
||||||
if(qstrcmp(name,QVideoDeviceControl_iid) == 0)
|
if (qstrcmp(name,QVideoDeviceSelectorControl_iid) == 0)
|
||||||
return m_videoDevice;
|
return m_videoDevice;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ extern const CLSID CLSID_VideoInputDeviceCategory;
|
|||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
DSVideoDeviceControl::DSVideoDeviceControl(QObject *parent)
|
DSVideoDeviceControl::DSVideoDeviceControl(QObject *parent)
|
||||||
: QVideoDeviceControl(parent)
|
: QVideoDeviceSelectorControl(parent)
|
||||||
{
|
{
|
||||||
m_session = qobject_cast<DSCameraSession*>(parent);
|
m_session = qobject_cast<DSCameraSession*>(parent);
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#ifndef DSVIDEODEVICECONTROL_H
|
#ifndef DSVIDEODEVICECONTROL_H
|
||||||
#define DSVIDEODEVICECONTROL_H
|
#define DSVIDEODEVICECONTROL_H
|
||||||
|
|
||||||
#include <qvideodevicecontrol.h>
|
#include <qvideodeviceselectorcontrol.h>
|
||||||
|
|
||||||
QT_BEGIN_HEADER
|
QT_BEGIN_HEADER
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ class DSCameraSession;
|
|||||||
|
|
||||||
//QTM_USE_NAMESPACE
|
//QTM_USE_NAMESPACE
|
||||||
|
|
||||||
class DSVideoDeviceControl : public QVideoDeviceControl
|
class DSVideoDeviceControl : public QVideoDeviceSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
DirectShowAudioEndpointControl::DirectShowAudioEndpointControl(
|
DirectShowAudioEndpointControl::DirectShowAudioEndpointControl(
|
||||||
DirectShowPlayerService *service, QObject *parent)
|
DirectShowPlayerService *service, QObject *parent)
|
||||||
: QAudioEndpointSelector(parent)
|
: QAudioEndpointSelectorControl(parent)
|
||||||
, m_service(service)
|
, m_service(service)
|
||||||
, m_bindContext(0)
|
, m_bindContext(0)
|
||||||
, m_deviceEnumerator(0)
|
, m_deviceEnumerator(0)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#ifndef DIRECTSHOWAUDIOENDPOINTCONTROL_H
|
#ifndef DIRECTSHOWAUDIOENDPOINTCONTROL_H
|
||||||
#define DIRECTSHOWAUDIOENDPOINTCONTROL_H
|
#define DIRECTSHOWAUDIOENDPOINTCONTROL_H
|
||||||
|
|
||||||
#include "qaudioendpointselector.h"
|
#include "qaudioendpointselectorcontrol.h"
|
||||||
|
|
||||||
#include <dshow.h>
|
#include <dshow.h>
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ class DirectShowPlayerService;
|
|||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
class DirectShowAudioEndpointControl : public QAudioEndpointSelector
|
class DirectShowAudioEndpointControl : public QAudioEndpointSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ QMediaControl *DirectShowPlayerService::requestControl(const char *name)
|
|||||||
{
|
{
|
||||||
if (qstrcmp(name, QMediaPlayerControl_iid) == 0) {
|
if (qstrcmp(name, QMediaPlayerControl_iid) == 0) {
|
||||||
return m_playerControl;
|
return m_playerControl;
|
||||||
} else if (qstrcmp(name, QAudioEndpointSelector_iid) == 0) {
|
} else if (qstrcmp(name, QAudioEndpointSelectorControl_iid) == 0) {
|
||||||
return m_audioEndpointControl;
|
return m_audioEndpointControl;
|
||||||
} else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) {
|
} else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) {
|
||||||
return m_metaDataControl;
|
return m_metaDataControl;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
|
|
||||||
CameraBinAudioEncoder::CameraBinAudioEncoder(QObject *parent)
|
CameraBinAudioEncoder::CameraBinAudioEncoder(QObject *parent)
|
||||||
:QAudioEncoderControl(parent),
|
:QAudioEncoderSettingsControl(parent),
|
||||||
m_codecs(QGstCodecsInfo::AudioEncoder)
|
m_codecs(QGstCodecsInfo::AudioEncoder)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#ifndef CAMERABINAUDIOENCODE_H
|
#ifndef CAMERABINAUDIOENCODE_H
|
||||||
#define CAMERABINAUDIOENCODE_H
|
#define CAMERABINAUDIOENCODE_H
|
||||||
|
|
||||||
#include <qaudioencodercontrol.h>
|
#include <qaudioencodersettingscontrol.h>
|
||||||
class CameraBinSession;
|
class CameraBinSession;
|
||||||
|
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
@@ -58,7 +58,7 @@ class CameraBinSession;
|
|||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
class CameraBinAudioEncoder : public QAudioEncoderControl
|
class CameraBinAudioEncoder : public QAudioEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -177,19 +177,19 @@ QMediaControl *CameraBinService::requestControl(const char *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qstrcmp(name,QAudioEndpointSelector_iid) == 0)
|
if (qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0)
|
||||||
return m_audioInputEndpointSelector;
|
return m_audioInputEndpointSelector;
|
||||||
|
|
||||||
if (qstrcmp(name,QVideoDeviceControl_iid) == 0)
|
if (qstrcmp(name,QVideoDeviceSelectorControl_iid) == 0)
|
||||||
return m_videoInputDevice;
|
return m_videoInputDevice;
|
||||||
|
|
||||||
if (qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
if (qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
||||||
return m_captureSession->recorderControl();
|
return m_captureSession->recorderControl();
|
||||||
|
|
||||||
if (qstrcmp(name,QAudioEncoderControl_iid) == 0)
|
if (qstrcmp(name,QAudioEncoderSettingsControl_iid) == 0)
|
||||||
return m_captureSession->audioEncodeControl();
|
return m_captureSession->audioEncodeControl();
|
||||||
|
|
||||||
if (qstrcmp(name,QVideoEncoderControl_iid) == 0)
|
if (qstrcmp(name,QVideoEncoderSettingsControl_iid) == 0)
|
||||||
return m_captureSession->videoEncodeControl();
|
return m_captureSession->videoEncodeControl();
|
||||||
|
|
||||||
if (qstrcmp(name,QImageEncoderControl_iid) == 0)
|
if (qstrcmp(name,QImageEncoderControl_iid) == 0)
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QAudioEndpointSelector;
|
class QAudioEndpointSelectorControl;
|
||||||
class QVideoDeviceControl;
|
class QVideoDeviceSelectorControl;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
class CameraBinSession;
|
class CameraBinSession;
|
||||||
@@ -82,8 +82,8 @@ private:
|
|||||||
CameraBinControl *m_cameraControl;
|
CameraBinControl *m_cameraControl;
|
||||||
CameraBinMetaData *m_metaDataControl;
|
CameraBinMetaData *m_metaDataControl;
|
||||||
|
|
||||||
QAudioEndpointSelector *m_audioInputEndpointSelector;
|
QAudioEndpointSelectorControl *m_audioInputEndpointSelector;
|
||||||
QVideoDeviceControl *m_videoInputDevice;
|
QVideoDeviceSelectorControl *m_videoInputDevice;
|
||||||
|
|
||||||
QMediaControl *m_videoOutput;
|
QMediaControl *m_videoOutput;
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
|
|
||||||
CameraBinVideoEncoder::CameraBinVideoEncoder(CameraBinSession *session)
|
CameraBinVideoEncoder::CameraBinVideoEncoder(CameraBinSession *session)
|
||||||
:QVideoEncoderControl(session),
|
:QVideoEncoderSettingsControl(session),
|
||||||
m_session(session),
|
m_session(session),
|
||||||
m_codecs(QGstCodecsInfo::VideoEncoder)
|
m_codecs(QGstCodecsInfo::VideoEncoder)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#ifndef CAMERABINVIDEOENCODE_H
|
#ifndef CAMERABINVIDEOENCODE_H
|
||||||
#define CAMERABINVIDEOENCODE_H
|
#define CAMERABINVIDEOENCODE_H
|
||||||
|
|
||||||
#include <qvideoencodercontrol.h>
|
#include <qvideoencodersettingscontrol.h>
|
||||||
class CameraBinSession;
|
class CameraBinSession;
|
||||||
|
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
@@ -56,7 +56,7 @@ class CameraBinSession;
|
|||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
class CameraBinVideoEncoder : public QVideoEncoderControl
|
class CameraBinVideoEncoder : public QVideoEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
QGstreamerAudioEncode::QGstreamerAudioEncode(QObject *parent)
|
QGstreamerAudioEncode::QGstreamerAudioEncode(QObject *parent)
|
||||||
:QAudioEncoderControl(parent)
|
:QAudioEncoderSettingsControl(parent)
|
||||||
{
|
{
|
||||||
QList<QByteArray> codecCandidates;
|
QList<QByteArray> codecCandidates;
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#ifndef QGSTREAMERAUDIOENCODE_H
|
#ifndef QGSTREAMERAUDIOENCODE_H
|
||||||
#define QGSTREAMERAUDIOENCODE_H
|
#define QGSTREAMERAUDIOENCODE_H
|
||||||
|
|
||||||
#include <qaudioencodercontrol.h>
|
#include <qaudioencodersettingscontrol.h>
|
||||||
|
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
#include <QtCore/qmap.h>
|
#include <QtCore/qmap.h>
|
||||||
@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class QGstreamerCaptureSession;
|
class QGstreamerCaptureSession;
|
||||||
|
|
||||||
class QGstreamerAudioEncode : public QAudioEncoderControl
|
class QGstreamerAudioEncode : public QAudioEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -132,19 +132,19 @@ QMediaControl *QGstreamerCaptureService::requestControl(const char *name)
|
|||||||
if (!m_captureSession)
|
if (!m_captureSession)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (qstrcmp(name,QAudioEndpointSelector_iid) == 0)
|
if (qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0)
|
||||||
return m_audioInputEndpointSelector;
|
return m_audioInputEndpointSelector;
|
||||||
|
|
||||||
if (qstrcmp(name,QVideoDeviceControl_iid) == 0)
|
if (qstrcmp(name,QVideoDeviceSelectorControl_iid) == 0)
|
||||||
return m_videoInputDevice;
|
return m_videoInputDevice;
|
||||||
|
|
||||||
if (qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
if (qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
||||||
return m_captureSession->recorderControl();
|
return m_captureSession->recorderControl();
|
||||||
|
|
||||||
if (qstrcmp(name,QAudioEncoderControl_iid) == 0)
|
if (qstrcmp(name,QAudioEncoderSettingsControl_iid) == 0)
|
||||||
return m_captureSession->audioEncodeControl();
|
return m_captureSession->audioEncodeControl();
|
||||||
|
|
||||||
if (qstrcmp(name,QVideoEncoderControl_iid) == 0)
|
if (qstrcmp(name,QVideoEncoderSettingsControl_iid) == 0)
|
||||||
return m_captureSession->videoEncodeControl();
|
return m_captureSession->videoEncodeControl();
|
||||||
|
|
||||||
if (qstrcmp(name,QImageEncoderControl_iid) == 0)
|
if (qstrcmp(name,QImageEncoderControl_iid) == 0)
|
||||||
|
|||||||
@@ -48,8 +48,8 @@
|
|||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QAudioEndpointSelector;
|
class QAudioEndpointSelectorControl;
|
||||||
class QVideoDeviceControl;
|
class QVideoDeviceSelectorControl;
|
||||||
|
|
||||||
class QGstreamerCaptureSession;
|
class QGstreamerCaptureSession;
|
||||||
class QGstreamerCameraControl;
|
class QGstreamerCameraControl;
|
||||||
@@ -82,8 +82,8 @@ private:
|
|||||||
QGstreamerV4L2Input *m_videoInput;
|
QGstreamerV4L2Input *m_videoInput;
|
||||||
QGstreamerCaptureMetaDataControl *m_metaDataControl;
|
QGstreamerCaptureMetaDataControl *m_metaDataControl;
|
||||||
|
|
||||||
QAudioEndpointSelector *m_audioInputEndpointSelector;
|
QAudioEndpointSelectorControl *m_audioInputEndpointSelector;
|
||||||
QVideoDeviceControl *m_videoInputDevice;
|
QVideoDeviceSelectorControl *m_videoInputDevice;
|
||||||
|
|
||||||
QMediaControl *m_videoOutput;
|
QMediaControl *m_videoOutput;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
QGstreamerVideoEncode::QGstreamerVideoEncode(QGstreamerCaptureSession *session)
|
QGstreamerVideoEncode::QGstreamerVideoEncode(QGstreamerCaptureSession *session)
|
||||||
:QVideoEncoderControl(session), m_session(session)
|
:QVideoEncoderSettingsControl(session), m_session(session)
|
||||||
{
|
{
|
||||||
QList<QByteArray> codecCandidates;
|
QList<QByteArray> codecCandidates;
|
||||||
codecCandidates << "video/h264" << "video/xvid" << "video/mpeg4" << "video/mpeg1" << "video/mpeg2" << "video/theora";
|
codecCandidates << "video/h264" << "video/xvid" << "video/mpeg4" << "video/mpeg1" << "video/mpeg2" << "video/theora";
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#ifndef QGSTREAMERVIDEOENCODE_H
|
#ifndef QGSTREAMERVIDEOENCODE_H
|
||||||
#define QGSTREAMERVIDEOENCODE_H
|
#define QGSTREAMERVIDEOENCODE_H
|
||||||
|
|
||||||
#include <qvideoencodercontrol.h>
|
#include <qvideoencodersettingscontrol.h>
|
||||||
|
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
#include <QtCore/qmap.h>
|
#include <QtCore/qmap.h>
|
||||||
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class QGstreamerCaptureSession;
|
class QGstreamerCaptureSession;
|
||||||
|
|
||||||
class QGstreamerVideoEncode : public QVideoEncoderControl
|
class QGstreamerVideoEncode : public QVideoEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include "mfaudioendpointcontrol.h"
|
#include "mfaudioendpointcontrol.h"
|
||||||
|
|
||||||
MFAudioEndpointControl::MFAudioEndpointControl(QObject *parent)
|
MFAudioEndpointControl::MFAudioEndpointControl(QObject *parent)
|
||||||
: QAudioEndpointSelector(parent)
|
: QAudioEndpointSelectorControl(parent)
|
||||||
, m_currentActivate(0)
|
, m_currentActivate(0)
|
||||||
{
|
{
|
||||||
updateEndpoints();
|
updateEndpoints();
|
||||||
|
|||||||
@@ -46,13 +46,13 @@
|
|||||||
#include <mfidl.h>
|
#include <mfidl.h>
|
||||||
#include <mmdeviceapi.h>
|
#include <mmdeviceapi.h>
|
||||||
|
|
||||||
#include "qaudioendpointselector.h"
|
#include "qaudioendpointselectorcontrol.h"
|
||||||
|
|
||||||
class MFPlayerService;
|
class MFPlayerService;
|
||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
class MFAudioEndpointControl : public QAudioEndpointSelector
|
class MFAudioEndpointControl : public QAudioEndpointSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ QMediaControl* MFPlayerService::requestControl(const char *name)
|
|||||||
{
|
{
|
||||||
if (qstrcmp(name, QMediaPlayerControl_iid) == 0) {
|
if (qstrcmp(name, QMediaPlayerControl_iid) == 0) {
|
||||||
return m_player;
|
return m_player;
|
||||||
} else if (qstrcmp(name, QAudioEndpointSelector_iid) == 0) {
|
} else if (qstrcmp(name, QAudioEndpointSelectorControl_iid) == 0) {
|
||||||
return m_audioEndpointControl;
|
return m_audioEndpointControl;
|
||||||
} else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) {
|
} else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) {
|
||||||
return m_metaDataControl;
|
return m_metaDataControl;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ SUBDIRS += \
|
|||||||
qmetadatawritercontrol \
|
qmetadatawritercontrol \
|
||||||
qradiodata \
|
qradiodata \
|
||||||
qradiotuner \
|
qradiotuner \
|
||||||
qvideoencodercontrol \
|
qvideoencodersettingscontrol \
|
||||||
qvideoframe \
|
qvideoframe \
|
||||||
qvideosurfaceformat \
|
qvideosurfaceformat \
|
||||||
qwavedecoder \
|
qwavedecoder \
|
||||||
|
|||||||
@@ -45,9 +45,9 @@
|
|||||||
#include <qaudioformat.h>
|
#include <qaudioformat.h>
|
||||||
|
|
||||||
#include <qaudiorecorder.h>
|
#include <qaudiorecorder.h>
|
||||||
#include <qaudioencodercontrol.h>
|
#include <qaudioencodersettingscontrol.h>
|
||||||
#include <qmediarecordercontrol.h>
|
#include <qmediarecordercontrol.h>
|
||||||
#include <qaudioendpointselector.h>
|
#include <qaudioendpointselectorcontrol.h>
|
||||||
#include <qaudiodeviceinfo.h>
|
#include <qaudiodeviceinfo.h>
|
||||||
#include <qaudioinput.h>
|
#include <qaudioinput.h>
|
||||||
#include <qmediaobject.h>
|
#include <qmediaobject.h>
|
||||||
|
|||||||
@@ -48,10 +48,10 @@
|
|||||||
#include <qmediarecordercontrol.h>
|
#include <qmediarecordercontrol.h>
|
||||||
#include <qmediarecorder.h>
|
#include <qmediarecorder.h>
|
||||||
#include <qmetadatawritercontrol.h>
|
#include <qmetadatawritercontrol.h>
|
||||||
#include <qaudioendpointselector.h>
|
#include <qaudioendpointselectorcontrol.h>
|
||||||
#include <qaudioencodercontrol.h>
|
#include <qaudioencodersettingscontrol.h>
|
||||||
#include <qmediacontainercontrol.h>
|
#include <qmediacontainercontrol.h>
|
||||||
#include <qvideoencodercontrol.h>
|
#include <qvideoencodersettingscontrol.h>
|
||||||
#include <qaudioformat.h>
|
#include <qaudioformat.h>
|
||||||
|
|
||||||
#include "mockmediacontainercontrol.h"
|
#include "mockmediacontainercontrol.h"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <qmediaobject.h>
|
#include <qmediaobject.h>
|
||||||
#include <qmediaservice.h>
|
#include <qmediaservice.h>
|
||||||
#include <qmetadatareadercontrol.h>
|
#include <qmetadatareadercontrol.h>
|
||||||
#include <qaudioendpointselector.h>
|
#include <qaudioendpointselectorcontrol.h>
|
||||||
|
|
||||||
#include "mockmediarecorderservice.h"
|
#include "mockmediarecorderservice.h"
|
||||||
#include "mockmediaserviceprovider.h"
|
#include "mockmediaserviceprovider.h"
|
||||||
|
|||||||
@@ -49,10 +49,10 @@
|
|||||||
#include <qmediarecordercontrol.h>
|
#include <qmediarecordercontrol.h>
|
||||||
#include <qmediarecorder.h>
|
#include <qmediarecorder.h>
|
||||||
#include <qmetadatawritercontrol.h>
|
#include <qmetadatawritercontrol.h>
|
||||||
#include <qaudioendpointselector.h>
|
#include <qaudioendpointselectorcontrol.h>
|
||||||
#include <qaudioencodercontrol.h>
|
#include <qaudioencodersettingscontrol.h>
|
||||||
#include <qmediacontainercontrol.h>
|
#include <qmediacontainercontrol.h>
|
||||||
#include <qvideoencodercontrol.h>
|
#include <qvideoencodersettingscontrol.h>
|
||||||
#include <qaudioformat.h>
|
#include <qaudioformat.h>
|
||||||
|
|
||||||
#include "mockmediarecorderservice.h"
|
#include "mockmediarecorderservice.h"
|
||||||
@@ -114,13 +114,13 @@ private slots:
|
|||||||
void testVideoSettingsDestructor();
|
void testVideoSettingsDestructor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QAudioEncoderControl* encode;
|
QAudioEncoderSettingsControl* encode;
|
||||||
QAudioEndpointSelector* audio;
|
QAudioEndpointSelectorControl* audio;
|
||||||
MockMediaObject *object;
|
MockMediaObject *object;
|
||||||
MockMediaRecorderService*service;
|
MockMediaRecorderService*service;
|
||||||
MockMediaRecorderControl *mock;
|
MockMediaRecorderControl *mock;
|
||||||
QMediaRecorder *capture;
|
QMediaRecorder *capture;
|
||||||
QVideoEncoderControl* videoEncode;
|
QVideoEncoderSettingsControl* videoEncode;
|
||||||
};
|
};
|
||||||
|
|
||||||
void tst_QMediaRecorder::initTestCase()
|
void tst_QMediaRecorder::initTestCase()
|
||||||
@@ -133,9 +133,9 @@ void tst_QMediaRecorder::initTestCase()
|
|||||||
object = new MockMediaObject(this, service);
|
object = new MockMediaObject(this, service);
|
||||||
capture = new QMediaRecorder(object);
|
capture = new QMediaRecorder(object);
|
||||||
|
|
||||||
audio = qobject_cast<QAudioEndpointSelector*>(service->requestControl(QAudioEndpointSelector_iid));
|
audio = qobject_cast<QAudioEndpointSelectorControl*>(service->requestControl(QAudioEndpointSelectorControl_iid));
|
||||||
encode = qobject_cast<QAudioEncoderControl*>(service->requestControl(QAudioEncoderControl_iid));
|
encode = qobject_cast<QAudioEncoderSettingsControl*>(service->requestControl(QAudioEncoderSettingsControl_iid));
|
||||||
videoEncode = qobject_cast<QVideoEncoderControl*>(service->requestControl(QVideoEncoderControl_iid));
|
videoEncode = qobject_cast<QVideoEncoderSettingsControl*>(service->requestControl(QVideoEncoderSettingsControl_iid));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMediaRecorder::cleanupTestCase()
|
void tst_QMediaRecorder::cleanupTestCase()
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
#include <qvideodevicecontrol.h>
|
#include <qvideodeviceselectorcontrol.h>
|
||||||
#include <qmediacontrol.h>
|
#include <qmediacontrol.h>
|
||||||
#include <qmediaservice.h>
|
#include <qmediaservice.h>
|
||||||
|
|
||||||
|
|||||||
@@ -42,14 +42,14 @@
|
|||||||
#ifndef MOCKAUDIOENCODERCONTROL_H
|
#ifndef MOCKAUDIOENCODERCONTROL_H
|
||||||
#define MOCKAUDIOENCODERCONTROL_H
|
#define MOCKAUDIOENCODERCONTROL_H
|
||||||
|
|
||||||
#include "qaudioencodercontrol.h"
|
#include "qaudioencodersettingscontrol.h"
|
||||||
|
|
||||||
class MockAudioEncoderControl : public QAudioEncoderControl
|
class MockAudioEncoderControl : public QAudioEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MockAudioEncoderControl(QObject *parent):
|
MockAudioEncoderControl(QObject *parent):
|
||||||
QAudioEncoderControl(parent)
|
QAudioEncoderSettingsControl(parent)
|
||||||
{
|
{
|
||||||
m_codecs << "audio/pcm" << "audio/mpeg";
|
m_codecs << "audio/pcm" << "audio/mpeg";
|
||||||
m_descriptions << "Pulse Code Modulation" << "mp3 format";
|
m_descriptions << "Pulse Code Modulation" << "mp3 format";
|
||||||
|
|||||||
@@ -42,14 +42,14 @@
|
|||||||
#ifndef MOCKAUDIOENDPOINTSELECTOR_H
|
#ifndef MOCKAUDIOENDPOINTSELECTOR_H
|
||||||
#define MOCKAUDIOENDPOINTSELECTOR_H
|
#define MOCKAUDIOENDPOINTSELECTOR_H
|
||||||
|
|
||||||
#include "qaudioendpointselector.h"
|
#include "qaudioendpointselectorcontrol.h"
|
||||||
|
|
||||||
class MockAudioEndpointSelector : public QAudioEndpointSelector
|
class MockAudioEndpointSelector : public QAudioEndpointSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MockAudioEndpointSelector(QObject *parent):
|
MockAudioEndpointSelector(QObject *parent):
|
||||||
QAudioEndpointSelector(parent)
|
QAudioEndpointSelectorControl(parent)
|
||||||
{
|
{
|
||||||
m_names << "device1" << "device2" << "device3";
|
m_names << "device1" << "device2" << "device3";
|
||||||
m_descriptions << "dev1 comment" << "dev2 comment" << "dev3 comment";
|
m_descriptions << "dev1 comment" << "dev2 comment" << "dev3 comment";
|
||||||
|
|||||||
@@ -73,15 +73,15 @@ public:
|
|||||||
|
|
||||||
QMediaControl* requestControl(const char *name)
|
QMediaControl* requestControl(const char *name)
|
||||||
{
|
{
|
||||||
if (hasControls && qstrcmp(name,QAudioEncoderControl_iid) == 0)
|
if (hasControls && qstrcmp(name,QAudioEncoderSettingsControl_iid) == 0)
|
||||||
return mockAudioEncoderControl;
|
return mockAudioEncoderControl;
|
||||||
if (hasControls && qstrcmp(name,QAudioEndpointSelector_iid) == 0)
|
if (hasControls && qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0)
|
||||||
return mockAudioEndpointSelector;
|
return mockAudioEndpointSelector;
|
||||||
if (hasControls && qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
if (hasControls && qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
||||||
return mockControl;
|
return mockControl;
|
||||||
if (hasControls && qstrcmp(name,QMediaContainerControl_iid) == 0)
|
if (hasControls && qstrcmp(name,QMediaContainerControl_iid) == 0)
|
||||||
return mockFormatControl;
|
return mockFormatControl;
|
||||||
if (hasControls && qstrcmp(name,QVideoEncoderControl_iid) == 0)
|
if (hasControls && qstrcmp(name,QVideoEncoderSettingsControl_iid) == 0)
|
||||||
return mockVideoEncoderControl;
|
return mockVideoEncoderControl;
|
||||||
if (hasControls && qstrcmp(name, QMetaDataWriterControl_iid) == 0)
|
if (hasControls && qstrcmp(name, QMetaDataWriterControl_iid) == 0)
|
||||||
return mockMetaDataControl;
|
return mockMetaDataControl;
|
||||||
@@ -98,10 +98,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
QMediaControl *mockControl;
|
QMediaControl *mockControl;
|
||||||
QAudioEndpointSelector *mockAudioEndpointSelector;
|
QAudioEndpointSelectorControl *mockAudioEndpointSelector;
|
||||||
QAudioEncoderControl *mockAudioEncoderControl;
|
QAudioEncoderSettingsControl *mockAudioEncoderControl;
|
||||||
QMediaContainerControl *mockFormatControl;
|
QMediaContainerControl *mockFormatControl;
|
||||||
QVideoEncoderControl *mockVideoEncoderControl;
|
QVideoEncoderSettingsControl *mockVideoEncoderControl;
|
||||||
MockMetaDataWriterControl *mockMetaDataControl;
|
MockMetaDataWriterControl *mockMetaDataControl;
|
||||||
MockAvailabilityControl *mockAvailabilityControl;
|
MockAvailabilityControl *mockAvailabilityControl;
|
||||||
MockAudioProbeControl *mockAudioProbeControl;
|
MockAudioProbeControl *mockAudioProbeControl;
|
||||||
|
|||||||
@@ -42,14 +42,14 @@
|
|||||||
#ifndef MOCKVIDEOENCODERCONTROL_H
|
#ifndef MOCKVIDEOENCODERCONTROL_H
|
||||||
#define MOCKVIDEOENCODERCONTROL_H
|
#define MOCKVIDEOENCODERCONTROL_H
|
||||||
|
|
||||||
#include "qvideoencodercontrol.h"
|
#include "qvideoencodersettingscontrol.h"
|
||||||
|
|
||||||
class MockVideoEncoderControl : public QVideoEncoderControl
|
class MockVideoEncoderControl : public QVideoEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MockVideoEncoderControl(QObject *parent):
|
MockVideoEncoderControl(QObject *parent):
|
||||||
QVideoEncoderControl(parent)
|
QVideoEncoderSettingsControl(parent)
|
||||||
{
|
{
|
||||||
m_videoCodecs << "video/3gpp" << "video/H264";
|
m_videoCodecs << "video/3gpp" << "video/H264";
|
||||||
m_sizes << QSize(320,240) << QSize(640,480);
|
m_sizes << QSize(320,240) << QSize(640,480);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
CONFIG += testcase
|
CONFIG += testcase
|
||||||
TARGET = tst_qvideoencodercontrol
|
TARGET = tst_qvideoencodersettingscontrol
|
||||||
|
|
||||||
QT += multimedia-private testlib
|
QT += multimedia-private testlib
|
||||||
CONFIG += no_private_qt_headers_warning
|
CONFIG += no_private_qt_headers_warning
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
tst_qvideoencodercontrol.cpp
|
tst_qvideoencodersettingscontrol.cpp
|
||||||
|
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
//TESTED_COMPONENT=src/multimedia
|
//TESTED_COMPONENT=src/multimedia
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include "qvideoencodercontrol.h"
|
#include "qvideoencodersettingscontrol.h"
|
||||||
class MyVideEncoderControl: public QVideoEncoderControl
|
class MyVideEncoderControl: public QVideoEncoderSettingsControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MyVideEncoderControl(QObject *parent = 0 ):QVideoEncoderControl(parent)
|
MyVideEncoderControl(QObject *parent = 0 ):QVideoEncoderSettingsControl(parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -99,20 +99,20 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class tst_QVideoEncoderControl: public QObject
|
class tst_QVideoEncoderSettingsControl: public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private slots:
|
||||||
void constructor();
|
void constructor();
|
||||||
};
|
};
|
||||||
|
|
||||||
void tst_QVideoEncoderControl::constructor()
|
void tst_QVideoEncoderSettingsControl::constructor()
|
||||||
{
|
{
|
||||||
QObject parent;
|
QObject parent;
|
||||||
MyVideEncoderControl control(&parent);
|
MyVideEncoderControl control(&parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
QTEST_MAIN(tst_QVideoEncoderControl)
|
QTEST_MAIN(tst_QVideoEncoderSettingsControl)
|
||||||
#include "tst_qvideoencodercontrol.moc"
|
#include "tst_qvideoencodersettingscontrol.moc"
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user