diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-01 21:20:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-29 01:44:15 +0200 |
| commit | d5c059a2ff9bab5c2973db6bc4860591679dd42b (patch) | |
| tree | c8ec57cdeae4c3746f6ff7abd28816310540604b /src/lib/player.cc | |
| parent | 5b2b8279d8eb33d31166027d876b4c9f86087bfd (diff) | |
Primitive auto-crop (#1477).
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 619a3583c..b2db2b3ef 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -1432,6 +1432,22 @@ Player::content_time_to_dcp (shared_ptr<const Content> content, ContentTime t) } +optional<ContentTime> +Player::dcp_to_content_time (shared_ptr<const Content> content, DCPTime t) +{ + boost::mutex::scoped_lock lm (_mutex); + + for (auto i: _pieces) { + if (i->content == content) { + return dcp_to_content_time (i, t); + } + } + + /* We couldn't find this content; perhaps things are being changed over */ + return {}; +} + + shared_ptr<const Playlist> Player::playlist () const { |
