summaryrefslogtreecommitdiff
path: root/src/lib/dcp_examiner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-10-31 00:03:49 +0100
committerCarl Hetherington <cth@carlh.net>2025-11-05 00:43:19 +0100
commite8ce097ce705446c27b51199a321a9918deaa0db (patch)
tree0a52cbc9c52791d453fa4bd478609aedde98c831 /src/lib/dcp_examiner.cc
parentef65a179e8c907029d0d9254863d4884581f3d60 (diff)
Allow specification of which parts of the DCP to encrypt (#3099).
Diffstat (limited to 'src/lib/dcp_examiner.cc')
-rw-r--r--src/lib/dcp_examiner.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc
index 59bd47702..b94d88486 100644
--- a/src/lib/dcp_examiner.cc
+++ b/src/lib/dcp_examiner.cc
@@ -313,7 +313,23 @@ DCPExaminer::DCPExaminer(shared_ptr<const DCPContent> content, bool tolerant)
++reel_index;
}
- _encrypted = selected_cpl->any_encrypted();
+ for (auto reel: selected_cpl->reels()) {
+ if (reel->main_picture() && reel->main_picture()->encrypted()) {
+ _picture_encrypted = true;
+ }
+ if (reel->main_sound() && reel->main_sound()->encrypted()) {
+ _sound_encrypted = true;
+ }
+ if (reel->main_subtitle() && reel->main_subtitle()->encrypted()) {
+ _text_encrypted = true;
+ }
+ for (auto cc: reel->closed_captions()) {
+ if (cc->encrypted()) {
+ _text_encrypted = true;
+ }
+ }
+ }
+
_kdm_valid = true;
LOG_GENERAL_NC("Check that everything encrypted has a key");