diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-10-06 10:37:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-10-06 10:37:19 +0100 |
| commit | 0ac8235fa4addb021c0e05a9c6c19a7d22097458 (patch) | |
| tree | b270e0817120ea506d2d0864c5db32cf8441934c /src/lib | |
| parent | f71b2b1d19d4ed27c225b03dcea32271d9a00d6f (diff) | |
Add menu option to select CPL.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp.h | 4 | ||||
| -rw-r--r-- | src/lib/dcp_content.cc | 7 | ||||
| -rw-r--r-- | src/lib/dcp_content.h | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/dcp.h b/src/lib/dcp.h index d83f95f37..e2e83e96e 100644 --- a/src/lib/dcp.h +++ b/src/lib/dcp.h @@ -29,12 +29,14 @@ class DCPContent; class DCP { +public: + std::list<boost::shared_ptr<dcp::CPL> > cpls () const; + protected: DCP (boost::shared_ptr<const DCPContent> content) : _dcp_content (content) {} - std::list<boost::shared_ptr<dcp::CPL> > cpls () const; boost::shared_ptr<const DCPContent> _dcp_content; }; diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 1f844541c..0d36118e7 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -490,3 +490,10 @@ DCPContent::use_template (shared_ptr<const Content> c) _reference_audio = dc->_reference_audio; _reference_subtitle = dc->_reference_subtitle; } + +void +DCPContent::set_cpl (string id) +{ + boost::mutex::scoped_lock lm (_mutex); + _cpl = id; +} diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 93a207ed7..21b654c96 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -115,6 +115,8 @@ public: bool can_reference_subtitle (std::list<std::string> &) const; + void set_cpl (std::string id); + boost::optional<std::string> cpl () const { boost::mutex::scoped_lock lm (_mutex); return _cpl; |
