mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
9a844a075c
commit
b28dba6087
5 changed files with 83 additions and 47 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue