footage: merge video and image streams and improve image sequence import process
Image streams were initially separated from video streams, but they're now joined with a parameter defining if they're a still image, image sequence, or regular video. The image sequence import process has also improved so that if images from the same sequence are imported too, they'll either be ignored or the user won't be asked again for those if they should be an image sequence (fixes #1193). Also shifts decoder "probe" process to return an item, useful if the decoder returns a non-footage item.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "otiodecoder.h"
|
||||
|
||||
#include <opentimelineio/timeline.h>
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
OTIODecoder::OTIODecoder()
|
||||
@@ -32,9 +34,21 @@ QString OTIODecoder::id()
|
||||
return QStringLiteral("otio");
|
||||
}
|
||||
|
||||
bool OTIODecoder::Probe(Footage* f, const QAtomicInt* cancelled)
|
||||
ItemPtr OTIODecoder::Probe(const QString& filename, const QAtomicInt* cancelled) const
|
||||
{
|
||||
return false;
|
||||
if (filename.endsWith(QStringLiteral(".otio"), Qt::CaseInsensitive)) {
|
||||
opentimelineio::v1_0::ErrorStatus es;
|
||||
|
||||
auto timeline = static_cast<opentimelineio::v1_0::Timeline*>(opentimelineio::v1_0::SerializableObjectWithMetadata::from_json_file(filename.toStdString(), &es));
|
||||
|
||||
if (es != opentimelineio::v1_0::ErrorStatus::OK) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
qDebug() << "Found" << timeline->video_tracks().size() << "video tracks";
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
Reference in New Issue
Block a user