diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-04-20 21:17:54 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-20 21:17:54 +0200 |
| commit | 86eb90b563efb7ef093d5b17a5d6db0fc330e301 (patch) | |
| tree | 61d19ca8d8222b8191bd12e650bf4f831b42c180 /src/tools | |
| parent | 3855bfd7991b1d7411934fc564dd5714eca6bc1b (diff) | |
Remove DCP class and replace its functionality with a plain method in libdcp.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 18251b4ec..4d4531eee 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -61,6 +61,7 @@ #include <dcp/dcp.h> #include <dcp/raw_convert.h> #include <dcp/exceptions.h> +#include <dcp/search.h> #include <wx/cmdline.h> #include <wx/display.h> #include <wx/preferences.h> @@ -437,9 +438,8 @@ public: /* Offer a CPL menu */ auto first = dynamic_pointer_cast<DCPContent>(_film->content().front()); if (first) { - DCPExaminer ex (first, true); int id = ID_view_cpl; - for (auto i: ex.cpls()) { + for (auto i: dcp::find_and_resolve_cpls(first->directories(), true)) { auto j = _cpl_menu->AppendRadioItem( id, wxString::Format("%s (%s)", std_to_wx(i->annotation_text().get_value_or("")).data(), std_to_wx(i->id()).data()) @@ -694,11 +694,10 @@ private: { auto dcp = std::dynamic_pointer_cast<DCPContent>(_film->content().front()); DCPOMATIC_ASSERT (dcp); - DCPExaminer ex (dcp, true); + auto cpls = dcp::find_and_resolve_cpls (dcp->directories(), true); int id = ev.GetId() - ID_view_cpl; DCPOMATIC_ASSERT (id >= 0); - DCPOMATIC_ASSERT (id < int(ex.cpls().size())); - auto cpls = ex.cpls(); + DCPOMATIC_ASSERT (id < int(cpls.size())); auto i = cpls.begin(); while (id > 0) { ++i; |
