Add DCPContent::reference_anything().
authorCarl Hetherington <cth@carlh.net>
Tue, 6 May 2025 15:47:11 +0000 (17:47 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 7 May 2025 23:29:35 +0000 (01:29 +0200)
src/lib/dcp_content.cc
src/lib/dcp_content.h

index 255660b54c8062b64824b7938e741107c680abe4..4df0c4618f2d2563c6e3f3e15b7595d714fc6a89 100644 (file)
@@ -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();
+}
+
index 4bef0a1a79b33d84b11418ba849aba5eb6ec4087..d4527febdde9ea602d00c4552e2a130559a94b11 100644 (file)
@@ -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 {