#define LOG_DISK_NC(...) dcpomatic_log->log(__VA_ARGS__, LogEntry::TYPE_DISK);
#define LOG_DEBUG_PLAYER(...) dcpomatic_log->log(String::compose(__VA_ARGS__), LogEntry::TYPE_DEBUG_PLAYER);
#define LOG_DEBUG_PLAYER_NC(...) dcpomatic_log->log(__VA_ARGS__, LogEntry::TYPE_DEBUG_PLAYER);
+#define LOG_DEBUG_WRITER(...) dcpomatic_log->log(String::compose(__VA_ARGS__), LogEntry::TYPE_DEBUG_WRITER);
+#define LOG_DEBUG_WRITER_NC(...) dcpomatic_log->log(__VA_ARGS__, LogEntry::TYPE_DEBUG_WRITER);
#define LOG_DEBUG_AUDIO_ANALYSIS(...) dcpomatic_log->log(String::compose(__VA_ARGS__), LogEntry::TYPE_DEBUG_AUDIO_ANALYSIS);
#define LOG_DEBUG_AUDIO_ANALYSIS_NC(...) dcpomatic_log->log(__VA_ARGS__, LogEntry::TYPE_DEBUG_AUDIO_ANALYSIS);
if (_writer->can_fake_write (position)) {
/* We can fake-write this frame */
- LOG_DEBUG_ENCODE("Frame @ %1 FAKE", to_string(time));
+ LOG_DEBUG_ENCODE("Frame @ %1 %2 FAKE", to_string(time), static_cast<int>(pv->eyes()));
_writer->fake_write (position, pv->eyes ());
frame_done ();
} else if (pv->has_j2k() && !_film->reencode_j2k()) {
- LOG_DEBUG_ENCODE("Frame @ %1 J2K", to_string(time));
+ LOG_DEBUG_ENCODE("Frame @ %1 %2 J2K", to_string(time), static_cast<int>(pv->eyes()));
/* This frame already has J2K data, so just write it */
_writer->write (pv->j2k(), position, pv->eyes ());
frame_done ();
} else if (_last_player_video[static_cast<int>(pv->eyes())] && _writer->can_repeat(position) && pv->same (_last_player_video[static_cast<int>(pv->eyes())])) {
- LOG_DEBUG_ENCODE("Frame @ %1 REPEAT", to_string(time));
+ LOG_DEBUG_ENCODE("Frame @ %1 %2 REPEAT", to_string(time), static_cast<int>(pv->eyes()));
_writer->repeat (position, pv->eyes ());
} else {
- LOG_DEBUG_ENCODE("Frame @ %1 ENCODE", to_string(time));
+ LOG_DEBUG_ENCODE("Frame @ %1 %2 ENCODE", to_string(time), static_cast<int>(pv->eyes()));
/* Queue this new frame for encoding */
LOG_TIMING ("add-frame-to-queue queue=%1", _queue.size ());
_queue.push_back (DCPVideo(
int const LogEntry::TYPE_DISK = 0x100;
int const LogEntry::TYPE_DEBUG_PLAYER = 0x200;
int const LogEntry::TYPE_DEBUG_AUDIO_ANALYSIS = 0x400;
+int const LogEntry::TYPE_DEBUG_WRITER = 0x800;
using std::string;
static const int TYPE_DISK;
static const int TYPE_DEBUG_PLAYER; ///< the Player class
static const int TYPE_DEBUG_AUDIO_ANALYSIS; ///< audio analysis job
+ static const int TYPE_DEBUG_WRITER; ///< Writer and ReelWriter classes
explicit LogEntry (int type);
virtual ~LogEntry () {}
pv->set_text (subtitles.get ());
}
+ LOG_DEBUG_PLAYER("Player --> Video %1 %2", to_string(time), static_cast<int>(pv->eyes()));
Video (pv, time);
}
void
ReelWriter::write (shared_ptr<const Data> encoded, Frame frame, Eyes eyes)
{
+ LOG_DEBUG_WRITER("ReelWriter::write frame=%1 eyes=%2", frame, static_cast<int>(eyes));
+
if (!_picture_asset_writer) {
/* We're not writing any data */
return;
void
ReelWriter::repeat_write (Frame frame, Eyes eyes)
{
+ LOG_DEBUG_WRITER("ReelWriter::repeat_write frame=%1 eyes=%2", frame, static_cast<int>(eyes));
+
if (!_picture_asset_writer) {
/* We're not writing any data */
return;
++_fake_written;
break;
case QueueItem::Type::REPEAT:
- LOG_DEBUG_ENCODE (N_("Writer REPEAT-writes %1"), qi.frame);
+ LOG_DEBUG_ENCODE (N_("Writer REPEAT-writes %1 %2"), qi.frame, static_cast<int>(qi.eyes));
reel.repeat_write (qi.frame, qi.eyes);
++_repeat_written;
break;