Basic jump to selected subtitle (#1200).
[dcpomatic.git] / src / lib / player.cc
index 5515b70e85a809fd8f767d911dcb48609ba7e656..df58ed223af0ea043322f5a2e42262dc0466656a 100644 (file)
@@ -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 ();
+}