*/
-#ifndef DCPOMATIC_SUBTITLE_CONTENT_H
-#define DCPOMATIC_SUBTITLE_CONTENT_H
+#ifndef DCPOMATIC_CAPTION_CONTENT_H
+#define DCPOMATIC_CAPTION_CONTENT_H
#include "content_part.h"
#include <libcxml/cxml.h>
};
/** @class TextContent
- * @brief Description of how some subtitle content should be presented.
+ * @brief Description of how some text content should be presented.
*
- * There are `image' subtitles (bitmaps) and `text' subtitles (plain text),
+ * There are `bitmap' subtitles and `plain' subtitles (plain text),
* and not all of the settings in this class correspond to both types.
*/
class TextContent : public ContentPart
{
public:
- explicit TextContent (Content* parent);
+ TextContent (Content* parent, TextType type, TextType original_type);
TextContent (Content* parent, std::vector<boost::shared_ptr<Content> >);
void as_xml (xmlpp::Node *) const;
return _type;
}
- static boost::shared_ptr<TextContent> from_xml (Content* parent, cxml::ConstNodePtr, int version);
+ TextType original_type () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _original_type;
+ }
+
+ static std::list<boost::shared_ptr<TextContent> > from_xml (Content* parent, cxml::ConstNodePtr, int version);
protected:
/** subtitle language (e.g. "German") or empty if it is not known */
boost::optional<ContentTime> _fade_in;
boost::optional<ContentTime> _fade_out;
int _outline_width;
+ /** what these captions will be used for in the output DCP (not necessarily what
+ * they were originally).
+ */
TextType _type;
+ /** the original type of these captions in their content */
+ TextType _original_type;
};
#endif