added probe on import functionality

This commit is contained in:
itsmattkc
2019-06-27 08:51:44 -07:00
parent d133ee9832
commit 955f80c622
14 changed files with 231 additions and 33 deletions
+17 -1
View File
@@ -1,8 +1,24 @@
#include "probeserver.h"
#include <QApplication>
#include <QDebug>
#include "decoder/ffmpeg/ffmpegdecoder.h"
bool olive::Probe(Footage *f)
bool olive::ProbeMedia(Footage *f)
{
// Check for a valid filename
if (f->filename().isEmpty()) {
qWarning() << QCoreApplication::translate("ProbeMedia", "Tried to probe media with an empty filename");
return false;
}
FFmpegDecoder ff_dec;
// Pass footage through FFmpeg's probe function
if (ff_dec.Probe(f)) {
return true;
}
return false;
}