merged video and audio nodes into a single media node
They performed exactly the same function so I don't think we need the clutter. Also bumped the project version, but old projects are automatically converted.
This commit is contained in:
@@ -45,7 +45,7 @@ Sequence::Sequence()
|
||||
AddNode(viewer_output_);
|
||||
}
|
||||
|
||||
void Sequence::Load(QXmlStreamReader *reader, XMLNodeData& xml_node_data, const QAtomicInt *cancelled)
|
||||
void Sequence::Load(QXmlStreamReader *reader, XMLNodeData& xml_node_data, uint version, const QAtomicInt *cancelled)
|
||||
{
|
||||
{
|
||||
XMLAttributeLoop(reader, attr) {
|
||||
@@ -130,7 +130,16 @@ void Sequence::Load(QXmlStreamReader *reader, XMLNodeData& xml_node_data, const
|
||||
{
|
||||
XMLAttributeLoop(reader, attr) {
|
||||
if (attr.name() == QStringLiteral("id")) {
|
||||
node = NodeFactory::CreateFromID(attr.value().toString());
|
||||
QString id = attr.value().toString();
|
||||
if (version <= 201003) {
|
||||
// After version 201003, the video and audio nodes were merged into one media node
|
||||
if (id == QStringLiteral("org.olivevideoeditor.Olive.audioinput")
|
||||
|| id == QStringLiteral("org.olivevideoeditor.Olive.videoinput")) {
|
||||
id = QStringLiteral("org.olivevideoeditor.Olive.mediainput");
|
||||
}
|
||||
}
|
||||
|
||||
node = NodeFactory::CreateFromID(id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user