From 5c56edb56a36a06c3ea12b1df67f5ad45983cb0d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 26 Apr 2022 00:32:21 +0200 Subject: Add CPL::set(). --- src/cpl.cc | 9 ++++++++- src/cpl.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cpl.cc b/src/cpl.cc index 1f20d13e..815f9a76 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -171,6 +171,13 @@ CPL::add (std::shared_ptr reel) } +void +CPL::set (std::vector> reels) +{ + _reels = reels; +} + + void CPL::write_xml (boost::filesystem::path file, shared_ptr signer) const { @@ -700,7 +707,7 @@ CPL::unset_version_number () void CPL::set_content_versions (vector v) { - set ids; + std::set ids; for (auto i: v) { if (!ids.insert(i.id).second) { throw DuplicateIdError ("Duplicate ID in ContentVersion list"); diff --git a/src/cpl.h b/src/cpl.h index 43c8a56e..439aeda0 100644 --- a/src/cpl.h +++ b/src/cpl.h @@ -95,6 +95,8 @@ public: */ void add (std::shared_ptr reel); + void set (std::vector> reels); + /** Add a KDM to this CPL. If the KDM is for any of this CPLs assets it will be used * to decrypt those assets. * @param kdm KDM. -- cgit v1.2.3