diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-06-29 22:02:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-06-29 22:02:19 +0100 |
| commit | e00b9850a7336b7db0aee058fe12f576db5f84a3 (patch) | |
| tree | 390f055e9b70fc41a4e9eff851f931e1a8a2609f /src/lib/player.cc | |
| parent | 362443f12f6614404fe668b309f91099e3a83d51 (diff) | |
Basic jump to selected subtitle (#1200).
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 5515b70e8..df58ed223 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -1089,3 +1089,20 @@ Player::set_dcp_decode_reduction (optional<int> reduction) _have_valid_pieces = false; Changed (PlayerProperty::DCP_DECODE_REDUCTION, false); } + +DCPTime +Player::content_time_to_dcp (shared_ptr<Content> content, ContentTime t) +{ + if (_have_valid_pieces) { + setup_pieces (); + } + + BOOST_FOREACH (shared_ptr<Piece> i, _pieces) { + if (i->content == content) { + return content_time_to_dcp (i, t); + } + } + + DCPOMATIC_ASSERT (false); + return DCPTime (); +} |
