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:
itsmattkc
2020-11-18 13:48:14 +11:00
parent aeb7bc02b6
commit b3c3fe0fc8
28 changed files with 62 additions and 306 deletions
+11 -2
View File
@@ -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;
}
}