summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-03 22:33:08 +0000
committerCarl Hetherington <cth@carlh.net>2021-06-03 22:33:08 +0000
commit44be99253e5567969c8f1916c4a59a7300cfd575 (patch)
treecd97ceb59108e1169f0c8e1428ec73c6fb23d88d
parent2913a26dd799a6cda6f1b94415167362106318dc (diff)
Add some logging to KDM checking.daniil
-rw-r--r--src/lib/dcp_examiner.cc9
1 files changed, 9 insertions, 0 deletions
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 <dcp/dcp.h>
#include <dcp/decrypted_kdm.h>
#include <dcp/cpl.h>
@@ -199,30 +200,38 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> 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<dcp::Reel> i, cpl->reels()) {
+ LOG_GENERAL("Checking reel %1", i->id());
shared_ptr<dcp::PictureAsset> pic = i->main_picture()->asset ();
shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (pic);
shared_ptr<dcp::StereoPictureAsset> stereo = dynamic_pointer_cast<dcp::StereoPictureAsset> (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<dcp::SoundAsset> 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;
}