int const TextContentProperty::LANGUAGE_IS_ADDITIONAL = 517;
-TextContent::TextContent (Content* parent, TextType type, TextType original_type)
- : ContentPart (parent)
- , _use (false)
- , _burn (false)
- , _x_offset (0)
- , _y_offset (0)
- , _x_scale (1)
- , _y_scale (1)
- , _line_spacing (1)
- , _outline_width (4)
- , _type (type)
- , _original_type (original_type)
+TextContent::TextContent(Content* parent, TextType type, TextType original_type)
+ : ContentPart(parent)
+ , _use(false)
+ , _burn(false)
+ , _x_offset(0)
+ , _y_offset(0)
+ , _x_scale(1)
+ , _y_scale(1)
+ , _line_spacing(1)
+ , _outline_width(4)
+ , _type(type)
+ , _original_type(original_type)
{
}
* The vector could be empty if no TextContents are found.
*/
vector<shared_ptr<TextContent>>
-TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes)
+TextContent::from_xml(Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes)
{
if (version < 34) {
/* With old metadata FFmpeg content has the subtitle-related tags even with no
}
-TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes)
- : ContentPart (parent)
- , _use (false)
- , _burn (false)
- , _x_offset (0)
- , _y_offset (0)
- , _x_scale (1)
- , _y_scale (1)
- , _line_spacing (node->optional_number_child<double>("LineSpacing").get_value_or(1))
- , _outline_width (node->optional_number_child<int>("OutlineWidth").get_value_or(4))
- , _type (TextType::OPEN_SUBTITLE)
- , _original_type (TextType::OPEN_SUBTITLE)
+TextContent::TextContent(Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes)
+ : ContentPart(parent)
+ , _use(false)
+ , _burn(false)
+ , _x_offset(0)
+ , _y_offset(0)
+ , _x_scale(1)
+ , _y_scale(1)
+ , _line_spacing(node->optional_number_child<double>("LineSpacing").get_value_or(1))
+ , _outline_width(node->optional_number_child<int>("OutlineWidth").get_value_or(4))
+ , _type(TextType::OPEN_SUBTITLE)
+ , _original_type(TextType::OPEN_SUBTITLE)
{
if (version >= 37) {
- _use = node->bool_child ("Use");
- _burn = node->bool_child ("Burn");
+ _use = node->bool_child("Use");
+ _burn = node->bool_child("Burn");
} else if (version >= 32) {
- _use = node->bool_child ("UseSubtitles");
- _burn = node->bool_child ("BurnSubtitles");
+ _use = node->bool_child("UseSubtitles");
+ _burn = node->bool_child("BurnSubtitles");
}
if (version >= 37) {
- _x_offset = node->number_child<double> ("XOffset");
- _y_offset = node->number_child<double> ("YOffset");
+ _x_offset = node->number_child<double>("XOffset");
+ _y_offset = node->number_child<double>("YOffset");
} else if (version >= 7) {
- _x_offset = node->number_child<double> ("SubtitleXOffset");
- _y_offset = node->number_child<double> ("SubtitleYOffset");
+ _x_offset = node->number_child<double>("SubtitleXOffset");
+ _y_offset = node->number_child<double>("SubtitleYOffset");
} else {
- _y_offset = node->number_child<double> ("SubtitleOffset");
+ _y_offset = node->number_child<double>("SubtitleOffset");
}
if (node->optional_bool_child("Outline").get_value_or(false)) {
}
if (version >= 37) {
- _x_scale = node->number_child<double> ("XScale");
- _y_scale = node->number_child<double> ("YScale");
+ _x_scale = node->number_child<double>("XScale");
+ _y_scale = node->number_child<double>("YScale");
} else if (version >= 10) {
- _x_scale = node->number_child<double> ("SubtitleXScale");
- _y_scale = node->number_child<double> ("SubtitleYScale");
+ _x_scale = node->number_child<double>("SubtitleXScale");
+ _y_scale = node->number_child<double>("SubtitleYScale");
} else {
- _x_scale = _y_scale = node->number_child<double> ("SubtitleScale");
+ _x_scale = _y_scale = node->number_child<double>("SubtitleScale");
}
auto r = node->optional_number_child<int>("Red");
auto g = node->optional_number_child<int>("Green");
auto b = node->optional_number_child<int>("Blue");
if (r && g && b) {
- _colour = dcp::Colour (*r, *g, *b);
+ _colour = dcp::Colour(*r, *g, *b);
}
if (version >= 36) {
auto eg = node->optional_number_child<int>("EffectGreen");
auto eb = node->optional_number_child<int>("EffectBlue");
if (er && eg && eb) {
- _effect_colour = dcp::Colour (*er, *eg, *eb);
+ _effect_colour = dcp::Colour(*er, *eg, *eb);
}
} else {
- _effect_colour = dcp::Colour (
+ _effect_colour = dcp::Colour(
node->optional_number_child<int>("OutlineRed").get_value_or(255),
node->optional_number_child<int>("OutlineGreen").get_value_or(255),
node->optional_number_child<int>("OutlineBlue").get_value_or(255)
fi = node->optional_number_child<Frame>("SubtitleFadeIn");
}
if (fi) {
- _fade_in = ContentTime (*fi);
+ _fade_in = ContentTime(*fi);
}
optional<Frame> fo;
fo = node->optional_number_child<Frame>("SubtitleFadeOut");
}
if (fo) {
- _fade_out = ContentTime (*fo);
+ _fade_out = ContentTime(*fo);
}
- for (auto i: node->node_children ("Font")) {
- _fonts.push_back (make_shared<Font>(i));
+ for (auto i: node->node_children("Font")) {
+ _fonts.push_back(make_shared<Font>(i));
}
- connect_to_fonts ();
+ connect_to_fonts();
if (version >= 37) {
- _type = string_to_text_type (node->optional_string_child("Type").get_value_or("open"));
+ _type = string_to_text_type(node->optional_string_child("Type").get_value_or("open"));
if (node->optional_string_child("OriginalType")) {
- _original_type = string_to_text_type (node->optional_string_child("OriginalType").get());
+ _original_type = string_to_text_type(node->optional_string_child("OriginalType").get());
}
}
auto dt = node->optional_node_child("DCPTrack");
if (dt) {
- _dcp_track = DCPTextTrack (dt);
+ _dcp_track = DCPTextTrack(dt);
}
auto lang = node->optional_node_child("Language");
}
}
-TextContent::TextContent (Content* parent, vector<shared_ptr<Content>> c)
- : ContentPart (parent)
+TextContent::TextContent(Content* parent, vector<shared_ptr<Content>> c)
+ : ContentPart(parent)
{
/* This constructor is for join which is only supported for content types
that have a single text, so we can use only_text() here.
*/
auto ref = c[0]->only_text();
- DCPOMATIC_ASSERT (ref);
- auto ref_fonts = ref->fonts ();
+ DCPOMATIC_ASSERT(ref);
+ auto ref_fonts = ref->fonts();
for (size_t i = 1; i < c.size(); ++i) {
if (c[i]->only_text()->use() != ref->use()) {
- throw JoinError (_("Content to be joined must have the same 'use subtitles' setting."));
+ throw JoinError(_("Content to be joined must have the same 'use subtitles' setting."));
}
if (c[i]->only_text()->burn() != ref->burn()) {
- throw JoinError (_("Content to be joined must have the same 'burn subtitles' setting."));
+ throw JoinError(_("Content to be joined must have the same 'burn subtitles' setting."));
}
if (c[i]->only_text()->x_offset() != ref->x_offset()) {
- throw JoinError (_("Content to be joined must have the same subtitle X offset."));
+ throw JoinError(_("Content to be joined must have the same subtitle X offset."));
}
if (c[i]->only_text()->y_offset() != ref->y_offset()) {
- throw JoinError (_("Content to be joined must have the same subtitle Y offset."));
+ throw JoinError(_("Content to be joined must have the same subtitle Y offset."));
}
if (c[i]->only_text()->x_scale() != ref->x_scale()) {
- throw JoinError (_("Content to be joined must have the same subtitle X scale."));
+ throw JoinError(_("Content to be joined must have the same subtitle X scale."));
}
if (c[i]->only_text()->y_scale() != ref->y_scale()) {
- throw JoinError (_("Content to be joined must have the same subtitle Y scale."));
+ throw JoinError(_("Content to be joined must have the same subtitle Y scale."));
}
if (c[i]->only_text()->line_spacing() != ref->line_spacing()) {
- throw JoinError (_("Content to be joined must have the same subtitle line spacing."));
+ throw JoinError(_("Content to be joined must have the same subtitle line spacing."));
}
if ((c[i]->only_text()->fade_in() != ref->fade_in()) || (c[i]->only_text()->fade_out() != ref->fade_out())) {
- throw JoinError (_("Content to be joined must have the same subtitle fades."));
+ throw JoinError(_("Content to be joined must have the same subtitle fades."));
}
if ((c[i]->only_text()->outline_width() != ref->outline_width())) {
- throw JoinError (_("Content to be joined must have the same outline width."));
+ throw JoinError(_("Content to be joined must have the same outline width."));
}
- auto fonts = c[i]->only_text()->fonts ();
+ auto fonts = c[i]->only_text()->fonts();
if (fonts.size() != ref_fonts.size()) {
- throw JoinError (_("Content to be joined must use the same fonts."));
+ throw JoinError(_("Content to be joined must use the same fonts."));
}
if (c[i]->only_text()->dcp_track() != ref->dcp_track()) {
- throw JoinError (_("Content to be joined must use the same DCP track."));
+ throw JoinError(_("Content to be joined must use the same DCP track."));
}
if (c[i]->only_text()->language() != ref->language()) {
- throw JoinError (_("Content to be joined must use the same text language."));
+ throw JoinError(_("Content to be joined must use the same text language."));
}
if (c[i]->only_text()->language_is_additional() != ref->language_is_additional()) {
- throw JoinError (_("Content to be joined must both be main subtitle languages or both additional."));
+ throw JoinError(_("Content to be joined must both be main subtitle languages or both additional."));
}
- auto j = ref_fonts.begin ();
- auto k = fonts.begin ();
+ auto j = ref_fonts.begin();
+ auto k = fonts.begin();
- while (j != ref_fonts.end ()) {
+ while (j != ref_fonts.end()) {
if (**j != **k) {
- throw JoinError (_("Content to be joined must use the same fonts."));
+ throw JoinError(_("Content to be joined must use the same fonts."));
}
++j;
++k;
}
}
- _use = ref->use ();
- _burn = ref->burn ();
- _x_offset = ref->x_offset ();
- _y_offset = ref->y_offset ();
- _x_scale = ref->x_scale ();
- _y_scale = ref->y_scale ();
+ _use = ref->use();
+ _burn = ref->burn();
+ _x_offset = ref->x_offset();
+ _y_offset = ref->y_offset();
+ _x_scale = ref->x_scale();
+ _y_scale = ref->y_scale();
_fonts = ref_fonts;
- _line_spacing = ref->line_spacing ();
- _fade_in = ref->fade_in ();
- _fade_out = ref->fade_out ();
- _outline_width = ref->outline_width ();
- _type = ref->type ();
- _original_type = ref->original_type ();
- _dcp_track = ref->dcp_track ();
- _language = ref->language ();
- _language_is_additional = ref->language_is_additional ();
+ _line_spacing = ref->line_spacing();
+ _fade_in = ref->fade_in();
+ _fade_out = ref->fade_out();
+ _outline_width = ref->outline_width();
+ _type = ref->type();
+ _original_type = ref->original_type();
+ _dcp_track = ref->dcp_track();
+ _language = ref->language();
+ _language_is_additional = ref->language_is_additional();
- connect_to_fonts ();
+ connect_to_fonts();
}
/** _mutex must not be held on entry */
void
TextContent::as_xml(xmlpp::Element* root) const
{
- boost::mutex::scoped_lock lm (_mutex);
+ boost::mutex::scoped_lock lm(_mutex);
auto text = cxml::add_child(root, "Text");
}
string
-TextContent::identifier () const
+TextContent::identifier() const
{
auto s = fmt::to_string(x_scale())
+ "_" + fmt::to_string(y_scale())
}
void
-TextContent::add_font (shared_ptr<Font> font)
+TextContent::add_font(shared_ptr<Font> font)
{
boost::mutex::scoped_lock lm(_mutex);
DCPOMATIC_ASSERT(!get_font_unlocked(font->id()));
- _fonts.push_back (font);
- connect_to_fonts ();
+ _fonts.push_back(font);
+ connect_to_fonts();
}
void
-TextContent::connect_to_fonts ()
+TextContent::connect_to_fonts()
{
for (auto const& i: _font_connections) {
- i.disconnect ();
+ i.disconnect();
}
- _font_connections.clear ();
+ _font_connections.clear();
for (auto i: _fonts) {
- _font_connections.push_back (i->Changed.connect (boost::bind (&TextContent::font_changed, this)));
+ _font_connections.push_back(i->Changed.connect(boost::bind(&TextContent::font_changed, this)));
}
}
void
-TextContent::font_changed ()
+TextContent::font_changed()
{
/* XXX: too late */
- ContentChangeSignaller cc (_parent, TextContentProperty::FONTS);
+ ContentChangeSignaller cc(_parent, TextContentProperty::FONTS);
}
void
-TextContent::set_colour (dcp::Colour colour)
+TextContent::set_colour(dcp::Colour colour)
{
- maybe_set (_colour, colour, TextContentProperty::COLOUR);
+ maybe_set(_colour, colour, TextContentProperty::COLOUR);
}
void
-TextContent::unset_colour ()
+TextContent::unset_colour()
{
- maybe_set (_colour, optional<dcp::Colour>(), TextContentProperty::COLOUR);
+ maybe_set(_colour, optional<dcp::Colour>(), TextContentProperty::COLOUR);
}
void
-TextContent::set_effect (dcp::Effect e)
+TextContent::set_effect(dcp::Effect e)
{
- maybe_set (_effect, e, TextContentProperty::EFFECT);
+ maybe_set(_effect, e, TextContentProperty::EFFECT);
}
void
-TextContent::unset_effect ()
+TextContent::unset_effect()
{
- maybe_set (_effect, optional<dcp::Effect>(), TextContentProperty::EFFECT);
+ maybe_set(_effect, optional<dcp::Effect>(), TextContentProperty::EFFECT);
}
void
-TextContent::set_effect_colour (dcp::Colour colour)
+TextContent::set_effect_colour(dcp::Colour colour)
{
- maybe_set (_effect_colour, colour, TextContentProperty::EFFECT_COLOUR);
+ maybe_set(_effect_colour, colour, TextContentProperty::EFFECT_COLOUR);
}
void
-TextContent::unset_effect_colour ()
+TextContent::unset_effect_colour()
{
- maybe_set (_effect_colour, optional<dcp::Colour>(), TextContentProperty::EFFECT_COLOUR);
+ maybe_set(_effect_colour, optional<dcp::Colour>(), TextContentProperty::EFFECT_COLOUR);
}
void
-TextContent::set_use (bool u)
+TextContent::set_use(bool u)
{
- maybe_set (_use, u, TextContentProperty::USE);
+ maybe_set(_use, u, TextContentProperty::USE);
}
void
-TextContent::set_burn (bool b)
+TextContent::set_burn(bool b)
{
- maybe_set (_burn, b, TextContentProperty::BURN);
+ maybe_set(_burn, b, TextContentProperty::BURN);
}
void
-TextContent::set_x_offset (double o)
+TextContent::set_x_offset(double o)
{
- maybe_set (_x_offset, o, TextContentProperty::X_OFFSET);
+ maybe_set(_x_offset, o, TextContentProperty::X_OFFSET);
}
void
-TextContent::set_y_offset (double o)
+TextContent::set_y_offset(double o)
{
- maybe_set (_y_offset, o, TextContentProperty::Y_OFFSET);
+ maybe_set(_y_offset, o, TextContentProperty::Y_OFFSET);
}
void
-TextContent::set_x_scale (double s)
+TextContent::set_x_scale(double s)
{
- maybe_set (_x_scale, s, TextContentProperty::X_SCALE);
+ maybe_set(_x_scale, s, TextContentProperty::X_SCALE);
}
void
-TextContent::set_y_scale (double s)
+TextContent::set_y_scale(double s)
{
- maybe_set (_y_scale, s, TextContentProperty::Y_SCALE);
+ maybe_set(_y_scale, s, TextContentProperty::Y_SCALE);
}
void
-TextContent::set_line_spacing (double s)
+TextContent::set_line_spacing(double s)
{
- maybe_set (_line_spacing, s, TextContentProperty::LINE_SPACING);
+ maybe_set(_line_spacing, s, TextContentProperty::LINE_SPACING);
}
void
-TextContent::set_fade_in (ContentTime t)
+TextContent::set_fade_in(ContentTime t)
{
- maybe_set (_fade_in, t, TextContentProperty::FADE_IN);
+ maybe_set(_fade_in, t, TextContentProperty::FADE_IN);
}
void
-TextContent::unset_fade_in ()
+TextContent::unset_fade_in()
{
- maybe_set (_fade_in, optional<ContentTime>(), TextContentProperty::FADE_IN);
+ maybe_set(_fade_in, optional<ContentTime>(), TextContentProperty::FADE_IN);
}
void
-TextContent::set_fade_out (ContentTime t)
+TextContent::set_fade_out(ContentTime t)
{
- maybe_set (_fade_out, t, TextContentProperty::FADE_OUT);
+ maybe_set(_fade_out, t, TextContentProperty::FADE_OUT);
}
void
-TextContent::unset_fade_out ()
+TextContent::unset_fade_out()
{
- maybe_set (_fade_out, optional<ContentTime>(), TextContentProperty::FADE_OUT);
+ maybe_set(_fade_out, optional<ContentTime>(), TextContentProperty::FADE_OUT);
}
void
-TextContent::set_type (TextType type)
+TextContent::set_type(TextType type)
{
- maybe_set (_type, type, TextContentProperty::TYPE);
+ maybe_set(_type, type, TextContentProperty::TYPE);
}
void
-TextContent::set_outline_width (int w)
+TextContent::set_outline_width(int w)
{
- maybe_set (_outline_width, w, TextContentProperty::OUTLINE_WIDTH);
+ maybe_set(_outline_width, w, TextContentProperty::OUTLINE_WIDTH);
}
void
-TextContent::set_dcp_track (DCPTextTrack t)
+TextContent::set_dcp_track(DCPTextTrack t)
{
- maybe_set (_dcp_track, t, TextContentProperty::DCP_TRACK);
+ maybe_set(_dcp_track, t, TextContentProperty::DCP_TRACK);
}
void
-TextContent::unset_dcp_track ()
+TextContent::unset_dcp_track()
{
- maybe_set (_dcp_track, optional<DCPTextTrack>(), TextContentProperty::DCP_TRACK);
+ maybe_set(_dcp_track, optional<DCPTextTrack>(), TextContentProperty::DCP_TRACK);
}
void
-TextContent::set_language (optional<dcp::LanguageTag> language)
+TextContent::set_language(optional<dcp::LanguageTag> language)
{
- maybe_set (_language, language, TextContentProperty::LANGUAGE);
+ maybe_set(_language, language, TextContentProperty::LANGUAGE);
}
void
-TextContent::set_language_is_additional (bool additional)
+TextContent::set_language_is_additional(bool additional)
{
- maybe_set (_language_is_additional, additional, TextContentProperty::LANGUAGE_IS_ADDITIONAL);
+ maybe_set(_language_is_additional, additional, TextContentProperty::LANGUAGE_IS_ADDITIONAL);
}
void
-TextContent::take_settings_from (shared_ptr<const TextContent> c)
-{
- set_use (c->_use);
- set_burn (c->_burn);
- set_x_offset (c->_x_offset);
- set_y_offset (c->_y_offset);
- set_x_scale (c->_x_scale);
- set_y_scale (c->_y_scale);
- maybe_set (_fonts, c->_fonts, TextContentProperty::FONTS);
+TextContent::take_settings_from(shared_ptr<const TextContent> c)
+{
+ set_use(c->_use);
+ set_burn(c->_burn);
+ set_x_offset(c->_x_offset);
+ set_y_offset(c->_y_offset);
+ set_x_scale(c->_x_scale);
+ set_y_scale(c->_y_scale);
+ maybe_set(_fonts, c->_fonts, TextContentProperty::FONTS);
if (c->_colour) {
- set_colour (*c->_colour);
+ set_colour(*c->_colour);
} else {
- unset_colour ();
+ unset_colour();
}
if (c->_effect) {
- set_effect (*c->_effect);
+ set_effect(*c->_effect);
}
if (c->_effect_colour) {
- set_effect_colour (*c->_effect_colour);
+ set_effect_colour(*c->_effect_colour);
} else {
- unset_effect_colour ();
+ unset_effect_colour();
}
- set_line_spacing (c->_line_spacing);
+ set_line_spacing(c->_line_spacing);
if (c->_fade_in) {
- set_fade_in (*c->_fade_in);
+ set_fade_in(*c->_fade_in);
}
if (c->_fade_out) {
- set_fade_out (*c->_fade_out);
+ set_fade_out(*c->_fade_out);
}
- set_outline_width (c->_outline_width);
+ set_outline_width(c->_outline_width);
if (c->_dcp_track) {
- set_dcp_track (c->_dcp_track.get());
+ set_dcp_track(c->_dcp_track.get());
} else {
- unset_dcp_track ();
+ unset_dcp_track();
}
- set_language (c->_language);
- set_language_is_additional (c->_language_is_additional);
+ set_language(c->_language);
+ set_language_is_additional(c->_language_is_additional);
}
class TextContent : public ContentPart
{
public:
- TextContent (Content* parent, TextType type, TextType original_type);
- TextContent (Content* parent, std::vector<std::shared_ptr<Content>>);
- TextContent (Content* parent, cxml::ConstNodePtr, int version, std::list<std::string>& notes);
+ TextContent(Content* parent, TextType type, TextType original_type);
+ TextContent(Content* parent, std::vector<std::shared_ptr<Content>>);
+ TextContent(Content* parent, cxml::ConstNodePtr, int version, std::list<std::string>& notes);
void as_xml(xmlpp::Element*) const;
- std::string identifier () const;
- void take_settings_from (std::shared_ptr<const TextContent> c);
+ std::string identifier() const;
+ void take_settings_from(std::shared_ptr<const TextContent> c);
- void clear_fonts ();
- void add_font (std::shared_ptr<dcpomatic::Font> font);
+ void clear_fonts();
+ void add_font(std::shared_ptr<dcpomatic::Font> font);
std::shared_ptr<dcpomatic::Font> get_font(std::string id) const;
- void set_use (bool);
- void set_burn (bool);
- void set_x_offset (double);
- void set_y_offset (double);
- void set_x_scale (double);
- void set_y_scale (double);
- void set_colour (dcp::Colour);
- void unset_colour ();
- void set_effect (dcp::Effect);
- void unset_effect ();
- void set_effect_colour (dcp::Colour);
- void unset_effect_colour ();
- void set_line_spacing (double s);
- void set_fade_in (dcpomatic::ContentTime);
- void unset_fade_in ();
- 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 ();
- void set_language (boost::optional<dcp::LanguageTag> language = boost::none);
- void set_language_is_additional (bool additional);
-
- bool use () const {
- boost::mutex::scoped_lock lm (_mutex);
+ void set_use(bool);
+ void set_burn(bool);
+ void set_x_offset(double);
+ void set_y_offset(double);
+ void set_x_scale(double);
+ void set_y_scale(double);
+ void set_colour(dcp::Colour);
+ void unset_colour();
+ void set_effect(dcp::Effect);
+ void unset_effect();
+ void set_effect_colour(dcp::Colour);
+ void unset_effect_colour();
+ void set_line_spacing(double s);
+ void set_fade_in(dcpomatic::ContentTime);
+ void unset_fade_in();
+ 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();
+ void set_language(boost::optional<dcp::LanguageTag> language = boost::none);
+ void set_language_is_additional(bool additional);
+
+ bool use() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _use;
}
- bool burn () const {
- boost::mutex::scoped_lock lm (_mutex);
+ bool burn() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _burn;
}
- double x_offset () const {
- boost::mutex::scoped_lock lm (_mutex);
+ double x_offset() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _x_offset;
}
- double y_offset () const {
- boost::mutex::scoped_lock lm (_mutex);
+ double y_offset() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _y_offset;
}
- double x_scale () const {
- boost::mutex::scoped_lock lm (_mutex);
+ double x_scale() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _x_scale;
}
- double y_scale () const {
- boost::mutex::scoped_lock lm (_mutex);
+ double y_scale() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _y_scale;
}
- std::list<std::shared_ptr<dcpomatic::Font>> fonts () const {
- boost::mutex::scoped_lock lm (_mutex);
+ std::list<std::shared_ptr<dcpomatic::Font>> fonts() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _fonts;
}
- boost::optional<dcp::Colour> colour () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::optional<dcp::Colour> colour() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _colour;
}
- boost::optional<dcp::Effect> effect () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::optional<dcp::Effect> effect() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _effect;
}
- boost::optional<dcp::Colour> effect_colour () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::optional<dcp::Colour> effect_colour() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _effect_colour;
}
- double line_spacing () const {
- boost::mutex::scoped_lock lm (_mutex);
+ double line_spacing() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _line_spacing;
}
- boost::optional<dcpomatic::ContentTime> fade_in () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::optional<dcpomatic::ContentTime> fade_in() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _fade_in;
}
- boost::optional<dcpomatic::ContentTime> fade_out () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::optional<dcpomatic::ContentTime> fade_out() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _fade_out;
}
- int outline_width () const {
- boost::mutex::scoped_lock lm (_mutex);
+ int outline_width() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _outline_width;
}
- TextType type () const {
- boost::mutex::scoped_lock lm (_mutex);
+ TextType type() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _type;
}
- TextType original_type () const {
- boost::mutex::scoped_lock lm (_mutex);
+ TextType original_type() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _original_type;
}
- boost::optional<DCPTextTrack> dcp_track () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::optional<DCPTextTrack> dcp_track() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _dcp_track;
}
- boost::optional<dcp::LanguageTag> language () const {
- boost::mutex::scoped_lock lm (_mutex);
+ boost::optional<dcp::LanguageTag> language() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _language;
}
- bool language_is_additional () const {
- boost::mutex::scoped_lock lm (_mutex);
+ bool language_is_additional() const {
+ boost::mutex::scoped_lock lm(_mutex);
return _language_is_additional;
}
private:
friend struct ffmpeg_pts_offset_test;
- void font_changed ();
- void connect_to_fonts ();
+ void font_changed();
+ void connect_to_fonts();
std::shared_ptr<dcpomatic::Font> get_font_unlocked(std::string id) const;
std::list<boost::signals2::connection> _font_connections;