diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-12-14 13:10:29 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-12-14 13:10:29 +0000 |
| commit | 9a8a53ba467c275af7759adbca797a97b86cc4c6 (patch) | |
| tree | 028607b9097dd56201e0935598353380cfc8370a /src/lib/encoder.cc | |
| parent | 36b99f997b4a859945bad7adf96f8d76864be7d6 (diff) | |
Debugging for encode decisions.
Diffstat (limited to 'src/lib/encoder.cc')
| -rw-r--r-- | src/lib/encoder.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 8a6e1ce8c..32af746a5 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -45,6 +45,7 @@ #define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, LogEntry::TYPE_GENERAL); #define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_ERROR); #define LOG_TIMING(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_TIMING); +#define LOG_DEBUG_ENCODE(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_DEBUG_ENCODE); using std::list; using std::cout; @@ -225,14 +226,18 @@ Encoder::encode (shared_ptr<PlayerVideo> pv) if (_writer->can_fake_write (position)) { /* We can fake-write this frame */ + LOG_DEBUG_ENCODE("Frame @ %1 FAKE", to_string(pv->time())); _writer->fake_write (position, pv->eyes ()); frame_done (); } else if (pv->has_j2k ()) { + LOG_DEBUG_ENCODE("Frame @ %1 J2K", to_string(pv->time())); /* This frame already has JPEG2000 data, so just write it */ _writer->write (pv->j2k(), position, pv->eyes ()); } else if (_last_player_video && _writer->can_repeat(position) && pv->same (_last_player_video)) { + LOG_DEBUG_ENCODE("Frame @ %1 REPEAT", to_string(pv->time())); _writer->repeat (position, pv->eyes ()); } else { + LOG_DEBUG_ENCODE("Frame @ %1 ENCODE", to_string(pv->time())); /* Queue this new frame for encoding */ LOG_TIMING ("add-frame-to-queue queue=%1", _queue.size ()); _queue.push_back (shared_ptr<DCPVideo> ( |
