From 5e4f750326013cdf8c7d1f7a677f92b4aec436cf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 16 Dec 2025 19:21:04 +0100 Subject: Add can_be_read() to CPL. --- src/cpl.cc | 8 ++++++++ src/cpl.h | 3 +++ 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/cpl.cc b/src/cpl.cc index 9dfff888..ea49eb34 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -842,3 +842,11 @@ CPL::set_main_picture_active_area(dcp::Size area) _main_picture_active_area = area; } + +bool +CPL::can_be_read() const +{ + auto r = reels(); + return std::all_of(r.begin(), r.end(), [](shared_ptr reel) { return reel->can_be_read(); }); +} + diff --git a/src/cpl.h b/src/cpl.h index 5fc56e25..f13bb9c6 100644 --- a/src/cpl.h +++ b/src/cpl.h @@ -125,6 +125,9 @@ public: /** @return true if we have all our encryptable content is encrypted */ bool all_encrypted() const; + /** @return true if all assets are present and can be read */ + bool can_be_read() const; + /** Write a CompositionPlaylist XML file * * @param file Filename to write -- cgit v1.2.3