diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-09 01:11:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-09 02:41:38 +0100 |
| commit | 7987b15d5555adc506b207f32617798f85315961 (patch) | |
| tree | 20ed24a9846a46dc1739ed0a061d22b0df372a8b /src/lib/types.cc | |
| parent | 783991b0f89d948f760829b923490210fb52f56a (diff) | |
Move CPLSummary into a faster version in libdcp.
Diffstat (limited to 'src/lib/types.cc')
| -rw-r--r-- | src/lib/types.cc | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/lib/types.cc b/src/lib/types.cc index 7247a726a..7f816b89a 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -18,6 +18,7 @@ */ +#include "timer.h" #include "types.h" #include "dcpomatic_assert.h" #include <dcp/cpl.h> @@ -41,40 +42,6 @@ using std::shared_ptr; using std::vector; -CPLSummary::CPLSummary (boost::filesystem::path p) - : dcp_directory(p.filename().string()) -{ - dcp::DCP dcp (p); - - vector<dcp::VerificationNote> notes; - dcp.read (¬es); - for (auto i: notes) { - if (i.code() != dcp::VerificationNote::Code::EXTERNAL_ASSET) { - /* It's not just a warning about this DCP being a VF */ - throw dcp::ReadError(dcp::note_to_string(i)); - } - } - - cpl_id = dcp.cpls().front()->id(); - cpl_annotation_text = dcp.cpls().front()->annotation_text(); - cpl_file = dcp.cpls().front()->file().get(); - - encrypted = false; - for (auto j: dcp.cpls()) { - for (auto k: j->reel_file_assets()) { - if (k->encrypted()) { - encrypted = true; - } - } - } - - boost::system::error_code ec; - auto last_write = dcp::filesystem::last_write_time(p, ec); - last_write_time = ec ? 0 : last_write; -} - - - ReelType string_to_reel_type(string type) { |
