summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
diff options
context:
space:
mode:
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2012-05-02 11:15:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-02 04:59:17 +0200
commitb36e2f5209e1278eb3b671cd14d23dc565ee2bae (patch)
tree435c7265334e176739020c0ecfb2c4a50411ff0a /src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
parentb7935a84d71b479f5320e5b062274d344835ba26 (diff)
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>
Diffstat (limited to 'src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp')
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
index 700517a1..2b7d7751 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
@@ -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)