FrameRateChange frc (content->video_frame_rate(), _film->video_frame_rate());
float const ratio = content->ratio() ? content->ratio()->ratio() : content->video_size_after_crop().ratio();
- libdcp::Size image_size = fit_ratio_within (ratio, _video_container_size);
+ dcp::Size image_size = fit_ratio_within (ratio, _video_container_size);
if (_approximate_size) {
image_size.width &= ~3;
image_size.height &= ~3;
AudioMapping map = content->audio_mapping ();
for (int i = 0; i < map.content_channels(); ++i) {
for (int j = 0; j < _film->audio_channels(); ++j) {
- if (map.get (i, static_cast<libdcp::Channel> (j)) > 0) {
+ if (map.get (i, static_cast<dcp::Channel> (j)) > 0) {
dcp_mapped->accumulate_channel (
audio->data.get(),
i,
- static_cast<libdcp::Channel> (j),
- map.get (i, static_cast<libdcp::Channel> (j))
+ static_cast<dcp::Channel> (j),
+ map.get (i, static_cast<dcp::Channel> (j))
);
}
}
for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
+ if (!(*i)->paths_valid ()) {
+ continue;
+ }
+
shared_ptr<Decoder> decoder;
optional<FrameRateChange> frc;
_have_valid_pieces = false;
Changed (frequent);
- } else if (property == SubtitleContentProperty::SUBTITLE_OFFSET || property == SubtitleContentProperty::SUBTITLE_SCALE) {
+ } else if (
+ property == SubtitleContentProperty::SUBTITLE_X_OFFSET ||
+ property == SubtitleContentProperty::SUBTITLE_Y_OFFSET ||
+ property == SubtitleContentProperty::SUBTITLE_SCALE
+ ) {
update_subtitle_from_image ();
update_subtitle_from_text ();
} else if (property == ContentProperty::PATH) {
+ _have_valid_pieces = false;
Changed (frequent);
}
}
}
void
-Player::set_video_container_size (libdcp::Size s)
+Player::set_video_container_size (dcp::Size s)
{
_video_container_size = s;
assert (sc);
dcpomatic::Rect<double> in_rect = _image_subtitle.subtitle->rect;
- libdcp::Size scaled_size;
+ dcp::Size scaled_size;
- in_rect.y += sc->subtitle_offset ();
+ in_rect.x += sc->subtitle_x_offset ();
+ in_rect.y += sc->subtitle_y_offset ();
/* We will scale the subtitle up to fit _video_container_size, and also by the additional subtitle_scale */
scaled_size.width = in_rect.width * _video_container_size.width * sc->subtitle_scale ();
true
);
- _out_subtitle.from = _image_subtitle.subtitle->dcp_time;
- _out_subtitle.to = _image_subtitle.subtitle->dcp_time_to;
+ _out_subtitle.from = _image_subtitle.subtitle->dcp_time + piece->content->position ();
+ _out_subtitle.to = _image_subtitle.subtitle->dcp_time_to + piece->content->position ();
}
/** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles.
PlayerImage::PlayerImage (
shared_ptr<const Image> in,
Crop crop,
- libdcp::Size inter_size,
- libdcp::Size out_size,
+ dcp::Size inter_size,
+ dcp::Size out_size,
Scaler const * scaler
)
: _in (in)