diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-05-15 20:47:35 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-08 07:41:15 -0700 |
commit | b28dba6087f0433af8ece176b64fcac54ca370a4 (patch) | |
tree | 58301772930e3f50f64a92da2bbd1ac1cbc84e3e /core/qthelper.cpp | |
parent | 9a844a075c0e964a21a3bfef22324fbcec88544d (diff) | |
download | subsurface-b28dba6087f0433af8ece176b64fcac54ca370a4.tar.gz |
Dive pictures: Recognize video files
When generating thumbnails, test for video files. If it is, use
a dummy-thumbnail. Write only the type (video), but no image to
the thumbnail cache, for forward-compatibility.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 299f8771b..ed3de1a11 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -1209,11 +1209,19 @@ QString localFilePath(const QString &originalFilename) return localFilenameOf.value(originalFilename, originalFilename); } +// TODO: Apparently Qt has no simple way of listing the supported video +// codecs? Do we have to query them by hand using QMediaPlayer::hasSupport()? +const QStringList videoExtensionsList = { + ".avi", ".mp4", ".mpeg", ".mpg", ".wmv" +}; + QStringList imageExtensionFilters() { QStringList filters; foreach (QString format, QImageReader::supportedImageFormats()) { filters.append(QString("*.").append(format)); } + foreach (const QString &format, videoExtensionsList) + filters.append("*" + format); return filters; } |