#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>
static int const FADE_OUT;
static int const OUTLINE_WIDTH;
static int const TYPE;
+ static int const DCP_TRACK;
};
/** @class TextContent
class TextContent : public ContentPart
{
public:
- TextContent (Content* parent, TextType original_type);
+ TextContent (Content* parent, TextType type, TextType original_type);
TextContent (Content* parent, std::vector<boost::shared_ptr<Content> >);
void as_xml (xmlpp::Node *) const;
void set_effect_colour (dcp::Colour);
void unset_effect_colour ();
void set_line_spacing (double s);
- void set_fade_in (ContentTime);
+ void set_fade_in (dcpomatic::ContentTime);
void unset_fade_in ();
- void set_fade_out (ContentTime);
+ void set_fade_out (dcpomatic::ContentTime);
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);
return _line_spacing;
}
- boost::optional<ContentTime> fade_in () const {
+ boost::optional<dcpomatic::ContentTime> fade_in () const {
boost::mutex::scoped_lock lm (_mutex);
return _fade_in;
}
- boost::optional<ContentTime> fade_out () const {
+ boost::optional<dcpomatic::ContentTime> fade_out () const {
boost::mutex::scoped_lock lm (_mutex);
return _fade_out;
}
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:
boost::optional<dcp::Colour> _effect_colour;
/** scaling factor for line spacing; 1 is "standard", < 1 is closer together, > 1 is further apart */
double _line_spacing;
- boost::optional<ContentTime> _fade_in;
- boost::optional<ContentTime> _fade_out;
+ boost::optional<dcpomatic::ContentTime> _fade_in;
+ boost::optional<dcpomatic::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;
+ /** 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