Basics of DCP subtitle import.
[dcpomatic.git] / src / lib / subtitle_content.cc
index 88e48b420150192118204d6469b296d5c49aec2d..8c94a94b995f7f35798dc3ec06f1a02a090890a4 100644 (file)
@@ -26,6 +26,7 @@
 #include "i18n.h"
 
 using std::string;
+using std::stringstream;
 using std::vector;
 using std::cout;
 using boost::shared_ptr;
@@ -155,3 +156,15 @@ SubtitleContent::set_subtitle_scale (double s)
        }
        signal_changed (SubtitleContentProperty::SUBTITLE_SCALE);
 }
+
+string
+SubtitleContent::identifier () const
+{
+       stringstream s;
+       s << Content::identifier()
+         << "_" << raw_convert<string> (subtitle_scale())
+         << "_" << raw_convert<string> (subtitle_x_offset())
+         << "_" << raw_convert<string> (subtitle_y_offset());
+
+       return s.str ();
+}