mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 18:59:59 +01:00
Added Total count of source in Session mix info
This commit is contained in:
@@ -64,8 +64,12 @@ SessionInformation SessionCreator::info(const std::string& filename)
|
||||
|
||||
const XMLElement *header = doc.FirstChildElement(APP_NAME);
|
||||
if (header != nullptr) {
|
||||
int s = header->IntAttribute("size");
|
||||
ret.description = std::to_string( s ) + " source" + ( s > 1 ? "s\n" : "\n");
|
||||
uint s = header->UnsignedAttribute("size");
|
||||
ret.description = std::to_string( s ) + " source" + ( s > 1 ? "s" : "");
|
||||
uint t = header->UnsignedAttribute("total");
|
||||
if (t>s)
|
||||
ret.description += " (" + std::to_string(t) + " in total)";
|
||||
ret.description += "\n";
|
||||
const char *att_string = header->Attribute("resolution");
|
||||
if (att_string)
|
||||
ret.description += std::string( att_string ) + "\n";
|
||||
|
||||
@@ -61,6 +61,7 @@ bool SessionVisitor::saveSession(const std::string& filename, Session *session)
|
||||
rootnode->SetAttribute("major", XML_VERSION_MAJOR);
|
||||
rootnode->SetAttribute("minor", XML_VERSION_MINOR);
|
||||
rootnode->SetAttribute("size", session->size());
|
||||
rootnode->SetAttribute("total", session->numSources());
|
||||
rootnode->SetAttribute("date", SystemToolkit::date_time_string().c_str());
|
||||
rootnode->SetAttribute("resolution", session->frame()->info().c_str());
|
||||
xmlDoc.InsertEndChild(rootnode);
|
||||
|
||||
Reference in New Issue
Block a user