Basic template support (#485).
[dcpomatic.git] / src / lib / image_content.cc
index d4e73677113dd72a64396ae1bb0c6822d1f5fb60..b27483978c157f8ca86b934c8b37d5e6e5bd9e58 100644 (file)
@@ -26,7 +26,6 @@
 #include "job.h"
 #include "frame_rate_change.h"
 #include "exceptions.h"
-#include "safe_stringstream.h"
 #include "image_filename_sorter.h"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
@@ -101,10 +100,10 @@ ImageContent::technical_summary () const
 }
 
 void
-ImageContent::as_xml (xmlpp::Node* node) const
+ImageContent::as_xml (xmlpp::Node* node, bool with_paths) const
 {
        node->add_child("Type")->add_child_text ("Image");
-       Content::as_xml (node);
+       Content::as_xml (node, with_paths);
 
        if (video) {
                video->as_xml (node);
@@ -136,11 +135,9 @@ ImageContent::full_length () const
 string
 ImageContent::identifier () const
 {
-       SafeStringStream s;
-       s << Content::identifier();
-       s << "_" << video->identifier ();
-       s << "_" << video->length();
-       return s.str ();
+       char buffer[256];
+       snprintf (buffer, sizeof(buffer), "%s_%s_%" PRId64, Content::identifier().c_str(), video->identifier().c_str(), video->length());
+       return buffer;
 }
 
 bool