Gst capture: use QDesktopServices for default storage location
Change-Id: Icff46f2dc88572beab2eb835e24424f15ff05616 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
f9a3b9b00f
commit
ed7f02490d
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user