diff --git a/SessionCreator.cpp b/SessionCreator.cpp index c7b4d16..b61aca0 100644 --- a/SessionCreator.cpp +++ b/SessionCreator.cpp @@ -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"; diff --git a/SessionVisitor.cpp b/SessionVisitor.cpp index 5708f82..1d3de56 100644 --- a/SessionVisitor.cpp +++ b/SessionVisitor.cpp @@ -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);