using std::list;
using std::make_pair;
using std::make_shared;
-using std::map;
using std::max;
using std::min;
using std::min;
int const PlayerProperty::PLAYBACK_LENGTH = 705;
-Player::Player (shared_ptr<const Film> film, bool aligned)
+Player::Player (shared_ptr<const Film> film, Image::Alignment subtitle_alignment)
: _film (film)
, _suspended (0)
, _tolerant (film->tolerant())
, _audio_merger (_film->audio_frame_rate())
- , _aligned_subtitles (aligned)
+ , _subtitle_alignment (subtitle_alignment)
{
construct ();
}
_video_container_size = s;
- _black_image.reset (new Image (AV_PIX_FMT_RGB24, _video_container_size, true));
+ _black_image = make_shared<Image>(AV_PIX_FMT_RGB24, _video_container_size, Image::Alignment::PADDED);
_black_image->make_black ();
}
return {};
}
- return merge (captions, _aligned_subtitles);
+ return merge (captions, _subtitle_alignment);
}
}
}
+ auto const content_video = piece->content->video;
+
_last_video[wp] = std::make_shared<PlayerVideo>(
video.image,
- piece->content->video->crop (),
- piece->content->video->fade (_film, video.frame),
- scale_for_display(piece->content->video->scaled_size(_film->frame_size()), _video_container_size, _film->frame_size()),
+ content_video->actual_crop(),
+ content_video->fade (_film, video.frame),
+ scale_for_display(
+ content_video->scaled_size(_film->frame_size()),
+ _video_container_size,
+ _film->frame_size(),
+ content_video->pixel_quanta()
+ ),
_video_container_size,
video.eyes,
video.part,
- piece->content->video->colour_conversion(),
- piece->content->video->range(),
+ content_video->colour_conversion(),
+ content_video->range(),
piece->content,
video.frame,
false
}
dcp::Size scaled_size (width, height);
- ps.bitmap.push_back (BitmapText(image->scale(scaled_size, dcp::YUVToRGB::REC601, image->pixel_format(), true, _fast), subtitle.sub.rectangle));
+ ps.bitmap.push_back (BitmapText(image->scale(scaled_size, dcp::YUVToRGB::REC601, image->pixel_format(), Image::Alignment::PADDED, _fast), subtitle.sub.rectangle));
DCPTime from (content_time_to_dcp (piece, subtitle.from()));
_active_texts[static_cast<int>(text->type())].add_from (wc, ps, from);