#include <errno.h>
#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_DEBUG_ENCODE(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_DEBUG_ENCODE);
#include "i18n.h"
switch (_frame->eyes()) {
case EYES_BOTH:
- LOG_GENERAL (N_("Finished locally-encoded frame %1 for mono"), _index);
+ LOG_DEBUG_ENCODE (N_("Finished locally-encoded frame %1 for mono"), _index);
break;
case EYES_LEFT:
- LOG_GENERAL (N_("Finished locally-encoded frame %1 for L"), _index);
+ LOG_DEBUG_ENCODE (N_("Finished locally-encoded frame %1 for L"), _index);
break;
case EYES_RIGHT:
- LOG_GENERAL (N_("Finished locally-encoded frame %1 for R"), _index);
+ LOG_DEBUG_ENCODE (N_("Finished locally-encoded frame %1 for R"), _index);
break;
default:
break;
root->add_child("Version")->add_child_text (raw_convert<string> (SERVER_LINK_VERSION));
add_metadata (root);
- LOG_GENERAL (N_("Sending frame %1 to remote"), _index);
+ LOG_DEBUG_ENCODE (N_("Sending frame %1 to remote"), _index);
/* Send XML metadata */
string xml = doc.write_to_string ("UTF-8");
Data e (socket->read_uint32 ());
socket->read (e.data().get(), e.size());
- LOG_GENERAL (N_("Finished remotely-encoded frame %1"), _index);
+ LOG_DEBUG_ENCODE (N_("Finished remotely-encoded frame %1"), _index);
return e;
}
int const Log::TYPE_WARNING = 0x2;
int const Log::TYPE_ERROR = 0x4;
int const Log::TYPE_DEBUG_DECODE = 0x8;
-int const Log::TYPE_TIMING = 0x10;
+int const Log::TYPE_DEBUG_ENCODE = 0x10;
+int const Log::TYPE_TIMING = 0x20;
Log::Log ()
: _types (0)
static const int TYPE_WARNING;
static const int TYPE_ERROR;
static const int TYPE_DEBUG_DECODE;
+ static const int TYPE_DEBUG_ENCODE;
static const int TYPE_TIMING;
void log (std::string message, int type);
#include "i18n.h"
#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
+#define LOG_DEBUG_ENCODE(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_DEBUG_ENCODE);
#define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING);
#define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_WARNING);
#define LOG_WARNING(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_WARNING);
switch (qi.type) {
case QueueItem::FULL:
{
- LOG_GENERAL (N_("Writer FULL-writes %1 (%2)"), qi.frame, qi.eyes);
+ LOG_DEBUG_ENCODE (N_("Writer FULL-writes %1 (%2)"), qi.frame, qi.eyes);
if (!qi.encoded) {
qi.encoded = Data (_film->j2c_path (qi.frame, qi.eyes, false));
}
break;
}
case QueueItem::FAKE:
- LOG_GENERAL (N_("Writer FAKE-writes %1"), qi.frame);
+ LOG_DEBUG_ENCODE (N_("Writer FAKE-writes %1"), qi.frame);
_picture_asset_writer->fake_write (qi.size);
_last_written[qi.eyes].reset ();
++_fake_written;
break;
case QueueItem::REPEAT:
- LOG_GENERAL (N_("Writer REPEAT-writes %1"), qi.frame);
+ LOG_DEBUG_ENCODE (N_("Writer REPEAT-writes %1"), qi.frame);
dcp::FrameInfo fin = _picture_asset_writer->write (
_last_written[qi.eyes]->data().get(),
_last_written[qi.eyes]->size()
}
}
- LOG_GENERAL ("Have existing frame %1", _first_nonexistant_frame);
+ LOG_DEBUG_ENCODE ("Have existing frame %1", _first_nonexistant_frame);
++_first_nonexistant_frame;
}
, _log_error (0)
, _log_timing (0)
, _log_debug_decode (0)
+ , _log_debug_encode (0)
{}
private:
t->Add (_log_timing, 1, wxEXPAND | wxALL);
_log_debug_decode = new wxCheckBox (_panel, wxID_ANY, _("Debug: decode"));
t->Add (_log_debug_decode, 1, wxEXPAND | wxALL);
+ _log_debug_encode = new wxCheckBox (_panel, wxID_ANY, _("Debug: encode"));
+ t->Add (_log_debug_encode, 1, wxEXPAND | wxALL);
table->Add (t, 0, wxALL, 6);
}
_log_error->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
_log_timing->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
_log_debug_decode->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
+ _log_debug_encode->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
#ifdef DCPOMATIC_WINDOWS
_win32_console->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::win32_console_changed, this));
#endif
checked_set (_log_error, config->log_types() & Log::TYPE_ERROR);
checked_set (_log_timing, config->log_types() & Log::TYPE_TIMING);
checked_set (_log_debug_decode, config->log_types() & Log::TYPE_DEBUG_DECODE);
+ checked_set (_log_debug_encode, config->log_types() & Log::TYPE_DEBUG_ENCODE);
#ifdef DCPOMATIC_WINDOWS
checked_set (_win32_console, config->win32_console());
#endif
if (_log_debug_decode->GetValue ()) {
types |= Log::TYPE_DEBUG_DECODE;
}
+ if (_log_debug_encode->GetValue ()) {
+ types |= Log::TYPE_DEBUG_ENCODE;
+ }
Config::instance()->set_log_types (types);
}
wxCheckBox* _log_error;
wxCheckBox* _log_timing;
wxCheckBox* _log_debug_decode;
+ wxCheckBox* _log_debug_encode;
#ifdef DCPOMATIC_WINDOWS
wxCheckBox* _win32_console;
#endif