From 05535846f69e16bc659b874bcafd02a8ee9e96e7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 6 May 2025 17:47:11 +0200 Subject: Add DCPContent::reference_anything(). --- src/lib/dcp_content.cc | 12 ++++++++++++ src/lib/dcp_content.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 255660b54..4df0c4618 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -893,3 +893,15 @@ DCPContent::active_audio_channels() const ); } + +bool +DCPContent::reference_anything() const +{ + if (reference_video() || reference_audio()) { + return true; + } + + boost::mutex::scoped_lock lm(_mutex); + return find(_reference_text.begin(), _reference_text.end(), true) != _reference_text.end(); +} + diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 4bef0a1a7..d4527febd 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -141,6 +141,8 @@ public: bool can_reference_text (std::shared_ptr film, TextType type, std::string &) const; + bool reference_anything() const; + void set_cpl (std::string id); boost::optional cpl () const { -- cgit v1.2.3