#define LOG_WARNING_NC(...) dcpomatic_log->log(__VA_ARGS__, LogEntry::TYPE_WARNING);
#define LOG_TIMING(...) dcpomatic_log->log(String::compose(__VA_ARGS__), LogEntry::TYPE_TIMING);
#define LOG_DEBUG_ENCODE(...) dcpomatic_log->log(String::compose(__VA_ARGS__), LogEntry::TYPE_DEBUG_ENCODE);
+#define LOG_DEBUG_PLAYER(...) dcpomatic_log->log(String::compose(__VA_ARGS__), LogEntry::TYPE_DEBUG_PLAYER);
FileLog::FileLog (boost::filesystem::path file)
: _file (file)
{
- _config_connection = Config::instance()->Changed.connect (boost::bind (&FileLog::config_changed, this));
- config_changed ();
-}
-
-void
-FileLog::config_changed ()
-{
- set_types (Config::instance()->log_types ());
+ set_types (Config::instance()->log_types());
}
void
private:
void do_log (boost::shared_ptr<const LogEntry> entry);
- void config_changed ();
/** filename to write to */
boost::filesystem::path _file;
- boost::signals2::scoped_connection _config_connection;
};
int const LogEntry::TYPE_DEBUG_ENCODE = 0x10;
int const LogEntry::TYPE_TIMING = 0x20;
int const LogEntry::TYPE_DEBUG_EMAIL = 0x40;
+int const LogEntry::TYPE_DEBUG_PLAYER = 0x80;
using std::string;
static const int TYPE_DEBUG_ENCODE;
static const int TYPE_TIMING;
static const int TYPE_DEBUG_EMAIL;
+ static const int TYPE_DEBUG_PLAYER;
explicit LogEntry (int type);
virtual ~LogEntry () {}
}
_history_items = history.size ();
+
+ dcpomatic_log->set_types (Config::instance()->log_types());
}
void update_checker_state_changed ()
} else {
dcpomatic_log.reset (new NullLog());
}
- dcpomatic_log->set_types (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR);
+ dcpomatic_log->set_types (LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR | LogEntry::TYPE_DEBUG_PLAYER);
}
}
/*
- Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "lib/log.h"
#include "lib/config.h"
#include "lib/compose.hpp"
+#include "lib/dcpomatic_log.h"
extern "C" {
#include <libavutil/pixfmt.h>
}
return;
}
+ LOG_DEBUG_PLAYER("%1 -> %2; delay %3", next.seconds(), time().seconds(), max((next.seconds() - time().seconds()) * 1000, 1.0));
_timer.Start (max ((next.seconds() - time().seconds()) * 1000, 1.0), wxTIMER_ONE_SHOT);
if (_butler) {