diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2012-07-16 11:28:02 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-24 09:49:47 +0200 |
commit | ae728a4b1e2a0065bab67b5c3b114ef1c30b674a (patch) | |
tree | 36f5c3f60faca8d70dd94673dfa44570e6f367b4 /src | |
parent | 29a2d09a43b34c309b32d17a0a5ba2a4737342c5 (diff) | |
download | qtmultimedia-ae728a4b1e2a0065bab67b5c3b114ef1c30b674a.tar.gz |
Replaced endpoint control with audio input and output controls
Change-Id: I981aabe39d106ced4ee1240db9e5b653c6fa5e91
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'src')
26 files changed, 506 insertions, 285 deletions
diff --git a/src/gsttools/gsttools.pro b/src/gsttools/gsttools.pro index 50e546584..d267518d8 100644 --- a/src/gsttools/gsttools.pro +++ b/src/gsttools/gsttools.pro @@ -42,7 +42,7 @@ PRIVATE_HEADERS += \ qgstvideobuffer_p.h \ qvideosurfacegstsink_p.h \ qgstreamervideorendererinterface_p.h \ - qgstreameraudioinputendpointselector_p.h \ + qgstreameraudioinputselector_p.h \ qgstreamervideorenderer_p.h \ qgstreamervideoinputdevicecontrol_p.h \ gstvideoconnector_p.h \ @@ -58,7 +58,7 @@ SOURCES += \ qgstvideobuffer.cpp \ qvideosurfacegstsink.cpp \ qgstreamervideorendererinterface.cpp \ - qgstreameraudioinputendpointselector.cpp \ + qgstreameraudioinputselector.cpp \ qgstreamervideorenderer.cpp \ qgstreamervideoinputdevicecontrol.cpp \ qgstcodecsinfo.cpp \ diff --git a/src/gsttools/qgstreameraudioinputendpointselector.cpp b/src/gsttools/qgstreameraudioinputselector.cpp index 8ee6c3e9f..95d6dde7c 100644 --- a/src/gsttools/qgstreameraudioinputendpointselector.cpp +++ b/src/gsttools/qgstreameraudioinputselector.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qgstreameraudioinputendpointselector_p.h" +#include "qgstreameraudioinputselector_p.h" #include <QtCore/QDir> #include <QtCore/QDebug> @@ -50,22 +50,22 @@ #include <alsa/asoundlib.h> #endif -QGstreamerAudioInputEndpointSelector::QGstreamerAudioInputEndpointSelector(QObject *parent) - :QAudioEndpointSelectorControl(parent) +QGstreamerAudioInputSelector::QGstreamerAudioInputSelector(QObject *parent) + :QAudioInputSelectorControl(parent) { update(); } -QGstreamerAudioInputEndpointSelector::~QGstreamerAudioInputEndpointSelector() +QGstreamerAudioInputSelector::~QGstreamerAudioInputSelector() { } -QList<QString> QGstreamerAudioInputEndpointSelector::availableEndpoints() const +QList<QString> QGstreamerAudioInputSelector::availableInputs() const { return m_names; } -QString QGstreamerAudioInputEndpointSelector::endpointDescription(const QString& name) const +QString QGstreamerAudioInputSelector::inputDescription(const QString& name) const { QString desc; @@ -78,7 +78,7 @@ QString QGstreamerAudioInputEndpointSelector::endpointDescription(const QString& return desc; } -QString QGstreamerAudioInputEndpointSelector::defaultEndpoint() const +QString QGstreamerAudioInputSelector::defaultInput() const { if (m_names.size() > 0) return m_names.at(0); @@ -86,20 +86,20 @@ QString QGstreamerAudioInputEndpointSelector::defaultEndpoint() const return QString(); } -QString QGstreamerAudioInputEndpointSelector::activeEndpoint() const +QString QGstreamerAudioInputSelector::activeInput() const { return m_audioInput; } -void QGstreamerAudioInputEndpointSelector::setActiveEndpoint(const QString& name) +void QGstreamerAudioInputSelector::setActiveInput(const QString& name) { if (m_audioInput.compare(name) != 0) { m_audioInput = name; - emit activeEndpointChanged(name); + emit activeInputChanged(name); } } -void QGstreamerAudioInputEndpointSelector::update() +void QGstreamerAudioInputSelector::update() { m_names.clear(); m_descriptions.clear(); @@ -115,7 +115,7 @@ void QGstreamerAudioInputEndpointSelector::update() m_audioInput = m_names.at(0); } -void QGstreamerAudioInputEndpointSelector::updateAlsaDevices() +void QGstreamerAudioInputSelector::updateAlsaDevices() { #ifdef HAVE_ALSA void **hints, **n; @@ -149,7 +149,7 @@ void QGstreamerAudioInputEndpointSelector::updateAlsaDevices() #endif } -void QGstreamerAudioInputEndpointSelector::updateOssDevices() +void QGstreamerAudioInputSelector::updateOssDevices() { QDir devDir("/dev"); devDir.setFilter(QDir::System); @@ -160,7 +160,7 @@ void QGstreamerAudioInputEndpointSelector::updateOssDevices() } } -void QGstreamerAudioInputEndpointSelector::updatePulseDevices() +void QGstreamerAudioInputSelector::updatePulseDevices() { GstElementFactory *factory = gst_element_factory_find("pulsesrc"); if (factory) { diff --git a/src/multimedia/controls/controls.pri b/src/multimedia/controls/controls.pri index 03bab2ffb..e756abc63 100644 --- a/src/multimedia/controls/controls.pri +++ b/src/multimedia/controls/controls.pri @@ -4,7 +4,8 @@ INCLUDEPATH += controls PUBLIC_HEADERS += \ controls/qaudiodecodercontrol.h \ controls/qaudioencodersettingscontrol.h \ - controls/qaudioendpointselectorcontrol.h \ + controls/qaudioinputselectorcontrol.h \ + controls/qaudiooutputselectorcontrol.h \ controls/qcameracapturebufferformatcontrol.h \ controls/qcameracapturedestinationcontrol.h \ controls/qcameracontrol.h \ @@ -74,7 +75,8 @@ SOURCES += \ controls/qaudiodecodercontrol.cpp \ controls/qvideoencodersettingscontrol.cpp \ controls/qaudioencodersettingscontrol.cpp \ - controls/qaudioendpointselectorcontrol.cpp \ + controls/qaudioinputselectorcontrol.cpp \ + controls/qaudiooutputselectorcontrol.cpp \ controls/qvideodeviceselectorcontrol.cpp diff --git a/src/multimedia/controls/qaudioendpointselectorcontrol.cpp b/src/multimedia/controls/qaudioendpointselectorcontrol.cpp deleted file mode 100644 index 096389b59..000000000 --- a/src/multimedia/controls/qaudioendpointselectorcontrol.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qaudioendpointselectorcontrol.h" - -QT_BEGIN_NAMESPACE - -/*! - \class QAudioEndpointSelectorControl - - \brief The QAudioEndpointSelectorControl class provides an audio endpoint selector media control. - \inmodule QtMultimedia - \ingroup multimedia_control - - 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 QAudioEndpointSelectorControl is \c org.qt-project.qt.audioendpointselectorcontrol/5.0 as - defined in QAudioEndpointSelectorControl_iid. - - \sa QMediaService::requestControl() -*/ - -/*! - \macro QAudioEndpointSelectorControl_iid - - \c org.qt-project.qt.audioendpointselectorcontrol/5.0 - - Defines the interface name of the QAudioEndpointSelectorControl class. - - \relates QAudioEndpointSelectorControl -*/ - -/*! - Constructs a new audio endpoint selector control with the given \a parent. -*/ -QAudioEndpointSelectorControl::QAudioEndpointSelectorControl(QObject *parent) - :QMediaControl(parent) -{ -} - -/*! - Destroys an audio endpoint selector control. -*/ -QAudioEndpointSelectorControl::~QAudioEndpointSelectorControl() -{ -} - -/*! - \fn QList<QString> QAudioEndpointSelectorControl::availableEndpoints() const - - Returns a list of the names of the available audio endpoints. -*/ - -/*! - \fn QString QAudioEndpointSelectorControl::endpointDescription(const QString& name) const - - Returns the description of the endpoint \a name. -*/ - -/*! - \fn QString QAudioEndpointSelectorControl::defaultEndpoint() const - - Returns the name of the default audio endpoint. -*/ - -/*! - \fn QString QAudioEndpointSelectorControl::activeEndpoint() const - - Returns the name of the currently selected audio endpoint. -*/ - -/*! - \fn QAudioEndpointSelectorControl::setActiveEndpoint(const QString& name) - - Set the active audio endpoint to \a name. -*/ - -/*! - \fn QAudioEndpointSelectorControl::activeEndpointChanged(const QString& name) - - Signals that the audio endpoint has changed to \a name. -*/ - -/*! - \fn QAudioEndpointSelectorControl::availableEndpointsChanged() - - Signals that list of available endpoints has changed. -*/ - -#include "moc_qaudioendpointselectorcontrol.cpp" -QT_END_NAMESPACE - diff --git a/src/multimedia/controls/qaudioinputselectorcontrol.cpp b/src/multimedia/controls/qaudioinputselectorcontrol.cpp new file mode 100644 index 000000000..8c59c4186 --- /dev/null +++ b/src/multimedia/controls/qaudioinputselectorcontrol.cpp @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qaudioinputselectorcontrol.h" + +QT_BEGIN_NAMESPACE + +/*! + \class QAudioInputSelectorControl + + \brief The QAudioInputSelectorControl class provides an audio input selector media control. + \inmodule QtMultimedia + \ingroup multimedia_control + + The QAudioInputSelectorControl class provides descriptions of the audio + inputs available on a system and allows one to be selected as the audio + input of a media service. + + The interface name of QAudioInputSelectorControl is \c org.qt-project.qt.audioinputselectorcontrol/5.0 as + defined in QAudioInputSelectorControl_iid. + + \sa QMediaService::requestControl() +*/ + +/*! + \macro QAudioInputSelectorControl_iid + + \c org.qt-project.qt.audioinputselectorcontrol/5.0 + + Defines the interface name of the QAudioInputSelectorControl class. + + \relates QAudioInputSelectorControl +*/ + +/*! + Constructs a new audio input selector control with the given \a parent. +*/ +QAudioInputSelectorControl::QAudioInputSelectorControl(QObject *parent) + :QMediaControl(parent) +{ +} + +/*! + Destroys an audio input selector control. +*/ +QAudioInputSelectorControl::~QAudioInputSelectorControl() +{ +} + +/*! + \fn QList<QString> QAudioInputSelectorControl::availableInputs() const + + Returns a list of the names of the available audio inputs. +*/ + +/*! + \fn QString QAudioInputSelectorControl::inputDescription(const QString& name) const + + Returns the description of the input \a name. +*/ + +/*! + \fn QString QAudioInputSelectorControl::defaultInput() const + + Returns the name of the default audio input. +*/ + +/*! + \fn QString QAudioInputSelectorControl::activeInput() const + + Returns the name of the currently selected audio input. +*/ + +/*! + \fn QAudioInputSelectorControl::setActiveInput(const QString& name) + + Set the active audio input to \a name. +*/ + +/*! + \fn QAudioInputSelectorControl::activeInputChanged(const QString& name) + + Signals that the audio input has changed to \a name. +*/ + +/*! + \fn QAudioInputSelectorControl::availableInputsChanged() + + Signals that list of available inputs has changed. +*/ + +#include "moc_qaudioinputselectorcontrol.cpp" +QT_END_NAMESPACE + diff --git a/src/multimedia/controls/qaudioendpointselectorcontrol.h b/src/multimedia/controls/qaudioinputselectorcontrol.h index 9ddc767d5..d54a51ced 100644 --- a/src/multimedia/controls/qaudioendpointselectorcontrol.h +++ b/src/multimedia/controls/qaudioinputselectorcontrol.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QAUDIOENDPOINTSELECTORCONTROL_H -#define QAUDIOENDPOINTSELECTORCONTROL_H +#ifndef QAUDIOINPUTSELECTORCONTROL_H +#define QAUDIOINPUTSELECTORCONTROL_H #include <qaudio.h> #include <qmediacontrol.h> @@ -54,35 +54,35 @@ QT_MODULE(Multimedia) // Class forward declaration required for QDoc bug class QString; -class Q_MULTIMEDIA_EXPORT QAudioEndpointSelectorControl : public QMediaControl +class Q_MULTIMEDIA_EXPORT QAudioInputSelectorControl : public QMediaControl { Q_OBJECT public: - virtual ~QAudioEndpointSelectorControl(); + virtual ~QAudioInputSelectorControl(); - virtual QList<QString> availableEndpoints() const = 0; - virtual QString endpointDescription(const QString& name) const = 0; - virtual QString defaultEndpoint() const = 0; - virtual QString activeEndpoint() const = 0; + virtual QList<QString> availableInputs() const = 0; + virtual QString inputDescription(const QString& name) const = 0; + virtual QString defaultInput() const = 0; + virtual QString activeInput() const = 0; public Q_SLOTS: - virtual void setActiveEndpoint(const QString& name) = 0; + virtual void setActiveInput(const QString& name) = 0; Q_SIGNALS: - void activeEndpointChanged(const QString& name); - void availableEndpointsChanged(); + void activeInputChanged(const QString& name); + void availableInputsChanged(); protected: - QAudioEndpointSelectorControl(QObject *parent = 0); + QAudioInputSelectorControl(QObject *parent = 0); }; -#define QAudioEndpointSelectorControl_iid "org.qt-project.qt.audioendpointselectorcontrol/5.0" -Q_MEDIA_DECLARE_CONTROL(QAudioEndpointSelectorControl, QAudioEndpointSelectorControl_iid) +#define QAudioInputSelectorControl_iid "org.qt-project.qt.audioinputselectorcontrol/5.0" +Q_MEDIA_DECLARE_CONTROL(QAudioInputSelectorControl, QAudioInputSelectorControl_iid) QT_END_NAMESPACE QT_END_HEADER -#endif // QAUDIOENDPOINTSELECTORCONTROL_H +#endif // QAUDIOINPUTSELECTORCONTROL_H diff --git a/src/multimedia/controls/qaudiooutputselectorcontrol.cpp b/src/multimedia/controls/qaudiooutputselectorcontrol.cpp new file mode 100644 index 000000000..13a5078a7 --- /dev/null +++ b/src/multimedia/controls/qaudiooutputselectorcontrol.cpp @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qaudiooutputselectorcontrol.h" + +QT_BEGIN_NAMESPACE + +/*! + \class QAudioOutputSelectorControl + + \brief The QAudioOutputSelectorControl class provides an audio output selector media control. + \inmodule QtMultimedia + \ingroup multimedia_control + + The QAudioOutputSelectorControl class provides descriptions of the audio + outputs available on a system and allows one to be selected as the audio + output of a media service. + + The interface name of QAudioOutputSelectorControl is \c org.qt-project.qt.audiooutputselectorcontrol/5.0 as + defined in QAudioOutputSelectorControl_iid. + + \sa QMediaService::requestControl() +*/ + +/*! + \macro QAudioOutputSelectorControl_iid + + \c org.qt-project.qt.audiooutputselectorcontrol/5.0 + + Defines the interface name of the QAudioOutputSelectorControl class. + + \relates QAudioOutputSelectorControl +*/ + +/*! + Constructs a new audio output selector control with the given \a parent. +*/ +QAudioOutputSelectorControl::QAudioOutputSelectorControl(QObject *parent) + :QMediaControl(parent) +{ +} + +/*! + Destroys an audio output selector control. +*/ +QAudioOutputSelectorControl::~QAudioOutputSelectorControl() +{ +} + +/*! + \fn QList<QString> QAudioOutputSelectorControl::availableOutputs() const + + Returns a list of the names of the available audio outputs. +*/ + +/*! + \fn QString QAudioOutputSelectorControl::outputDescription(const QString& name) const + + Returns the description of the output \a name. +*/ + +/*! + \fn QString QAudioOutputSelectorControl::defaultOutput() const + + Returns the name of the default audio output. +*/ + +/*! + \fn QString QAudioOutputSelectorControl::activeOutput() const + + Returns the name of the currently selected audio output. +*/ + +/*! + \fn QAudioOutputSelectorControl::setActiveOutput(const QString& name) + + Set the active audio output to \a name. +*/ + +/*! + \fn QAudioOutputSelectorControl::activeOutputChanged(const QString& name) + + Signals that the audio output has changed to \a name. +*/ + +/*! + \fn QAudioOutputSelectorControl::availableOutputsChanged() + + Signals that list of available outputs has changed. +*/ + +#include "moc_qaudiooutputselectorcontrol.cpp" +QT_END_NAMESPACE + diff --git a/src/multimedia/controls/qaudiooutputselectorcontrol.h b/src/multimedia/controls/qaudiooutputselectorcontrol.h new file mode 100644 index 000000000..e7584fd0c --- /dev/null +++ b/src/multimedia/controls/qaudiooutputselectorcontrol.h @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QAUDIOOUTPUTSELECTORCONTROL_H +#define QAUDIOOUTPUTSELECTORCONTROL_H + +#include <qaudio.h> +#include <qmediacontrol.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + + +// Class forward declaration required for QDoc bug +class QString; +class Q_MULTIMEDIA_EXPORT QAudioOutputSelectorControl : public QMediaControl +{ + Q_OBJECT + +public: + virtual ~QAudioOutputSelectorControl(); + + virtual QList<QString> availableOutputs() const = 0; + virtual QString outputDescription(const QString& name) const = 0; + virtual QString defaultOutput() const = 0; + virtual QString activeOutput() const = 0; + +public Q_SLOTS: + virtual void setActiveOutput(const QString& name) = 0; + +Q_SIGNALS: + void activeOutputChanged(const QString& name); + void availableOutputsChanged(); + +protected: + QAudioOutputSelectorControl(QObject *parent = 0); +}; + +#define QAudioOutputSelectorControl_iid "org.qt-project.qt.audiooutputselectorcontrol/5.0" +Q_MEDIA_DECLARE_CONTROL(QAudioOutputSelectorControl, QAudioOutputSelectorControl_iid) + +QT_END_NAMESPACE + +QT_END_HEADER + + +#endif // QAUDIOOUTPUTSELECTORCONTROL_H diff --git a/src/multimedia/gsttools_headers/qgstreameraudioinputendpointselector_p.h b/src/multimedia/gsttools_headers/qgstreameraudioinputselector_p.h index 3828b6a66..70eb9716e 100644 --- a/src/multimedia/gsttools_headers/qgstreameraudioinputendpointselector_p.h +++ b/src/multimedia/gsttools_headers/qgstreameraudioinputselector_p.h @@ -39,28 +39,28 @@ ** ****************************************************************************/ -#ifndef QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H -#define QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H +#ifndef QGSTREAMERAUDIOINPUTSELECTOR_H +#define QGSTREAMERAUDIOINPUTSELECTOR_H -#include <qaudioendpointselectorcontrol.h> +#include <qaudioinputselectorcontrol.h> #include <QtCore/qstringlist.h> QT_BEGIN_NAMESPACE -class QGstreamerAudioInputEndpointSelector : public QAudioEndpointSelectorControl +class QGstreamerAudioInputSelector : public QAudioInputSelectorControl { Q_OBJECT public: - QGstreamerAudioInputEndpointSelector(QObject *parent); - ~QGstreamerAudioInputEndpointSelector(); + QGstreamerAudioInputSelector(QObject *parent); + ~QGstreamerAudioInputSelector(); - QList<QString> availableEndpoints() const; - QString endpointDescription(const QString& name) const; - QString defaultEndpoint() const; - QString activeEndpoint() const; + QList<QString> availableInputs() const; + QString inputDescription(const QString& name) const; + QString defaultInput() const; + QString activeInput() const; public Q_SLOTS: - void setActiveEndpoint(const QString& name); + void setActiveInput(const QString& name); private: void update(); @@ -75,4 +75,4 @@ private: QT_END_NAMESPACE -#endif // QGSTREAMERAUDIOINPUTENDPOINTSELECTOR_H +#endif // QGSTREAMERAUDIOINPUTSELECTOR_H diff --git a/src/multimedia/recording/qaudiorecorder.cpp b/src/multimedia/recording/qaudiorecorder.cpp index 286151194..28885f960 100644 --- a/src/multimedia/recording/qaudiorecorder.cpp +++ b/src/multimedia/recording/qaudiorecorder.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qaudiorecorder.h" -#include "qaudioendpointselectorcontrol.h" +#include "qaudioinputselectorcontrol.h" #include "qmediaobject_p.h" #include "qmediarecorder_p.h" #include <qmediaservice.h> @@ -68,15 +68,14 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder - In addition QAudioRecorder provides functionality for selecting the audio - input from available audio endpoints. + In addition QAudioRecorder provides functionality for selecting the audio input. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder endpoints + \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder inputs The \l {audiorecorder}{Audio Recorder} example shows how to use this class in more detail. - \sa QMediaRecorder, QAudioEndpointSelectorControl + \sa QMediaRecorder, QAudioInputSelectorControl */ class QAudioRecorderObject : public QMediaObject @@ -100,17 +99,17 @@ public: void initControls() { Q_Q(QAudioRecorder); - audioEndpointSelector = 0; + audioInputSelector = 0; QMediaService *service = mediaObject ? mediaObject->service() : 0; if (service != 0) - audioEndpointSelector = qobject_cast<QAudioEndpointSelectorControl*>(service->requestControl(QAudioEndpointSelectorControl_iid)); + audioInputSelector = qobject_cast<QAudioInputSelectorControl*>(service->requestControl(QAudioInputSelectorControl_iid)); - if (audioEndpointSelector) { - q->connect(audioEndpointSelector, SIGNAL(activeEndpointChanged(QString)), + if (audioInputSelector) { + q->connect(audioInputSelector, SIGNAL(activeInputChanged(QString)), SIGNAL(audioInputChanged(QString))); - q->connect(audioEndpointSelector, SIGNAL(availableEndpointsChanged()), + q->connect(audioInputSelector, SIGNAL(availableInputsChanged()), SIGNAL(availableAudioInputsChanged())); } } @@ -118,10 +117,10 @@ public: QAudioRecorderPrivate(): QMediaRecorderPrivate(), provider(0), - audioEndpointSelector(0) {} + audioInputSelector(0) {} QMediaServiceProvider *provider; - QAudioEndpointSelectorControl *audioEndpointSelector; + QAudioInputSelectorControl *audioInputSelector; }; @@ -153,8 +152,8 @@ QAudioRecorder::~QAudioRecorder() QMediaObject *mediaObject = d->mediaObject; setMediaObject(0); - if (service && d->audioEndpointSelector) - service->releaseControl(d->audioEndpointSelector); + if (service && d->audioInputSelector) + service->releaseControl(d->audioInputSelector); if (d->provider && service) d->provider->releaseService(service); @@ -169,8 +168,8 @@ QAudioRecorder::~QAudioRecorder() QStringList QAudioRecorder::audioInputs() const { Q_D(const QAudioRecorder); - if (d->audioEndpointSelector) - return d->audioEndpointSelector->availableEndpoints(); + if (d->audioInputSelector) + return d->audioInputSelector->availableInputs(); else return QStringList(); } @@ -183,8 +182,8 @@ QString QAudioRecorder::audioInputDescription(const QString& name) const { Q_D(const QAudioRecorder); - if (d->audioEndpointSelector) - return d->audioEndpointSelector->endpointDescription(name); + if (d->audioInputSelector) + return d->audioInputSelector->inputDescription(name); else return QString(); } @@ -197,8 +196,8 @@ QString QAudioRecorder::defaultAudioInput() const { Q_D(const QAudioRecorder); - if (d->audioEndpointSelector) - return d->audioEndpointSelector->defaultEndpoint(); + if (d->audioInputSelector) + return d->audioInputSelector->defaultInput(); else return QString(); } @@ -217,8 +216,8 @@ QString QAudioRecorder::audioInput() const { Q_D(const QAudioRecorder); - if (d->audioEndpointSelector) - return d->audioEndpointSelector->activeEndpoint(); + if (d->audioInputSelector) + return d->audioInputSelector->activeInput(); else return QString(); } @@ -231,8 +230,8 @@ void QAudioRecorder::setAudioInput(const QString& name) { Q_D(const QAudioRecorder); - if (d->audioEndpointSelector) - return d->audioEndpointSelector->setActiveEndpoint(name); + if (d->audioInputSelector) + return d->audioInputSelector->setActiveInput(name); } /*! diff --git a/src/plugins/audiocapture/audiocapture.pro b/src/plugins/audiocapture/audiocapture.pro index 6a4a5888a..9422682b8 100644 --- a/src/plugins/audiocapture/audiocapture.pro +++ b/src/plugins/audiocapture/audiocapture.pro @@ -10,7 +10,7 @@ DESTDIR = $$QT.multimedia.plugins/$${PLUGIN_TYPE} HEADERS += audioencodercontrol.h \ audiocontainercontrol.h \ audiomediarecordercontrol.h \ - audioendpointselector.h \ + audioinputselector.h \ audiocaptureservice.h \ audiocaptureserviceplugin.h \ audiocapturesession.h @@ -18,7 +18,7 @@ HEADERS += audioencodercontrol.h \ SOURCES += audioencodercontrol.cpp \ audiocontainercontrol.cpp \ audiomediarecordercontrol.cpp \ - audioendpointselector.cpp \ + audioinputselector.cpp \ audiocaptureservice.cpp \ audiocaptureserviceplugin.cpp \ audiocapturesession.cpp diff --git a/src/plugins/audiocapture/audiocaptureservice.cpp b/src/plugins/audiocapture/audiocaptureservice.cpp index ed5908803..e71b2e1c6 100644 --- a/src/plugins/audiocapture/audiocaptureservice.cpp +++ b/src/plugins/audiocapture/audiocaptureservice.cpp @@ -41,7 +41,7 @@ #include "audiocaptureservice.h" #include "audiocapturesession.h" -#include "audioendpointselector.h" +#include "audioinputselector.h" #include "audioencodercontrol.h" #include "audiocontainercontrol.h" #include "audiomediarecordercontrol.h" @@ -53,14 +53,14 @@ AudioCaptureService::AudioCaptureService(QObject *parent): m_encoderControl = new AudioEncoderControl(m_session); m_containerControl = new AudioContainerControl(m_session); m_mediaControl = new AudioMediaRecorderControl(m_session); - m_endpointSelector = new AudioEndpointSelector(m_session); + m_inputSelector = new AudioInputSelector(m_session); } AudioCaptureService::~AudioCaptureService() { delete m_encoderControl; delete m_containerControl; - delete m_endpointSelector; + delete m_inputSelector; delete m_mediaControl; delete m_session; } @@ -73,8 +73,8 @@ QMediaControl *AudioCaptureService::requestControl(const char *name) if (qstrcmp(name,QAudioEncoderSettingsControl_iid) == 0) return m_encoderControl; - if (qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0) - return m_endpointSelector; + if (qstrcmp(name,QAudioInputSelectorControl_iid) == 0) + return m_inputSelector; if (qstrcmp(name,QMediaContainerControl_iid) == 0) return m_containerControl; diff --git a/src/plugins/audiocapture/audiocaptureservice.h b/src/plugins/audiocapture/audiocaptureservice.h index eff1301ba..8bc314950 100644 --- a/src/plugins/audiocapture/audiocaptureservice.h +++ b/src/plugins/audiocapture/audiocaptureservice.h @@ -50,7 +50,7 @@ class AudioCaptureSession; class AudioEncoderControl; class AudioContainerControl; class AudioMediaRecorderControl; -class AudioEndpointSelector; +class AudioInputSelector; QT_USE_NAMESPACE @@ -67,7 +67,7 @@ private: AudioCaptureSession *m_session; AudioEncoderControl *m_encoderControl; AudioContainerControl *m_containerControl; - AudioEndpointSelector *m_endpointSelector; + AudioInputSelector *m_inputSelector; AudioMediaRecorderControl *m_mediaControl; }; diff --git a/src/plugins/audiocapture/audiocapturesession.h b/src/plugins/audiocapture/audiocapturesession.h index bf68f6eef..4d1374391 100644 --- a/src/plugins/audiocapture/audiocapturesession.h +++ b/src/plugins/audiocapture/audiocapturesession.h @@ -47,7 +47,7 @@ #include <QDir> #include "audioencodercontrol.h" -#include "audioendpointselector.h" +#include "audioinputselector.h" #include "audiomediarecordercontrol.h" #include <qaudioformat.h> diff --git a/src/plugins/audiocapture/audioendpointselector.cpp b/src/plugins/audiocapture/audioinputselector.cpp index 757d779bd..d692ccaf2 100644 --- a/src/plugins/audiocapture/audioendpointselector.cpp +++ b/src/plugins/audiocapture/audioinputselector.cpp @@ -40,31 +40,31 @@ ****************************************************************************/ #include "audiocapturesession.h" -#include "audioendpointselector.h" +#include "audioinputselector.h" #include <qaudiodeviceinfo.h> -AudioEndpointSelector::AudioEndpointSelector(QObject *parent) - :QAudioEndpointSelectorControl(parent) +AudioInputSelector::AudioInputSelector(QObject *parent) + :QAudioInputSelectorControl(parent) { m_session = qobject_cast<AudioCaptureSession*>(parent); update(); - m_audioInput = defaultEndpoint(); + m_audioInput = defaultInput(); } -AudioEndpointSelector::~AudioEndpointSelector() +AudioInputSelector::~AudioInputSelector() { } -QList<QString> AudioEndpointSelector::availableEndpoints() const +QList<QString> AudioInputSelector::availableInputs() const { return m_names; } -QString AudioEndpointSelector::endpointDescription(const QString& name) const +QString AudioInputSelector::inputDescription(const QString& name) const { QString desc; @@ -77,26 +77,26 @@ QString AudioEndpointSelector::endpointDescription(const QString& name) const return desc; } -QString AudioEndpointSelector::defaultEndpoint() const +QString AudioInputSelector::defaultInput() const { return QAudioDeviceInfo(QAudioDeviceInfo::defaultInputDevice()).deviceName(); } -QString AudioEndpointSelector::activeEndpoint() const +QString AudioInputSelector::activeInput() const { return m_audioInput; } -void AudioEndpointSelector::setActiveEndpoint(const QString& name) +void AudioInputSelector::setActiveInput(const QString& name) { if (m_audioInput.compare(name) != 0) { m_audioInput = name; m_session->setCaptureDevice(name); - emit activeEndpointChanged(name); + emit activeInputChanged(name); } } -void AudioEndpointSelector::update() +void AudioInputSelector::update() { m_names.clear(); m_descriptions.clear(); diff --git a/src/plugins/audiocapture/audioendpointselector.h b/src/plugins/audiocapture/audioinputselector.h index 9eb34eda4..1c22e60df 100644 --- a/src/plugins/audiocapture/audioendpointselector.h +++ b/src/plugins/audiocapture/audioinputselector.h @@ -39,31 +39,31 @@ ** ****************************************************************************/ -#ifndef AUDIOENDPOINTSELECTOR_H -#define AUDIOENDPOINTSELECTOR_H +#ifndef AUDIOINPUTSELECTOR_H +#define AUDIOINPUTSELECTOR_H #include <QStringList> -#include "qaudioendpointselectorcontrol.h" +#include "qaudioinputselectorcontrol.h" class AudioCaptureSession; QT_USE_NAMESPACE -class AudioEndpointSelector : public QAudioEndpointSelectorControl +class AudioInputSelector : public QAudioInputSelectorControl { Q_OBJECT public: - AudioEndpointSelector(QObject *parent); - virtual ~AudioEndpointSelector(); + AudioInputSelector(QObject *parent); + virtual ~AudioInputSelector(); - QList<QString> availableEndpoints() const; - QString endpointDescription(const QString& name) const; - QString defaultEndpoint() const; - QString activeEndpoint() const; + QList<QString> availableInputs() const; + QString inputDescription(const QString& name) const; + QString defaultInput() const; + QString activeInput() const; public Q_SLOTS: - void setActiveEndpoint(const QString& name); + void setActiveInput(const QString& name); private: void update(); @@ -74,4 +74,4 @@ private: AudioCaptureSession* m_session; }; -#endif // AUDIOENDPOINTSELECTOR_H +#endif // AUDIOINPUTSELECTOR_H diff --git a/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp b/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp index 31bc995a2..312cd4772 100644 --- a/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp +++ b/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp @@ -46,7 +46,7 @@ DirectShowAudioEndpointControl::DirectShowAudioEndpointControl( DirectShowPlayerService *service, QObject *parent) - : QAudioEndpointSelectorControl(parent) + : QAudioOutputSelectorControl(parent) , m_service(service) , m_bindContext(0) , m_deviceEnumerator(0) @@ -56,7 +56,7 @@ DirectShowAudioEndpointControl::DirectShowAudioEndpointControl( updateEndpoints(); - setActiveEndpoint(m_defaultEndpoint); + setActiveOutput(m_defaultEndpoint); } } @@ -72,12 +72,12 @@ DirectShowAudioEndpointControl::~DirectShowAudioEndpointControl() m_deviceEnumerator->Release(); } -QList<QString> DirectShowAudioEndpointControl::availableEndpoints() const +QList<QString> DirectShowAudioEndpointControl::availableOutputs() const { return m_devices.keys(); } -QString DirectShowAudioEndpointControl::endpointDescription(const QString &name) const +QString DirectShowAudioEndpointControl::outputDescription(const QString &name) const { #ifdef __IPropertyBag_INTERFACE_DEFINED__ QString description; @@ -101,17 +101,17 @@ QString DirectShowAudioEndpointControl::endpointDescription(const QString &name) #endif } -QString DirectShowAudioEndpointControl::defaultEndpoint() const +QString DirectShowAudioEndpointControl::defaultOutput() const { return m_defaultEndpoint; } -QString DirectShowAudioEndpointControl::activeEndpoint() const +QString DirectShowAudioEndpointControl::activeOutput() const { return m_activeEndpoint; } -void DirectShowAudioEndpointControl::setActiveEndpoint(const QString &name) +void DirectShowAudioEndpointControl::setActiveOutput(const QString &name) { if (m_activeEndpoint == name) return; diff --git a/src/plugins/directshow/player/directshowaudioendpointcontrol.h b/src/plugins/directshow/player/directshowaudioendpointcontrol.h index 17863fd6b..bdfe0ad17 100644 --- a/src/plugins/directshow/player/directshowaudioendpointcontrol.h +++ b/src/plugins/directshow/player/directshowaudioendpointcontrol.h @@ -42,7 +42,7 @@ #ifndef DIRECTSHOWAUDIOENDPOINTCONTROL_H #define DIRECTSHOWAUDIOENDPOINTCONTROL_H -#include "qaudioendpointselectorcontrol.h" +#include "qaudiooutputselectorcontrol.h" #include <dshow.h> @@ -50,21 +50,21 @@ class DirectShowPlayerService; QT_USE_NAMESPACE -class DirectShowAudioEndpointControl : public QAudioEndpointSelectorControl +class DirectShowAudioEndpointControl : public QAudioOutputSelectorControl { Q_OBJECT public: DirectShowAudioEndpointControl(DirectShowPlayerService *service, QObject *parent = 0); ~DirectShowAudioEndpointControl(); - QList<QString> availableEndpoints() const; + QList<QString> availableOutputs() const; - QString endpointDescription(const QString &name) const; + QString outputDescription(const QString &name) const; - QString defaultEndpoint() const; - QString activeEndpoint() const; + QString defaultOutput() const; + QString activeOutput() const; - void setActiveEndpoint(const QString& name); + void setActiveOutput(const QString& name); private: void updateEndpoints(); diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp index ef6c66c3b..cee5603c4 100644 --- a/src/plugins/directshow/player/directshowplayerservice.cpp +++ b/src/plugins/directshow/player/directshowplayerservice.cpp @@ -156,7 +156,7 @@ QMediaControl *DirectShowPlayerService::requestControl(const char *name) { if (qstrcmp(name, QMediaPlayerControl_iid) == 0) { return m_playerControl; - } else if (qstrcmp(name, QAudioEndpointSelectorControl_iid) == 0) { + } else if (qstrcmp(name, QAudioOutputSelectorControl_iid) == 0) { return m_audioEndpointControl; } else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) { return m_metaDataControl; diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.cpp b/src/plugins/gstreamer/camerabin/camerabinservice.cpp index 6fd551d33..838be1b22 100644 --- a/src/plugins/gstreamer/camerabin/camerabinservice.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinservice.cpp @@ -62,7 +62,7 @@ #include "camerabincapturedestination.h" #include <private/qgstreamerbushelper_p.h> -#include <private/qgstreameraudioinputendpointselector_p.h> +#include <private/qgstreameraudioinputselector_p.h> #include <private/qgstreamervideoinputdevicecontrol_p.h> #if defined(HAVE_WIDGETS) @@ -95,7 +95,7 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent): m_cameraControl = 0; m_metaDataControl = 0; - m_audioInputEndpointSelector = 0; + m_audioInputSelector = 0; m_videoInputDevice = 0; m_videoOutput = 0; @@ -139,11 +139,11 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent): return; } - m_audioInputEndpointSelector = new QGstreamerAudioInputEndpointSelector(this); - connect(m_audioInputEndpointSelector, SIGNAL(activeEndpointChanged(QString)), m_captureSession, SLOT(setCaptureDevice(QString))); + m_audioInputSelector = new QGstreamerAudioInputSelector(this); + connect(m_audioInputSelector, SIGNAL(activeInputChanged(QString)), m_captureSession, SLOT(setCaptureDevice(QString))); - if (m_captureSession && m_audioInputEndpointSelector->availableEndpoints().size() > 0) - m_captureSession->setCaptureDevice(m_audioInputEndpointSelector->defaultEndpoint()); + if (m_captureSession && m_audioInputSelector->availableInputs().size() > 0) + m_captureSession->setCaptureDevice(m_audioInputSelector->defaultInput()); m_metaDataControl = new CameraBinMetaData(this); connect(m_metaDataControl, SIGNAL(metaDataChanged(QMap<QByteArray,QVariant>)), @@ -183,8 +183,8 @@ QMediaControl *CameraBinService::requestControl(const char *name) } } - if (qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0) - return m_audioInputEndpointSelector; + if (qstrcmp(name,QAudioInputSelectorControl_iid) == 0) + return m_audioInputSelector; if (qstrcmp(name,QVideoDeviceSelectorControl_iid) == 0) return m_videoInputDevice; diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.h b/src/plugins/gstreamer/camerabin/camerabinservice.h index f710eb867..aa760a3f2 100644 --- a/src/plugins/gstreamer/camerabin/camerabinservice.h +++ b/src/plugins/gstreamer/camerabin/camerabinservice.h @@ -47,7 +47,7 @@ #include <gst/gst.h> QT_BEGIN_NAMESPACE -class QAudioEndpointSelectorControl; +class QAudioInputSelectorControl; class QVideoDeviceSelectorControl; @@ -83,7 +83,7 @@ private: CameraBinControl *m_cameraControl; CameraBinMetaData *m_metaDataControl; - QAudioEndpointSelectorControl *m_audioInputEndpointSelector; + QAudioInputSelectorControl *m_audioInputSelector; QVideoDeviceSelectorControl *m_videoInputDevice; QMediaControl *m_videoOutput; diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp index 61c4e3d46..6e2d589ff 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp @@ -52,7 +52,7 @@ #include "qgstreamercapturemetadatacontrol.h" #include "qgstreamerimagecapturecontrol.h" -#include <private/qgstreameraudioinputendpointselector_p.h> +#include <private/qgstreameraudioinputselector_p.h> #include <private/qgstreamervideoinputdevicecontrol_p.h> #include <private/qgstreameraudioprobecontrol_p.h> @@ -75,7 +75,7 @@ QGstreamerCaptureService::QGstreamerCaptureService(const QString &service, QObje m_metaDataControl = 0; m_videoInput = 0; - m_audioInputEndpointSelector = 0; + m_audioInputSelector = 0; m_videoInputDevice = 0; m_videoOutput = 0; @@ -112,11 +112,11 @@ QGstreamerCaptureService::QGstreamerCaptureService(const QString &service, QObje m_imageCaptureControl = new QGstreamerImageCaptureControl(m_captureSession); } - m_audioInputEndpointSelector = new QGstreamerAudioInputEndpointSelector(this); - connect(m_audioInputEndpointSelector, SIGNAL(activeEndpointChanged(QString)), m_captureSession, SLOT(setCaptureDevice(QString))); + m_audioInputSelector = new QGstreamerAudioInputSelector(this); + connect(m_audioInputSelector, SIGNAL(activeInputChanged(QString)), m_captureSession, SLOT(setCaptureDevice(QString))); - if (m_captureSession && m_audioInputEndpointSelector->availableEndpoints().size() > 0) - m_captureSession->setCaptureDevice(m_audioInputEndpointSelector->defaultEndpoint()); + if (m_captureSession && m_audioInputSelector->availableInputs().size() > 0) + m_captureSession->setCaptureDevice(m_audioInputSelector->defaultInput()); m_metaDataControl = new QGstreamerCaptureMetaDataControl(this); connect(m_metaDataControl, SIGNAL(metaDataChanged(QMap<QByteArray,QVariant>)), @@ -132,8 +132,8 @@ QMediaControl *QGstreamerCaptureService::requestControl(const char *name) if (!m_captureSession) return 0; - if (qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0) - return m_audioInputEndpointSelector; + if (qstrcmp(name,QAudioInputSelectorControl_iid) == 0) + return m_audioInputSelector; if (qstrcmp(name,QVideoDeviceSelectorControl_iid) == 0) return m_videoInputDevice; diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h index d491cb823..2e26e46a8 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h +++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h @@ -48,7 +48,7 @@ #include <gst/gst.h> QT_BEGIN_NAMESPACE -class QAudioEndpointSelectorControl; +class QAudioInputSelectorControl; class QVideoDeviceSelectorControl; class QGstreamerCaptureSession; @@ -82,7 +82,7 @@ private: QGstreamerV4L2Input *m_videoInput; QGstreamerCaptureMetaDataControl *m_metaDataControl; - QAudioEndpointSelectorControl *m_audioInputEndpointSelector; + QAudioInputSelectorControl *m_audioInputSelector; QVideoDeviceSelectorControl *m_videoInputDevice; QMediaControl *m_videoOutput; diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp index ce4019c96..cf0fca4bb 100644 --- a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp +++ b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp @@ -43,11 +43,11 @@ #include "mfaudioendpointcontrol.h" MFAudioEndpointControl::MFAudioEndpointControl(QObject *parent) - : QAudioEndpointSelectorControl(parent) + : QAudioOutputSelectorControl(parent) , m_currentActivate(0) { updateEndpoints(); - setActiveEndpoint(m_defaultEndpoint); + setActiveOutput(m_defaultEndpoint); } MFAudioEndpointControl::~MFAudioEndpointControl() @@ -59,27 +59,27 @@ MFAudioEndpointControl::~MFAudioEndpointControl() m_currentActivate->Release(); } -QList<QString> MFAudioEndpointControl::availableEndpoints() const +QList<QString> MFAudioEndpointControl::availableOutputs() const { return m_devices.keys(); } -QString MFAudioEndpointControl::endpointDescription(const QString &name) const +QString MFAudioEndpointControl::outputDescription(const QString &name) const { return name.section(QLatin1Char('\\'), -1); } -QString MFAudioEndpointControl::defaultEndpoint() const +QString MFAudioEndpointControl::defaultOutput() const { return m_defaultEndpoint; } -QString MFAudioEndpointControl::activeEndpoint() const +QString MFAudioEndpointControl::activeOutput() const { return m_activeEndpoint; } -void MFAudioEndpointControl::setActiveEndpoint(const QString &name) +void MFAudioEndpointControl::setActiveOutput(const QString &name) { if (m_activeEndpoint == name) return; diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.h b/src/plugins/wmf/player/mfaudioendpointcontrol.h index 36d91f665..42f05576d 100644 --- a/src/plugins/wmf/player/mfaudioendpointcontrol.h +++ b/src/plugins/wmf/player/mfaudioendpointcontrol.h @@ -46,27 +46,27 @@ #include <mfidl.h> #include <mmdeviceapi.h> -#include "qaudioendpointselectorcontrol.h" +#include "qaudiooutputselectorcontrol.h" class MFPlayerService; QT_USE_NAMESPACE -class MFAudioEndpointControl : public QAudioEndpointSelectorControl +class MFAudioEndpointControl : public QAudioOutputSelectorControl { Q_OBJECT public: MFAudioEndpointControl(QObject *parent = 0); ~MFAudioEndpointControl(); - QList<QString> availableEndpoints() const; + QList<QString> availableOutputs() const; - QString endpointDescription(const QString &name) const; + QString outputDescription(const QString &name) const; - QString defaultEndpoint() const; - QString activeEndpoint() const; + QString defaultOutput() const; + QString activeOutput() const; - void setActiveEndpoint(const QString& name); + void setActiveOutput(const QString& name); IMFActivate* currentActivate() const; diff --git a/src/plugins/wmf/player/mfplayerservice.cpp b/src/plugins/wmf/player/mfplayerservice.cpp index 6ab9a997b..7e458123d 100644 --- a/src/plugins/wmf/player/mfplayerservice.cpp +++ b/src/plugins/wmf/player/mfplayerservice.cpp @@ -87,7 +87,7 @@ QMediaControl* MFPlayerService::requestControl(const char *name) { if (qstrcmp(name, QMediaPlayerControl_iid) == 0) { return m_player; - } else if (qstrcmp(name, QAudioEndpointSelectorControl_iid) == 0) { + } else if (qstrcmp(name, QAudioOutputSelectorControl_iid) == 0) { return m_audioEndpointControl; } else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) { return m_metaDataControl; |