X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_video.cc;h=6f32b6686dca1ac44eeeb4d8d7a575f4c1e004fe;hp=31d1661947b80527d5a51f825b10f5ae6abf2f40;hb=ad1ef39eda58b3a919ea3b7084401a0439409ec6;hpb=fe8251bb73765b459042b0fa841dae2d440487fd diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index 31d166194..6f32b6686 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -35,6 +35,7 @@ #include "dcpomatic_socket.h" #include "image.h" #include "log.h" +#include "dcpomatic_log.h" #include "cross.h" #include "player_video.h" #include "compose.hpp" @@ -50,10 +51,6 @@ #include #include -#define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL); -#define LOG_DEBUG_ENCODE(...) _log->log (String::compose (__VA_ARGS__), LogEntry::TYPE_DEBUG_ENCODE); -#define LOG_TIMING(...) _log->log (String::compose (__VA_ARGS__), LogEntry::TYPE_TIMING); - #include "i18n.h" using std::string; @@ -69,24 +66,21 @@ using dcp::raw_convert; * @param frame Input frame. * @param index Index of the frame within the DCP. * @param bw J2K bandwidth to use (see Config::j2k_bandwidth ()) - * @param l Log to write to. */ DCPVideo::DCPVideo ( - shared_ptr frame, int index, int dcp_fps, int bw, Resolution r, shared_ptr l + shared_ptr frame, int index, int dcp_fps, int bw, Resolution r ) : _frame (frame) , _index (index) , _frames_per_second (dcp_fps) , _j2k_bandwidth (bw) , _resolution (r) - , _log (l) { } -DCPVideo::DCPVideo (shared_ptr frame, shared_ptr node, shared_ptr log) +DCPVideo::DCPVideo (shared_ptr frame, shared_ptr node) : _frame (frame) - , _log (log) { _index = node->number_child ("Index"); _frames_per_second = node->number_child ("FramesPerSecond"); @@ -119,10 +113,10 @@ DCPVideo::convert_to_xyz (shared_ptr frame, dcp::NoteHandler * @return Encoded data. */ Data -DCPVideo::encode_locally (dcp::NoteHandler note) +DCPVideo::encode_locally () { Data enc = compress_j2k ( - convert_to_xyz (_frame, note), + convert_to_xyz (_frame, boost::bind(&Log::dcp_log, dcpomatic_log.get(), _1, _2)), _j2k_bandwidth, _frames_per_second, _frame->eyes() == EYES_LEFT || _frame->eyes() == EYES_RIGHT,