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/film.cc | |
| parent | 783991b0f89d948f760829b923490210fb52f56a (diff) | |
Move CPLSummary into a faster version in libdcp.
Diffstat (limited to 'src/lib/film.cc')
| -rw-r--r-- | src/lib/film.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 5e46d8615..56d7b47a6 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1414,14 +1414,14 @@ Film::j2c_path(int reel, Frame frame, Eyes eyes, bool tmp) const /** Find all the DCPs in our directory that can be dcp::DCP::read() and return details of their CPLs. * The list will be returned in reverse order of timestamp (i.e. most recent first). */ -vector<CPLSummary> +vector<dcp::CPLSummary> Film::cpls() const { if (!directory()) { return {}; } - vector<CPLSummary> out; + vector<dcp::CPLSummary> out; auto const dir = directory().get(); for (auto const& item: dcp::filesystem::directory_iterator(dir)) { @@ -1431,14 +1431,15 @@ Film::cpls() const ) { try { - out.push_back(CPLSummary(item)); - } catch (...) { - - } + dcp::DCP dcp(item.path()); + for (auto cpl: dcp.cpl_summaries()) { + out.push_back(cpl); + } + } catch (...) {} } } - sort(out.begin(), out.end(), [](CPLSummary const& a, CPLSummary const& b) { + sort(out.begin(), out.end(), [](dcp::CPLSummary const& a, dcp::CPLSummary const& b) { return a.last_write_time > b.last_write_time; }); |
