summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediacapture
diff options
context:
space:
mode:
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2012-07-05 13:30:47 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-09 04:50:09 +0200
commited7f02490d2344377b878a4dda62cb5be1c22287 (patch)
tree8047b67a9cf22c208542dfd5c08dba8f60e0c85b /src/plugins/gstreamer/mediacapture
parentf9a3b9b00fbd92072c72bf1cb0de7052f12d93d3 (diff)
Gst capture: use QDesktopServices for default storage location
Change-Id: Icff46f2dc88572beab2eb835e24424f15ff05616 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'src/plugins/gstreamer/mediacapture')
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
index 6ac760562..3ff148e08 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
@@ -44,6 +44,7 @@
#include "qgstreamervideoencode.h"
#include "qgstreamermediacontainercontrol.h"
#include <QtCore/QDebug>
+#include <QtGui/qdesktopservices.h>
QGstreamerRecorderControl::QGstreamerRecorderControl(QGstreamerCaptureSession *session)
:QMediaRecorderControl(session),
@@ -321,6 +322,11 @@ QDir QGstreamerRecorderControl::defaultDir() const
dirCandidates << QLatin1String("/home/user/MyDocs");
#endif
+ if (m_session->captureMode() & QGstreamerCaptureSession::Video)
+ dirCandidates << QDesktopServices::storageLocation(QDesktopServices::MoviesLocation);
+ else
+ dirCandidates << QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
+
dirCandidates << QDir::home().filePath("Documents");
dirCandidates << QDir::home().filePath("My Documents");
dirCandidates << QDir::homePath();