Split QMediaRecorder::setEncodingSettings to separate setters.

It's easier to change only the necessary part of encoding settings.
The settings are applied during the next event loop or before recording
starts.

Change-Id: Ia2b5c93826a302212aa7f79a0c75e4cbaaf1dd7a
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Dmytro Poplavskiy
2012-01-31 10:08:49 +10:00
committed by Qt by Nokia
parent 9d3102efe2
commit a22a0195f1
19 changed files with 231 additions and 80 deletions

View File

@@ -53,9 +53,12 @@ class MockMediaRecorderControl : public QMediaRecorderControl
public:
MockMediaRecorderControl(QObject *parent = 0):
QMediaRecorderControl(parent),
m_state(QMediaRecorder::StoppedState),
m_position(0),
m_muted(false) {}
m_state(QMediaRecorder::StoppedState),
m_position(0),
m_muted(false),
m_settingAppliedCount(0)
{
}
QUrl outputLocation() const
{
@@ -83,7 +86,10 @@ public:
return m_muted;
}
void applySettings() {}
void applySettings()
{
m_settingAppliedCount++;
}
using QMediaRecorderControl::error;
@@ -120,6 +126,7 @@ public:
QMediaRecorder::State m_state;
qint64 m_position;
bool m_muted;
int m_settingAppliedCount;
};
#endif // MOCKRECORDERCONTROL_H