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/lib/config.h | |
| parent | f80010debf14112a632f42ddc7588995698b3d19 (diff) | |
swaroop: only allow playback if configured lock file is present.v2.13.72
Diffstat (limited to 'src/lib/config.h')
| -rw-r--r-- | src/lib/config.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/config.h b/src/lib/config.h index a162750fe..dd20b58e7 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -524,6 +524,10 @@ public: std::vector<Monitor> required_monitors () const { return _required_monitors; } + + boost::optional<boost::filesystem::path> player_lock_file () const { + return _player_lock_file; + } #endif bool allow_spl_editing () const { @@ -1020,6 +1024,18 @@ public: void set_required_monitors (std::vector<Monitor> monitors) { maybe_set (_required_monitors, monitors); } + + void set_player_lock_file (boost::filesystem::path p) { + maybe_set (_player_lock_file, p); + } + + void unset_player_lock_file () { + if (!_player_lock_file) { + return; + } + _player_lock_file = boost::none; + changed (); + } #endif void set_allow_spl_editing (bool s) { @@ -1229,6 +1245,8 @@ private: /** watermark duration in milliseconds */ int _player_watermark_duration; std::vector<Monitor> _required_monitors; + /** a file which, if specified, must be present for the player to work */ + boost::optional<boost::filesystem::path> _player_lock_file; #endif bool _allow_spl_editing; |
