From 44be99253e5567969c8f1916c4a59a7300cfd575 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 3 Jun 2021 22:33:08 +0000 Subject: [PATCH] Add some logging to KDM checking. --- src/lib/dcp_examiner.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 31c80f724..b7edd2566 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -23,6 +23,7 @@ #include "exceptions.h" #include "image.h" #include "config.h" +#include "dcpomatic_log.h" #include #include #include @@ -199,30 +200,38 @@ DCPExaminer::DCPExaminer (shared_ptr content) _kdm_valid = true; /* Check that we can read the first picture, sound and subtitle frames of each reel */ + LOG_GENERAL("DCP examiner checks %1 for readability", cpl->id()); try { BOOST_FOREACH (shared_ptr i, cpl->reels()) { + LOG_GENERAL("Checking reel %1", i->id()); shared_ptr pic = i->main_picture()->asset (); shared_ptr mono = dynamic_pointer_cast (pic); shared_ptr stereo = dynamic_pointer_cast (pic); if (mono) { + LOG_GENERAL_NC("Trying to read frame 0 of mono picture asset."); mono->start_read()->get_frame(0)->xyz_image (); } else { + LOG_GENERAL_NC("Trying to read frame 0L of stereo picture asset."); stereo->start_read()->get_frame(0)->xyz_image (dcp::EYE_LEFT); } if (i->main_sound()) { + LOG_GENERAL_NC("Trying to read frame 0 of sound asset."); shared_ptr sound = i->main_sound()->asset (); i->main_sound()->asset()->start_read()->get_frame(0); } if (i->main_subtitle()) { + LOG_GENERAL_NC("Trying to read subtitles."); i->main_subtitle()->asset()->subtitles (); } } } catch (dcp::DCPReadError& e) { + LOG_GENERAL ("DCPReadError %1 occurred", e.what()); _kdm_valid = false; } catch (dcp::MiscError& e) { + LOG_GENERAL ("DCPMiscError %1 occurred", e.what()); _kdm_valid = false; } -- 2.30.2