Use MXFAsset::_interop to decide on whether to write asset XML as Interop or SMPTE.
[libdcp.git] / src / subtitle_asset.h
index 4ef0794e7677a8cf245f4d6b5536caa51ef3274c..74ab98733961e166b360b043f9f52ba35c05b31d 100644 (file)
@@ -17,6 +17,9 @@
 
 */
 
+#ifndef LIBDCP_SUBTITLE_ASSET_H
+#define LIBDCP_SUBTITLE_ASSET_H
+
 #include <libcxml/cxml.h>
 #include "asset.h"
 #include "dcp_time.h"
@@ -109,9 +112,15 @@ private:
        std::string _font;
        bool _italic;
        Color _color;
+       /** Size in points as if the screen height is 11 inches, so a 72pt font
+        *  would be 1/11th of the screen height.
+        */ 
        int _size;
        Time _in;
        Time _out;
+       /** Vertical position as a proportion of the screen height from the top
+        *  (between 0 and 1)
+        */
        float _v_position;
        VAlign _v_align;
        std::string _text;
@@ -130,7 +139,7 @@ public:
        SubtitleAsset (std::string directory, std::string xml_file);
        SubtitleAsset (std::string directory, std::string movie_title, std::string language);
 
-       void write_to_cpl (xmlpp::Element *, bool) const;
+       void write_to_cpl (xmlpp::Element *) const;
        virtual bool equals (boost::shared_ptr<const Asset>, EqualityOptions, boost::function<void (NoteType, std::string)> note) const {
                /* XXX */
                note (ERROR, "subtitle assets not compared yet");
@@ -150,7 +159,7 @@ public:
 
        void read_xml (std::string);
        void write_xml () const;
-       void write_xml (std::ostream &) const;
+       Glib::ustring xml_as_string () const;
 
 private:
        std::string font_id_to_name (std::string id) const;
@@ -186,3 +195,5 @@ private:
 };
 
 }
+
+#endif