diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/player.cc | 11 | ||||
| -rw-r--r-- | src/lib/player.h | 2 | ||||
| -rw-r--r-- | src/wx/film_viewer.cc | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index ab05d42ad..07447d531 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -83,6 +83,7 @@ int const PlayerProperty::PLAYLIST = 701; int const PlayerProperty::FILM_CONTAINER = 702; int const PlayerProperty::FILM_VIDEO_FRAME_RATE = 703; int const PlayerProperty::DCP_DECODE_REDUCTION = 704; +int const PlayerProperty::PLAYBACK_LENGTH = 705; Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist, DCPTime playback_length) : _film (film) @@ -125,6 +126,16 @@ Player::setup_pieces () setup_pieces_unlocked (); } + +void +Player::set_playback_length (DCPTime len) +{ + Change (CHANGE_TYPE_PENDING, PlayerProperty::PLAYBACK_LENGTH, false); + _playback_length = len; + Change (CHANGE_TYPE_DONE, PlayerProperty::PLAYBACK_LENGTH, false); + setup_pieces (); +} + bool have_video (shared_ptr<const Content> content) { diff --git a/src/lib/player.h b/src/lib/player.h index 5a1b08ecf..82344604c 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -60,6 +60,7 @@ public: static int const FILM_CONTAINER; static int const FILM_VIDEO_FRAME_RATE; static int const DCP_DECODE_REDUCTION; + static int const PLAYBACK_LENGTH; }; /** @class Player @@ -81,6 +82,7 @@ public: return _video_container_size; } + void set_playback_length (dcpomatic::DCPTime len); void set_video_container_size (dcp::Size); void set_ignore_video (); void set_ignore_audio (); diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index cac6e8c28..bb59122aa 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -406,6 +406,7 @@ void FilmViewer::film_length_change () { _video_view->set_length (_film->length()); + _player->set_playback_length (_film->length()); } /** Re-get the current frame slowly by seeking */ |
