X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.cc;h=f83c9563b29ce80cab262ad02c22c913219cf835;hb=391d85619ac19a2a93696ddc35c222eb9bb5d9d6;hp=e46d539f872c90fb1e130cdcd45049f77ddc169b;hpb=5dc2dbdb6639f8d617a40209ad603d2a38f9df2a;p=dcpomatic.git diff --git a/src/lib/player.cc b/src/lib/player.cc index e46d539f8..f83c9563b 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -201,7 +201,8 @@ Player::content_changed (weak_ptr w, int property, bool frequent) property == SubtitleContentProperty::USE_SUBTITLES || property == SubtitleContentProperty::SUBTITLE_X_OFFSET || property == SubtitleContentProperty::SUBTITLE_Y_OFFSET || - property == SubtitleContentProperty::SUBTITLE_SCALE || + property == SubtitleContentProperty::SUBTITLE_X_SCALE || + property == SubtitleContentProperty::SUBTITLE_Y_SCALE || property == VideoContentProperty::VIDEO_CROP || property == VideoContentProperty::VIDEO_SCALE || property == VideoContentProperty::VIDEO_FRAME_RATE @@ -260,8 +261,8 @@ Player::transform_image_subtitles (list subs) const * rect.x * _video_container_size.width and rect.y * _video_container_size.height. * * 2. that to shift the origin of the scale by subtitle_scale to the centre of the subtitle; this will be - * (width_before_subtitle_scale * (1 - subtitle_scale) / 2) and - * (height_before_subtitle_scale * (1 - subtitle_scale) / 2). + * (width_before_subtitle_scale * (1 - subtitle_x_scale) / 2) and + * (height_before_subtitle_scale * (1 - subtitle_y_scale) / 2). * * Combining these two translations gives these expressions. */ @@ -558,12 +559,12 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting) i->sub.rectangle.y += subtitle_content->subtitle_y_offset (); /* Apply content's subtitle scale */ - i->sub.rectangle.width *= subtitle_content->subtitle_scale (); - i->sub.rectangle.height *= subtitle_content->subtitle_scale (); + i->sub.rectangle.width *= subtitle_content->subtitle_x_scale (); + i->sub.rectangle.height *= subtitle_content->subtitle_y_scale (); /* Apply a corrective translation to keep the subtitle centred after that scale */ - i->sub.rectangle.x -= i->sub.rectangle.width * (subtitle_content->subtitle_scale() - 1); - i->sub.rectangle.y -= i->sub.rectangle.height * (subtitle_content->subtitle_scale() - 1); + i->sub.rectangle.x -= i->sub.rectangle.width * (subtitle_content->subtitle_x_scale() - 1); + i->sub.rectangle.y -= i->sub.rectangle.height * (subtitle_content->subtitle_y_scale() - 1); ps.image.push_back (i->sub); }