summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-02-15 00:56:23 +0000
committerCarl Hetherington <cth@carlh.net>2019-02-15 00:56:23 +0000
commit8f7fdb9fdcd4ffd076f07de9f49801fe01991776 (patch)
tree23c3c4333156e4e30083dcefaefec0275a04e4f3 /src/lib
parent7d1c30d17b3494e07fd32dd34cd4806006e725dd (diff)
Add support for player logging.v2.13.119
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/config.cc12
-rw-r--r--src/lib/config.h19
2 files changed, 28 insertions, 3 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index ac7cf7e76..bf4b49552 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -169,6 +169,7 @@ Config::set_defaults ()
_image_display = 0;
_respect_kdm_validity_periods = true;
_player_activity_log_file = boost::none;
+ _player_debug_log_file = boost::none;
_player_content_directory = boost::none;
_player_playlist_directory = boost::none;
_player_kdm_directory = boost::none;
@@ -555,6 +556,7 @@ try
if (!_player_activity_log_file) {
_player_activity_log_file = f.optional_string_child("PlayerActivityLogFile");
}
+ _player_debug_log_file = f.optional_string_child("PlayerDebugLogFile");
_player_content_directory = f.optional_string_child("PlayerContentDirectory");
_player_playlist_directory = f.optional_string_child("PlayerPlaylistDirectory");
_player_kdm_directory = f.optional_string_child("PlayerKDMDirectory");
@@ -997,16 +999,20 @@ Config::write_config () const
/* [XML] PlayerLogFile Filename to use for player activity logs (e.g starting, stopping, playlist loads) */
root->add_child("PlayerActivityLogFile")->add_child_text(_player_activity_log_file->string());
}
+ if (_player_debug_log_file) {
+ /* [XML] PlayerLogFile Filename to use for player debug logs */
+ root->add_child("PlayerDebugLogFile")->add_child_text(_player_debug_log_file->string());
+ }
if (_player_content_directory) {
- /* [XML] PlayerContentDirectory Filename to use for player content in the dual-screen mode. */
+ /* [XML] PlayerContentDirectory Directory to use for player content in the dual-screen mode. */
root->add_child("PlayerContentDirectory")->add_child_text(_player_content_directory->string());
}
if (_player_playlist_directory) {
- /* [XML] PlayerPlaylistDirectory Filename to use for player playlists in the dual-screen mode. */
+ /* [XML] PlayerPlaylistDirectory Directory to use for player playlists in the dual-screen mode. */
root->add_child("PlayerPlaylistDirectory")->add_child_text(_player_playlist_directory->string());
}
if (_player_kdm_directory) {
- /* [XML] PlayerKDMDirectory Filename to use for player KDMs in the dual-screen mode. */
+ /* [XML] PlayerKDMDirectory Directory to use for player KDMs in the dual-screen mode. */
root->add_child("PlayerKDMDirectory")->add_child_text(_player_kdm_directory->string());
}
#ifdef DCPOMATIC_VARIANT_SWAROOP
diff --git a/src/lib/config.h b/src/lib/config.h
index 5ae14ebda..21463fdb5 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -79,6 +79,7 @@ public:
INTERFACE_COMPLEXITY,
PLAYER_CONTENT_DIRECTORY,
PLAYER_PLAYLIST_DIRECTORY,
+ PLAYER_DEBUG_LOG,
HISTORY,
#ifdef DCPOMATIC_VARIANT_SWAROOP
PLAYER_BACKGROUND_IMAGE,
@@ -488,6 +489,10 @@ public:
return _player_activity_log_file;
}
+ boost::optional<boost::filesystem::path> player_debug_log_file () const {
+ return _player_debug_log_file;
+ }
+
boost::optional<boost::filesystem::path> player_content_directory () const {
return _player_content_directory;
}
@@ -952,6 +957,18 @@ public:
changed ();
}
+ void set_player_debug_log_file (boost::filesystem::path p) {
+ maybe_set (_player_debug_log_file, p, PLAYER_DEBUG_LOG);
+ }
+
+ void unset_player_debug_log_file () {
+ if (!_player_debug_log_file) {
+ return;
+ }
+ _player_debug_log_file = boost::none;
+ changed (PLAYER_DEBUG_LOG);
+ }
+
void set_player_content_directory (boost::filesystem::path p) {
maybe_set (_player_content_directory, p, PLAYER_CONTENT_DIRECTORY);
}
@@ -1231,6 +1248,8 @@ private:
playlist etc.) Does not contain debugging information.
*/
boost::optional<boost::filesystem::path> _player_activity_log_file;
+ /** Log file containing debug information for the player */
+ boost::optional<boost::filesystem::path> _player_debug_log_file;
/** A directory containing DCPs whose contents are presented to the user
in the dual-screen player mode. DCPs on the list can be loaded
for playback.