_playlist_changed_connection = _playlist->Changed.connect (bind (&Player::playlist_changed, this));
_playlist_content_changed_connection = _playlist->ContentChanged.connect (bind (&Player::content_changed, this, _1, _2, _3));
_film_changed_connection = _film->Changed.connect (bind (&Player::film_changed, this, _1));
- set_video_container_size (fit_ratio_within (_film->container()->ratio (), _film->full_frame ()));
+ set_video_container_size (_film->frame_size ());
}
void
if (earliest_audio.get() < 0) {
earliest_audio = DCPTime ();
}
- TimedAudioBuffers<DCPTime> tb = _audio_merger.pull (earliest_audio);
+ TimedAudioBuffers tb = _audio_merger.pull (earliest_audio);
Audio (tb.audio, tb.time);
/* This assumes that the audio-frames-to-time conversion is exact
so that there are no accumulated errors caused by rounding.
void
Player::flush ()
{
- TimedAudioBuffers<DCPTime> tb = _audio_merger.flush ();
+ TimedAudioBuffers tb = _audio_merger.flush ();
if (_audio && tb.audio) {
Audio (tb.audio, tb.time);
_audio_position += DCPTime::from_frames (tb.audio->frames (), _film->audio_frame_rate ());
/* FFmpeg */
shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (*i);
if (fc) {
- decoder.reset (new FFmpegDecoder (_film, fc, _video, _audio));
+ decoder.reset (new FFmpegDecoder (fc, _film->log(), _video, _audio, _film->with_subtitles ()));
frc = FrameRateChange (fc->video_frame_rate(), _film->video_frame_rate());
}
}
if (!decoder) {
- decoder.reset (new ImageDecoder (_film, ic));
+ decoder.reset (new ImageDecoder (ic));
}
frc = FrameRateChange (ic->video_frame_rate(), _film->video_frame_rate());
/* SndfileContent */
shared_ptr<const SndfileContent> sc = dynamic_pointer_cast<const SndfileContent> (*i);
if (sc) {
- decoder.reset (new SndfileDecoder (_film, sc));
+ decoder.reset (new SndfileDecoder (sc));
frc = best_overlap_frc;
}
/* SubRipContent */
shared_ptr<const SubRipContent> rc = dynamic_pointer_cast<const SubRipContent> (*i);
if (rc) {
- decoder.reset (new SubRipDecoder (_film, rc));
+ decoder.reset (new SubRipDecoder (rc));
frc = best_overlap_frc;
}