diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-13 00:04:23 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-13 00:04:23 +0000 |
| commit | 264583479e79b481251f1772b228f82cd77552d3 (patch) | |
| tree | 868f3347c1784ecde6ee626f6799334f3ef235b6 /src/tools/dcpomatic_player.cc | |
| parent | f80010debf14112a632f42ddc7588995698b3d19 (diff) | |
swaroop: only allow playback if configured lock file is present.v2.13.72
Diffstat (limited to 'src/tools/dcpomatic_player.cc')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index db9463fe2..473cc6d8b 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -48,6 +48,7 @@ #include "lib/dcpomatic_socket.h" #include "lib/scoped_temporary.h" #include "lib/monitor_checker.h" +#include "lib/lock_file_checker.h" #include "lib/ffmpeg_content.h" #include <dcp/dcp.h> #include <dcp/raw_convert.h> @@ -206,6 +207,8 @@ public: #ifdef DCPOMATIC_VARIANT_SWAROOP MonitorChecker::instance()->StateChanged.connect(boost::bind(&DOMFrame::monitor_checker_state_changed, this)); MonitorChecker::instance()->run (); + LockFileChecker::instance()->StateChanged.connect(boost::bind(&DOMFrame::lock_checker_state_changed, this)); + LockFileChecker::instance()->run (); #endif setup_screen (); @@ -248,8 +251,16 @@ public: void monitor_checker_state_changed () { if (!MonitorChecker::instance()->ok()) { + _viewer->stop (); error_dialog (this, _("The required display devices are not connected correctly.")); + } + } + + void lock_checker_state_changed () + { + if (!LockFileChecker::instance()->ok()) { _viewer->stop (); + error_dialog (this, _("The lock file is not present.")); } } #endif @@ -273,6 +284,10 @@ public: error_dialog (this, _("The required display devices are not connected correctly.")); return false; } + if (!LockFileChecker::instance()->ok()) { + error_dialog (this, _("The lock file is not present.")); + return false; + } #endif if (!_film || !Config::instance()->respect_kdm_validity_periods()) { return true; |
