Replaced QMediaRecorderControl::play/stop/pause with setState
This allows to introduce new states without breaking BC. Change-Id: I03c064cec92d6745b251a51cfb301e7f01f4b765 Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
b7935a84d7
commit
b36e2f5209
@@ -126,6 +126,21 @@ qint64 QGstreamerRecorderControl::duration() const
|
||||
return m_session->duration();
|
||||
}
|
||||
|
||||
void QGstreamerRecorderControl::setState(QMediaRecorder::State state)
|
||||
{
|
||||
switch (state) {
|
||||
case QMediaRecorder::StoppedState:
|
||||
stop();
|
||||
break;
|
||||
case QMediaRecorder::PausedState:
|
||||
pause();
|
||||
break;
|
||||
case QMediaRecorder::RecordingState:
|
||||
record();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void QGstreamerRecorderControl::record()
|
||||
{
|
||||
if (m_state == QMediaRecorder::RecordingState)
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
void applySettings();
|
||||
|
||||
public slots:
|
||||
void setState(QMediaRecorder::State state);
|
||||
void record();
|
||||
void pause();
|
||||
void stop();
|
||||
|
||||
Reference in New Issue
Block a user