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
@@ -42,14 +42,14 @@
|
||||
#ifndef MOCKAUDIOENCODERCONTROL_H
|
||||
#define MOCKAUDIOENCODERCONTROL_H
|
||||
|
||||
#include "qaudioencodercontrol.h"
|
||||
#include "qaudioencodersettingscontrol.h"
|
||||
|
||||
class MockAudioEncoderControl : public QAudioEncoderControl
|
||||
class MockAudioEncoderControl : public QAudioEncoderSettingsControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MockAudioEncoderControl(QObject *parent):
|
||||
QAudioEncoderControl(parent)
|
||||
QAudioEncoderSettingsControl(parent)
|
||||
{
|
||||
m_codecs << "audio/pcm" << "audio/mpeg";
|
||||
m_descriptions << "Pulse Code Modulation" << "mp3 format";
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
#ifndef MOCKAUDIOENDPOINTSELECTOR_H
|
||||
#define MOCKAUDIOENDPOINTSELECTOR_H
|
||||
|
||||
#include "qaudioendpointselector.h"
|
||||
#include "qaudioendpointselectorcontrol.h"
|
||||
|
||||
class MockAudioEndpointSelector : public QAudioEndpointSelector
|
||||
class MockAudioEndpointSelector : public QAudioEndpointSelectorControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MockAudioEndpointSelector(QObject *parent):
|
||||
QAudioEndpointSelector(parent)
|
||||
QAudioEndpointSelectorControl(parent)
|
||||
{
|
||||
m_names << "device1" << "device2" << "device3";
|
||||
m_descriptions << "dev1 comment" << "dev2 comment" << "dev3 comment";
|
||||
|
||||
@@ -73,15 +73,15 @@ public:
|
||||
|
||||
QMediaControl* requestControl(const char *name)
|
||||
{
|
||||
if (hasControls && qstrcmp(name,QAudioEncoderControl_iid) == 0)
|
||||
if (hasControls && qstrcmp(name,QAudioEncoderSettingsControl_iid) == 0)
|
||||
return mockAudioEncoderControl;
|
||||
if (hasControls && qstrcmp(name,QAudioEndpointSelector_iid) == 0)
|
||||
if (hasControls && qstrcmp(name,QAudioEndpointSelectorControl_iid) == 0)
|
||||
return mockAudioEndpointSelector;
|
||||
if (hasControls && qstrcmp(name,QMediaRecorderControl_iid) == 0)
|
||||
return mockControl;
|
||||
if (hasControls && qstrcmp(name,QMediaContainerControl_iid) == 0)
|
||||
return mockFormatControl;
|
||||
if (hasControls && qstrcmp(name,QVideoEncoderControl_iid) == 0)
|
||||
if (hasControls && qstrcmp(name,QVideoEncoderSettingsControl_iid) == 0)
|
||||
return mockVideoEncoderControl;
|
||||
if (hasControls && qstrcmp(name, QMetaDataWriterControl_iid) == 0)
|
||||
return mockMetaDataControl;
|
||||
@@ -98,10 +98,10 @@ public:
|
||||
}
|
||||
|
||||
QMediaControl *mockControl;
|
||||
QAudioEndpointSelector *mockAudioEndpointSelector;
|
||||
QAudioEncoderControl *mockAudioEncoderControl;
|
||||
QAudioEndpointSelectorControl *mockAudioEndpointSelector;
|
||||
QAudioEncoderSettingsControl *mockAudioEncoderControl;
|
||||
QMediaContainerControl *mockFormatControl;
|
||||
QVideoEncoderControl *mockVideoEncoderControl;
|
||||
QVideoEncoderSettingsControl *mockVideoEncoderControl;
|
||||
MockMetaDataWriterControl *mockMetaDataControl;
|
||||
MockAvailabilityControl *mockAvailabilityControl;
|
||||
MockAudioProbeControl *mockAudioProbeControl;
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
#ifndef MOCKVIDEOENCODERCONTROL_H
|
||||
#define MOCKVIDEOENCODERCONTROL_H
|
||||
|
||||
#include "qvideoencodercontrol.h"
|
||||
#include "qvideoencodersettingscontrol.h"
|
||||
|
||||
class MockVideoEncoderControl : public QVideoEncoderControl
|
||||
class MockVideoEncoderControl : public QVideoEncoderSettingsControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MockVideoEncoderControl(QObject *parent):
|
||||
QVideoEncoderControl(parent)
|
||||
QVideoEncoderSettingsControl(parent)
|
||||
{
|
||||
m_videoCodecs << "video/3gpp" << "video/H264";
|
||||
m_sizes << QSize(320,240) << QSize(640,480);
|
||||
|
||||
Reference in New Issue
Block a user