Try to fix some warnings.
[dcpomatic.git] / src / lib / text_content.h
index 0327d4a97bbbad9ab7beac32be84a2af65486314..83860dff54fb6f733356a30de07833b282a7d336 100644 (file)
@@ -22,6 +22,7 @@
 #define DCPOMATIC_CAPTION_CONTENT_H
 
 #include "content_part.h"
+#include "dcp_text_track.h"
 #include <libcxml/cxml.h>
 #include <dcp/types.h>
 #include <boost/signals2.hpp>
@@ -37,7 +38,6 @@ public:
        static int const Y_SCALE;
        static int const USE;
        static int const BURN;
-       static int const NAME;
        static int const LANGUAGE;
        static int const FONTS;
        static int const COLOUR;
@@ -48,6 +48,7 @@ public:
        static int const FADE_OUT;
        static int const OUTLINE_WIDTH;
        static int const TYPE;
+       static int const DCP_TRACK;
 };
 
 /** @class TextContent
@@ -74,7 +75,6 @@ public:
        void set_y_offset (double);
        void set_x_scale (double);
        void set_y_scale (double);
-       void set_name (std::string name);
        void set_language (std::string language);
        void set_colour (dcp::Colour);
        void unset_colour ();
@@ -89,6 +89,8 @@ public:
        void set_outline_width (int);
        void unset_fade_out ();
        void set_type (TextType type);
+       void set_dcp_track (DCPTextTrack track);
+       void unset_dcp_track ();
 
        bool use () const {
                boost::mutex::scoped_lock lm (_mutex);
@@ -125,11 +127,6 @@ public:
                return _fonts;
        }
 
-       std::string name () const {
-               boost::mutex::scoped_lock lm (_mutex);
-               return _name;
-       }
-
        std::string language () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _language;
@@ -180,11 +177,14 @@ public:
                return _original_type;
        }
 
+       boost::optional<DCPTextTrack> dcp_track () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               return _dcp_track;
+       }
+
        static std::list<boost::shared_ptr<TextContent> > from_xml (Content* parent, cxml::ConstNodePtr, int version);
 
 protected:
-       /** Name (annotation text) for this subtitle */
-       std::string _name;
        /** subtitle language (e.g. "German") or empty if it is not known */
        std::string _language;
 
@@ -226,6 +226,8 @@ private:
        TextType _type;
        /** the original type of these captions in their content */
        TextType _original_type;
+       /** the track of closed captions that this content should be put in, or empty to put in the default (only) track */
+       boost::optional<DCPTextTrack> _dcp_track;
 };
 
 #endif