Replaced endpoint control with audio input and output controls
Change-Id: I981aabe39d106ced4ee1240db9e5b653c6fa5e91 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
29a2d09a43
commit
ae728a4b1e
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user