diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-04 09:29:41 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-21 21:56:50 +0200 |
| commit | 84f34d497d26270753a76fb323231f4ece9ff18d (patch) | |
| tree | a0b68b60058033a5af7ab5a4e70c14936b219218 | |
| parent | 9443a80b0f6cda3a94bbb6773b8090a989b57f6f (diff) | |
Adapt for changes to libdcp API.
| -rw-r--r-- | src/lib/dcp_examiner.cc | 4 | ||||
| -rw-r--r-- | src/lib/util.cc | 4 | ||||
| -rw-r--r-- | src/lib/writer.cc | 36 |
3 files changed, 29 insertions, 15 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 44513ff45..65cfb884e 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -259,8 +259,8 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) _standard = cpl->standard().get(); _three_d = !cpl->reels().empty() && cpl->reels().front()->main_picture() && dynamic_pointer_cast<dcp::StereoPictureAsset> (cpl->reels().front()->main_picture()->asset()); - _ratings = list_to_vector (cpl->ratings()); - _content_version = cpl->content_version_label_text (); + _ratings = cpl->ratings(); + _content_version = cpl->content_version().label_text; _cpl = cpl->id (); } diff --git a/src/lib/util.cc b/src/lib/util.cc index 8ac395b37..7824e7fed 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -833,6 +833,10 @@ audio_channel_types (list<int> mapped, int channels) break; case dcp::HI: case dcp::VI: + case dcp::SYNC_SIGNAL: + case dcp::SIGN_LANGUAGE: + case dcp::UNUSED: + case dcp::CHANNEL_COUNT: break; } } diff --git a/src/lib/writer.cc b/src/lib/writer.cc index dc552e6cb..8cfd712a0 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -568,21 +568,23 @@ Writer::finish () cpl->add (i.create_reel (_reel_assets, _fonts)); } - dcp::XMLMetadata meta; - meta.annotation_text = cpl->annotation_text (); - meta.creator = Config::instance()->dcp_creator (); - if (meta.creator.empty ()) { - meta.creator = String::compose ("DCP-o-matic %1 %2", dcpomatic_version, dcpomatic_git_commit); + string creator = Config::instance()->dcp_creator(); + if (creator.empty()) { + creator = String::compose("DCP-o-matic %1 %2", dcpomatic_version, dcpomatic_git_commit); } - meta.issuer = Config::instance()->dcp_issuer (); - if (meta.issuer.empty ()) { - meta.issuer = String::compose ("DCP-o-matic %1 %2", dcpomatic_version, dcpomatic_git_commit); + + string issuer = Config::instance()->dcp_issuer(); + if (issuer.empty()) { + issuer = String::compose("DCP-o-matic %1 %2", dcpomatic_version, dcpomatic_git_commit); } - meta.set_issue_date_now (); - cpl->set_metadata (meta); - cpl->set_ratings (vector_to_list(_film->ratings())); - cpl->set_content_version_label_text (_film->content_version()); + cpl->set_ratings (_film->ratings()); + + dcp::ContentVersion cv = cpl->content_version (); + cv.label_text = _film->content_version(); + cpl->set_content_version (cv); + + cpl->set_full_content_title_text (_film->name()); shared_ptr<const dcp::CertificateChain> signer; signer = Config::instance()->signer_chain (); @@ -592,7 +594,15 @@ Writer::finish () throw InvalidSignerError (reason); } - dcp.write_xml (_film->interop () ? dcp::INTEROP : dcp::SMPTE, meta, signer, Config::instance()->dcp_metadata_filename_format()); + dcp.write_xml ( + _film->interop() ? dcp::INTEROP : dcp::SMPTE, + issuer, + creator, + dcp::LocalTime().as_string(), + String::compose("Created by libdcp %1", dcp::version), + signer, + Config::instance()->dcp_metadata_filename_format() + ); LOG_GENERAL ( N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT, %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk |
