diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-08 14:58:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-08 14:58:53 +0100 |
| commit | 9facdf75a2776319fc5826cfa3dd85340f3c8879 (patch) | |
| tree | dfc19da6dd5b3aefd2cacbec817336058d9c6c02 /src/lib/player.cc | |
| parent | 9334a6e5ea4ba89c243b2e5d6bdb02db6aa012ff (diff) | |
Fix detection of same-frame to speed up simple encodes (#548).
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 0ddd835ad..215b48ee4 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -74,6 +74,7 @@ Player::Player (shared_ptr<const Film> f, shared_ptr<const Playlist> p) , _playlist (p) , _have_valid_pieces (false) , _ignore_video (false) + , _burn_subtitles (f->burn_subtitles ()) { _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)); @@ -385,7 +386,7 @@ Player::get_video (DCPTime time, bool accurate) copy (c.begin(), c.end(), back_inserter (sub_images)); /* Text subtitles (rendered to an image) */ - if (!ps.text.empty ()) { + if (_burn_subtitles && !ps.text.empty ()) { list<PositionImage> s = render_subtitles (ps.text, _video_container_size); copy (s.begin (), s.end (), back_inserter (sub_images)); } @@ -631,3 +632,12 @@ Player::set_ignore_video () { _ignore_video = true; } + +/** Set whether or not this player should burn text subtitles into the image. + * @param burn true to burn subtitles, false to not. + */ +void +Player::set_burn_subtitles (bool burn) +{ + _burn_subtitles = burn; +} |
