From a7ad0cdff67faffc6bdaef21c100d4ef4016e406 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 30 May 2021 20:58:31 +0200 Subject: Allow annotation text to be set when combining DCPs. --- src/lib/combine_dcp_job.cc | 13 +++++++++++-- src/lib/combine_dcp_job.h | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/combine_dcp_job.cc b/src/lib/combine_dcp_job.cc index 3497d4b72..ae6d8b289 100644 --- a/src/lib/combine_dcp_job.cc +++ b/src/lib/combine_dcp_job.cc @@ -20,6 +20,7 @@ #include "combine_dcp_job.h" +#include "compose.hpp" #include #include @@ -31,10 +32,11 @@ using std::vector; using std::shared_ptr; -CombineDCPJob::CombineDCPJob (vector inputs, boost::filesystem::path output) +CombineDCPJob::CombineDCPJob (vector inputs, boost::filesystem::path output, string annotation_text) : Job (shared_ptr()) , _inputs (inputs) , _output (output) + , _annotation_text (annotation_text) { } @@ -58,7 +60,14 @@ void CombineDCPJob::run () { try { - dcp::combine (_inputs, _output); + dcp::combine ( + _inputs, + _output, + String::compose("libdcp %1", dcp::version), + String::compose("libdcp %1", dcp::version), + dcp::LocalTime().as_string(), + _annotation_text + ); } catch (dcp::CombineError& e) { set_state (FINISHED_ERROR); set_error (e.what(), ""); diff --git a/src/lib/combine_dcp_job.h b/src/lib/combine_dcp_job.h index 97bf20110..4a7e02b8b 100644 --- a/src/lib/combine_dcp_job.h +++ b/src/lib/combine_dcp_job.h @@ -26,7 +26,7 @@ class CombineDCPJob : public Job { public: - CombineDCPJob (std::vector inputs, boost::filesystem::path output); + CombineDCPJob (std::vector inputs, boost::filesystem::path output, std::string annotation_text); std::string name () const; std::string json_name () const; @@ -35,5 +35,6 @@ public: private: std::vector _inputs; boost::filesystem::path _output; + std::string _annotation_text; }; -- cgit v1.2.3