diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-10 02:12:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-10 02:13:51 +0100 |
| commit | 672b6dd3356d4cbf8703777538d396dbb868b96d (patch) | |
| tree | ec11a103674f6b2d18671d5e5ee610eca9e0a109 /src | |
| parent | fcab3e1bf6c6f05ca714eb9e337ff50f13fff6a6 (diff) | |
Add some Changed() emissions so that when a butler is in control
we always do a seek when we set _have_valid_pieces to false.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/player.cc | 52 | ||||
| -rw-r--r-- | src/lib/player.h | 3 |
2 files changed, 41 insertions, 14 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 5e42d8e37..782e445e8 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -83,6 +83,9 @@ 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::IGNORE = 705; +int const PlayerProperty::FAST = 706; +int const PlayerProperty::PLAY_REFERENCED = 707; Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist) : _film (film) @@ -465,24 +468,37 @@ Player::get_subtitle_fonts () void Player::set_ignore_video () { - boost::mutex::scoped_lock lm (_mutex); - _ignore_video = true; - _have_valid_pieces = false; + { + boost::mutex::scoped_lock lm (_mutex); + _ignore_video = true; + _have_valid_pieces = false; + } + + Changed (PlayerProperty::IGNORE, false); } void Player::set_ignore_audio () { - boost::mutex::scoped_lock lm (_mutex); - _ignore_audio = true; - _have_valid_pieces = false; + { + boost::mutex::scoped_lock lm (_mutex); + _ignore_audio = true; + _have_valid_pieces = false; + } + + Changed (PlayerProperty::IGNORE, false); } void Player::set_ignore_text () { - boost::mutex::scoped_lock lm (_mutex); - _ignore_text = true; + { + boost::mutex::scoped_lock lm (_mutex); + _ignore_text = true; + _have_valid_pieces = false; + } + + Changed (PlayerProperty::IGNORE, false); } /** Set the player to always burn open texts into the image regardless of the content settings */ @@ -497,17 +513,25 @@ Player::set_always_burn_open_subtitles () void Player::set_fast () { - boost::mutex::scoped_lock lm (_mutex); - _fast = true; - _have_valid_pieces = false; + { + boost::mutex::scoped_lock lm (_mutex); + _fast = true; + _have_valid_pieces = false; + } + + Changed (PlayerProperty::FAST, false); } void Player::set_play_referenced () { - boost::mutex::scoped_lock lm (_mutex); - _play_referenced = true; - _have_valid_pieces = false; + { + boost::mutex::scoped_lock lm (_mutex); + _play_referenced = true; + _have_valid_pieces = false; + } + + Changed (PlayerProperty::PLAY_REFERENCED, false); } list<ReferencedReelAsset> diff --git a/src/lib/player.h b/src/lib/player.h index 20b68ef77..ccdd4e12c 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -56,6 +56,9 @@ public: static int const FILM_CONTAINER; static int const FILM_VIDEO_FRAME_RATE; static int const DCP_DECODE_REDUCTION; + static int const IGNORE; + static int const FAST; + static int const PLAY_REFERENCED; }; /** @class Player |
