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:
@@ -36,6 +36,11 @@ Project::Project() :
|
||||
autorecovery_saved_(true)
|
||||
{
|
||||
root_.set_project(this);
|
||||
|
||||
connect(&color_manager_, &ColorManager::ConfigChanged,
|
||||
this, &Project::ColorConfigChanged);
|
||||
connect(&color_manager_, &ColorManager::DefaultInputColorSpaceChanged,
|
||||
this, &Project::DefaultColorSpaceChanged);
|
||||
}
|
||||
|
||||
void Project::Load(QXmlStreamReader *reader, MainWindowLayoutInfo* layout, const QAtomicInt* cancelled)
|
||||
@@ -210,4 +215,30 @@ const QString &Project::cache_path(bool default_if_empty) const
|
||||
return cache_path_;
|
||||
}
|
||||
|
||||
void Project::ColorConfigChanged()
|
||||
{
|
||||
QList<ItemPtr> footage = this->get_items_of_type(Item::kFootage);
|
||||
|
||||
foreach (ItemPtr item, footage) {
|
||||
foreach (StreamPtr s, std::static_pointer_cast<Footage>(item)->streams()) {
|
||||
if (s->type() == Stream::kVideo) {
|
||||
std::static_pointer_cast<VideoStream>(s)->ColorConfigChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Project::DefaultColorSpaceChanged()
|
||||
{
|
||||
QList<ItemPtr> footage = this->get_items_of_type(Item::kFootage);
|
||||
|
||||
foreach (ItemPtr item, footage) {
|
||||
foreach (StreamPtr s, std::static_pointer_cast<Footage>(item)->streams()) {
|
||||
if (s->type() == Stream::kVideo) {
|
||||
std::static_pointer_cast<VideoStream>(s)->DefaultColorSpaceChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
Reference in New Issue
Block a user