Stop CPL <Creator> tag being configurable and use DCP-o-matic version number instead.
[dcpomatic.git] / src / lib / writer.cc
index 01da6d3b4d9e6c5aad73287e0a8ed8d4c8d1f616..dd2e98eeed5e0b33e484773fea63890a95e4aaa9 100644 (file)
@@ -38,6 +38,7 @@
 #include "job.h"
 #include "cross.h"
 #include "md5_digester.h"
+#include "version.h"
 
 #include "i18n.h"
 
@@ -53,7 +54,6 @@ using std::pair;
 using std::string;
 using std::list;
 using std::cout;
-using std::stringstream;
 using boost::shared_ptr;
 using boost::weak_ptr;
 
@@ -238,11 +238,11 @@ void
 Writer::thread ()
 try
 {
-       while (1)
+       while (true)
        {
                boost::mutex::scoped_lock lock (_mutex);
 
-               while (1) {
+               while (true) {
                        
                        if (_finish || _queued_full_in_memory > _maximum_frames_in_memory || have_sequenced_image_at_queue_head ()) {
                                /* We've got something to do: go and do it */
@@ -472,7 +472,9 @@ Writer::finish ()
                _sound_asset->compute_digest (boost::bind (&Job::set_progress, job.get(), _1, false));
        }
 
-       libdcp::XMLMetadata meta = Config::instance()->dcp_metadata ();
+       libdcp::XMLMetadata meta;
+       meta.issuer = Config::instance()->dcp_issuer ();
+       meta.creator = String::compose ("DCP-o-matic %1 %2", dcpomatic_version, dcpomatic_git_commit);
        meta.set_issue_date_now ();
        dcp.write_xml (_film->interop (), meta, _film->is_signed() ? make_signer () : shared_ptr<const libdcp::Signer> ());
 
@@ -563,7 +565,7 @@ Writer::check_existing_picture_mxf ()
                ++N;
        }
 
-       while (1) {
+       while (true) {
 
                shared_ptr<Job> job = _job.lock ();
                assert (job);