diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-16 15:52:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-16 15:52:32 +0100 |
| commit | 6e52f83418c64d5cbd0e613a5fc96ea32881d4d9 (patch) | |
| tree | 722da0c3f985bb0e0d38077ca4992e4580546356 /src/lib/player.cc | |
| parent | 739a52b20895622a1caf48d3597ae49e6ec0aeeb (diff) | |
Fix subtitle controls in the viewer.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 1931ec0f5..6d7c3cfbd 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -58,7 +58,6 @@ Player::Player (shared_ptr<const Film> f, shared_ptr<const Playlist> p) , _playlist (p) , _video (true) , _audio (true) - , _subtitles (true) , _have_valid_pieces (false) , _position (0) , _audio_buffers (f->dcp_audio_channels(), 0) @@ -80,12 +79,6 @@ Player::disable_audio () _audio = false; } -void -Player::disable_subtitles () -{ - _subtitles = false; -} - bool Player::pass () { @@ -291,10 +284,13 @@ Player::setup_pieces () shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (*i); if (fc) { - shared_ptr<FFmpegDecoder> fd (new FFmpegDecoder (_film, fc, _video, _audio, _subtitles)); + shared_ptr<FFmpegDecoder> fd (new FFmpegDecoder (_film, fc, _video, _audio)); fd->Video.connect (bind (&Player::process_video, this, *i, _1, _2, _3)); fd->Audio.connect (bind (&Player::process_audio, this, *i, _1, _2)); + if (_video_container_size) { + fd->set_video_container_size (_video_container_size.get ()); + } decoder = fd; cout << "\tFFmpeg @ " << fc->start() << " -- " << fc->end() << "\n"; @@ -315,6 +311,9 @@ Player::setup_pieces () if (!id) { id.reset (new ImageMagickDecoder (_film, ic)); id->Video.connect (bind (&Player::process_video, this, *i, _1, _2, _3)); + if (_video_container_size) { + id->set_video_container_size (_video_container_size.get ()); + } } decoder = id; |
