diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-09-24 23:19:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-09-24 23:19:08 +0100 |
| commit | f8005516a681b805ccc2d929f63312ac711fdc24 (patch) | |
| tree | 9785795f122a1be7fcae2498dd9c7ac80b219fcd /src | |
| parent | e9ab736ffa8088301edd658afcc98a9add517205 (diff) | |
Allow setting of a CPL's MXF keys.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpl.cc | 8 | ||||
| -rw-r--r-- | src/cpl.h | 2 | ||||
| -rw-r--r-- | src/reel.cc | 11 | ||||
| -rw-r--r-- | src/reel.h | 3 |
4 files changed, 24 insertions, 0 deletions
@@ -377,3 +377,11 @@ CPL::asset_from_id (list<PathAssetMap> asset_maps, string id) const return make_pair ("", shared_ptr<const parse::AssetMapAsset> ()); } + +void +CPL::set_mxf_keys (Key key) +{ + for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) { + (*i)->set_mxf_keys (key); + } +} @@ -86,6 +86,8 @@ public: bool encrypted () const; + void set_mxf_keys (Key); + std::string id () const { return _id; } diff --git a/src/reel.cc b/src/reel.cc index ffb184ab..51aa560c 100644 --- a/src/reel.cc +++ b/src/reel.cc @@ -104,3 +104,14 @@ Reel::add_kdm (KDM const & kdm) } } } + +void +Reel::set_mxf_keys (Key key) +{ + _main_picture->set_key (key); + if (_main_sound) { + _main_sound->set_key (key); + } + + /* XXX: subtitle asset? */ +} @@ -24,6 +24,7 @@ #include <boost/shared_ptr.hpp> #include <boost/function.hpp> #include <libxml++/libxml++.h> +#include <libdcp/key.h> #include "types.h" namespace xmlpp { @@ -66,6 +67,8 @@ public: void write_to_cpl (xmlpp::Element *, bool) const; bool encrypted () const; + + void set_mxf_keys (libdcp::Key); bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> notes) const; |
