diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-16 19:21:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-18 01:10:32 +0100 |
| commit | 5e4f750326013cdf8c7d1f7a677f92b4aec436cf (patch) | |
| tree | 1243859e67e0096f5a23f001e96b9f954cd85ec4 /src | |
| parent | 6e4dfa6cba7cb878bc3931140189cbf35dd4718b (diff) | |
Add can_be_read() to CPL.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpl.cc | 8 | ||||
| -rw-r--r-- | src/cpl.h | 3 |
2 files changed, 11 insertions, 0 deletions
@@ -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<const Reel> reel) { return reel->can_be_read(); }); +} + @@ -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 |
