mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 19:29:58 +01:00
Minor improvement XML
Do not save timeline for single frame media
This commit is contained in:
@@ -152,6 +152,8 @@ void SessionVisitor::visit(MediaPlayer &n)
|
|||||||
{
|
{
|
||||||
XMLElement *newelement = xmlDoc_->NewElement("MediaPlayer");
|
XMLElement *newelement = xmlDoc_->NewElement("MediaPlayer");
|
||||||
newelement->SetAttribute("id", n.id());
|
newelement->SetAttribute("id", n.id());
|
||||||
|
|
||||||
|
if (!n.isImage()) {
|
||||||
newelement->SetAttribute("play", n.isPlaying());
|
newelement->SetAttribute("play", n.isPlaying());
|
||||||
newelement->SetAttribute("loop", (int) n.loop());
|
newelement->SetAttribute("loop", (int) n.loop());
|
||||||
newelement->SetAttribute("speed", n.playSpeed());
|
newelement->SetAttribute("speed", n.playSpeed());
|
||||||
@@ -175,8 +177,9 @@ void SessionVisitor::visit(MediaPlayer &n)
|
|||||||
XMLElement *array = XMLElementEncodeArray(xmlDoc_, n.timeline()->fadingArray(), MAX_TIMELINE_ARRAY * sizeof(float));
|
XMLElement *array = XMLElementEncodeArray(xmlDoc_, n.timeline()->fadingArray(), MAX_TIMELINE_ARRAY * sizeof(float));
|
||||||
fadingelement->InsertEndChild(array);
|
fadingelement->InsertEndChild(array);
|
||||||
timelineelement->InsertEndChild(fadingelement);
|
timelineelement->InsertEndChild(fadingelement);
|
||||||
|
|
||||||
newelement->InsertEndChild(timelineelement);
|
newelement->InsertEndChild(timelineelement);
|
||||||
|
}
|
||||||
|
|
||||||
xmlCurrent_->InsertEndChild(newelement);
|
xmlCurrent_->InsertEndChild(newelement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user