}
}
-void
-SubtitleContent::set_use_subtitles (bool u)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _use_subtitles = u;
- }
- _parent->signal_changed (SubtitleContentProperty::USE_SUBTITLES);
-}
-
-void
-SubtitleContent::set_burn_subtitles (bool b)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _burn_subtitles = b;
- }
- _parent->signal_changed (SubtitleContentProperty::BURN_SUBTITLES);
-}
-
-void
-SubtitleContent::set_subtitle_x_offset (double o)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _subtitle_x_offset = o;
- }
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_X_OFFSET);
-}
-
-void
-SubtitleContent::set_subtitle_y_offset (double o)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _subtitle_y_offset = o;
- }
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_Y_OFFSET);
-}
-
-void
-SubtitleContent::set_subtitle_x_scale (double s)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _subtitle_x_scale = s;
- }
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_X_SCALE);
-}
-
-void
-SubtitleContent::set_subtitle_y_scale (double s)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _subtitle_y_scale = s;
- }
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_Y_SCALE);
-}
-
-void
-SubtitleContent::set_subtitle_language (string language)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _subtitle_language = language;
- }
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_LANGUAGE);
-}
-
string
SubtitleContent::identifier () const
{
void
SubtitleContent::set_colour (dcp::Colour colour)
{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_colour == colour) {
- return;
- }
+ maybe_set (_colour, colour, SubtitleContentProperty::SUBTITLE_COLOUR);
+}
- _colour = colour;
- }
+void
+SubtitleContent::set_outline (bool o)
+{
+ maybe_set (_outline, o, SubtitleContentProperty::SUBTITLE_OUTLINE);
+}
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_COLOUR);
+void
+SubtitleContent::set_outline_colour (dcp::Colour colour)
+{
+ maybe_set (_outline_colour, colour, SubtitleContentProperty::SUBTITLE_OUTLINE_COLOUR);
}
void
-SubtitleContent::set_outline (bool o)
+SubtitleContent::set_use_subtitles (bool u)
{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_outline == o) {
- return;
- }
+ maybe_set (_use_subtitles, u, SubtitleContentProperty::USE_SUBTITLES);
+}
- _outline = o;
- }
+void
+SubtitleContent::set_burn_subtitles (bool b)
+{
+ maybe_set (_burn_subtitles, b, SubtitleContentProperty::BURN_SUBTITLES);
+}
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_OUTLINE);
+void
+SubtitleContent::set_subtitle_x_offset (double o)
+{
+ maybe_set (_subtitle_x_offset, o, SubtitleContentProperty::SUBTITLE_X_OFFSET);
}
void
-SubtitleContent::set_outline_colour (dcp::Colour colour)
+SubtitleContent::set_subtitle_y_offset (double o)
{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_outline_colour == colour) {
- return;
- }
+ maybe_set (_subtitle_y_offset, o, SubtitleContentProperty::SUBTITLE_Y_OFFSET);
+}
- _outline_colour = colour;
- }
+void
+SubtitleContent::set_subtitle_x_scale (double s)
+{
+ maybe_set (_subtitle_x_scale, s, SubtitleContentProperty::SUBTITLE_X_SCALE);
+}
+
+void
+SubtitleContent::set_subtitle_y_scale (double s)
+{
+ maybe_set (_subtitle_y_scale, s, SubtitleContentProperty::SUBTITLE_Y_SCALE);
+}
- _parent->signal_changed (SubtitleContentProperty::SUBTITLE_OUTLINE_COLOUR);
+void
+SubtitleContent::set_subtitle_language (string language)
+{
+ maybe_set (_subtitle_language, language, SubtitleContentProperty::SUBTITLE_LANGUAGE);
}
_parent->signal_changed (ContentProperty::LENGTH);
}
-void
-VideoContent::set_left_crop (int c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
-
- if (_crop.left == c) {
- return;
- }
-
- _crop.left = c;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_CROP);
-}
-
-void
-VideoContent::set_right_crop (int c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_crop.right == c) {
- return;
- }
-
- _crop.right = c;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_CROP);
-}
-
-void
-VideoContent::set_top_crop (int c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_crop.top == c) {
- return;
- }
-
- _crop.top = c;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_CROP);
-}
-
-void
-VideoContent::set_bottom_crop (int c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_crop.bottom == c) {
- return;
- }
-
- _crop.bottom = c;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_CROP);
-}
-
-void
-VideoContent::set_scale (VideoContentScale s)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_scale == s) {
- return;
- }
-
- _scale = s;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_SCALE);
-}
-
/** @return string which includes everything about how this content looks */
string
VideoContent::identifier () const
return s.str ();
}
-void
-VideoContent::set_video_frame_type (VideoFrameType t)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _video_frame_type = t;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_FRAME_TYPE);
-}
-
string
VideoContent::technical_summary () const
{
DCPOMATIC_ASSERT (false);
}
-void
-VideoContent::unset_colour_conversion ()
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _colour_conversion = boost::optional<ColourConversion> ();
- }
-
- _parent->signal_changed (VideoContentProperty::COLOUR_CONVERSION);
-}
-
-void
-VideoContent::set_colour_conversion (ColourConversion c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _colour_conversion = c;
- }
-
- _parent->signal_changed (VideoContentProperty::COLOUR_CONVERSION);
-}
-
-void
-VideoContent::set_fade_in (Frame t)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _fade_in = t;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_FADE_IN);
-}
-
-void
-VideoContent::set_fade_out (Frame t)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _fade_out = t;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_FADE_OUT);
-}
-
/** @return Video size after 3D split and crop */
dcp::Size
VideoContent::video_size_after_crop () const
set_bottom_crop (0);
}
-void
-VideoContent::set_video_frame_rate (double r)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_video_frame_rate == r) {
- return;
- }
-
- _video_frame_rate = r;
- }
-
- _parent->signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
-}
-
/** @param f Frame index within the whole (untrimmed) content */
optional<double>
VideoContent::fade (Frame f) const
void
VideoContent::set_video_length (Frame len)
{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _video_length = len;
- }
+ maybe_set (_video_length, len, ContentProperty::LENGTH);
+}
- _parent->signal_changed (ContentProperty::LENGTH);
+void
+VideoContent::set_left_crop (int c)
+{
+ maybe_set (_crop.left, c, VideoContentProperty::VIDEO_CROP);
+}
+
+void
+VideoContent::set_right_crop (int c)
+{
+ maybe_set (_crop.right, c, VideoContentProperty::VIDEO_CROP);
+}
+
+void
+VideoContent::set_top_crop (int c)
+{
+ maybe_set (_crop.top, c, VideoContentProperty::VIDEO_CROP);
+}
+
+void
+VideoContent::set_bottom_crop (int c)
+{
+ maybe_set (_crop.bottom, c, VideoContentProperty::VIDEO_CROP);
+}
+
+void
+VideoContent::set_scale (VideoContentScale s)
+{
+ maybe_set (_scale, s, VideoContentProperty::VIDEO_SCALE);
+}
+
+void
+VideoContent::set_video_frame_rate (double r)
+{
+ maybe_set (_video_frame_rate, r, VideoContentProperty::VIDEO_FRAME_RATE);
+}
+
+void
+VideoContent::set_video_frame_type (VideoFrameType t)
+{
+ maybe_set (_video_frame_type, t, VideoContentProperty::VIDEO_FRAME_TYPE);
+}
+
+void
+VideoContent::unset_colour_conversion ()
+{
+ maybe_set (_colour_conversion, boost::optional<ColourConversion> (), VideoContentProperty::COLOUR_CONVERSION);
+}
+
+void
+VideoContent::set_colour_conversion (ColourConversion c)
+{
+ maybe_set (_colour_conversion, c, VideoContentProperty::COLOUR_CONVERSION);
+}
+
+void
+VideoContent::set_fade_in (Frame t)
+{
+ maybe_set (_fade_in, t, VideoContentProperty::VIDEO_FADE_IN);
+}
+
+void
+VideoContent::set_fade_out (Frame t)
+{
+ maybe_set (_fade_out, t, VideoContentProperty::VIDEO_FADE_OUT);
}