summaryrefslogtreecommitdiff
path: root/src/lib/dcp_content.h
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_content.h
parentef65a179e8c907029d0d9254863d4884581f3d60 (diff)
Allow specification of which parts of the DCP to encrypt (#3099).
Diffstat (limited to 'src/lib/dcp_content.h')
-rw-r--r--src/lib/dcp_content.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h
index 1b58c8efc..97e4b3cc4 100644
--- a/src/lib/dcp_content.h
+++ b/src/lib/dcp_content.h
@@ -97,7 +97,25 @@ public:
bool encrypted() const {
boost::mutex::scoped_lock lm(_mutex);
- return _encrypted;
+ return _picture_encrypted || _sound_encrypted || _text_encrypted;
+ }
+
+ /** @return true if any picture asset in this DCP is encrypted */
+ bool picture_encrypted() const {
+ boost::mutex::scoped_lock lm(_mutex);
+ return _picture_encrypted;
+ }
+
+ /** @return true if any sound asset in this DCP is encrypted */
+ bool sound_encrypted() const {
+ boost::mutex::scoped_lock lm(_mutex);
+ return _sound_encrypted;
+ }
+
+ /** @return true if any text asset in this DCP is encrypted */
+ bool text_encrypted() const {
+ boost::mutex::scoped_lock lm(_mutex);
+ return _text_encrypted;
}
void add_kdm(dcp::EncryptedKDM);
@@ -217,8 +235,9 @@ private:
bool overlaps(std::shared_ptr<const Film> film, std::function<bool (std::shared_ptr<const Content>)> part) const;
std::string _name;
- /** true if our DCP is encrypted */
- bool _encrypted;
+ bool _picture_encrypted;
+ bool _sound_encrypted;
+ bool _text_encrypted;
/** true if this DCP needs more assets before it can be played */
bool _needs_assets;
boost::optional<dcp::EncryptedKDM> _kdm;