diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-10-09 20:50:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-10-09 20:50:20 +0100 |
| commit | 71589ebfea5a7adc49f013d405b3158ea612222a (patch) | |
| tree | 205ecd463c7405ee052a0dfd553426d92cef27c5 /src/tools | |
| parent | 23f2dc3bfb94930b938281c7f1e5663b761fa508 (diff) | |
Add SPL class.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index c20c3cbd8..0b84d1c34 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -36,6 +36,8 @@ #include "lib/compose.hpp" #include "lib/dcp_content.h" #include "lib/job_manager.h" +#include "lib/spl.h" +#include "lib/spl_entry.h" #include "lib/job.h" #include "lib/film.h" #include "lib/video_content.h" @@ -315,9 +317,9 @@ public: { dcp::DCP dcp (dir); dcp.read (); - list<SPLEntry> spl; + SPL spl; BOOST_FOREACH (shared_ptr<dcp::CPL> j, dcp.cpls()) { - spl.push_back (SPLEntry(j, dir)); + spl.playlist.push_back (SPLEntry(j, dir)); } set_spl (spl); Config::instance()->add_to_player_history (dir); @@ -366,7 +368,7 @@ public: return optional<dcp::EncryptedKDM>(); } - void set_spl (list<SPLEntry> spl) + void set_spl (SPL spl) { if (_viewer->playing ()) { _viewer->stop (); @@ -374,7 +376,7 @@ public: _film.reset (new Film (optional<boost::filesystem::path>())); - if (spl.empty ()) { + if (spl.playlist.empty ()) { _viewer->set_film (_film); _info->triggered_update (); return; @@ -387,7 +389,7 @@ public: DCPTime position = DCPTime::from_frames(1, _film->video_frame_rate()); shared_ptr<DCPContent> first; - BOOST_FOREACH (SPLEntry i, spl) { + BOOST_FOREACH (SPLEntry i, spl.playlist) { shared_ptr<DCPContent> dcp; try { dcp.reset (new DCPContent (_film, i.directory)); @@ -456,7 +458,7 @@ public: _cpl_menu->Remove (*i); } - if (spl.size() == 1) { + if (spl.playlist.size() == 1) { /* Offer a CPL menu */ DCPExaminer ex (first); int id = ID_view_cpl; |
