diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-06 17:47:11 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-08 01:29:35 +0200 |
| commit | 05535846f69e16bc659b874bcafd02a8ee9e96e7 (patch) | |
| tree | 092cb665c2133c6a52ef0e6e53af4efc18172a94 | |
| parent | 237cac14be009b9b7afb908204f35fa94da65116 (diff) | |
Add DCPContent::reference_anything().
| -rw-r--r-- | src/lib/dcp_content.cc | 12 | ||||
| -rw-r--r-- | src/lib/dcp_content.h | 2 |
2 files changed, 14 insertions, 0 deletions
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<const Film> film, TextType type, std::string &) const; + bool reference_anything() const; + void set_cpl (std::string id); boost::optional<std::string> cpl () const { |
