diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-16 10:46:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-16 10:46:53 +0100 |
| commit | b85420b326b74c7c8125bf599993d71460ad881e (patch) | |
| tree | c4da8ccf3b3234df7a577452e6b7718788d67f78 /src/lib | |
| parent | 4e6f15f602c605804f95c6b06af9bf79eaf2dde1 (diff) | |
Set up OV/VF in name according to whether DCP content has been referenced.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/film.cc | 15 | ||||
| -rw-r--r-- | src/lib/isdcf_metadata.cc | 3 | ||||
| -rw-r--r-- | src/lib/isdcf_metadata.h | 1 |
3 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index c89d96584..6514efde8 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -48,6 +48,7 @@ #include "video_content.h" #include "subtitle_content.h" #include "ffmpeg_content.h" +#include "dcp_content.h" #include <libcxml/cxml.h> #include <dcp/cpl.h> #include <dcp/certificate_chain.h> @@ -674,8 +675,18 @@ Film::isdcf_name (bool if_created_now) const d << "-3D"; } - if (!dm.package_type.empty ()) { - d << "_" << dm.package_type; + bool vf = false; + BOOST_FOREACH (shared_ptr<Content> i, content ()) { + shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (i); + if (dc && (dc->reference_video() || dc->reference_audio() || dc->reference_subtitle())) { + vf = true; + } + } + + if (vf) { + d << "_VF"; + } else { + d << "_OV"; } return d.str (); diff --git a/src/lib/isdcf_metadata.cc b/src/lib/isdcf_metadata.cc index f201844ca..a6461727e 100644 --- a/src/lib/isdcf_metadata.cc +++ b/src/lib/isdcf_metadata.cc @@ -36,7 +36,6 @@ ISDCFMetadata::ISDCFMetadata (cxml::ConstNodePtr node) , rating (node->string_child ("Rating")) , studio (node->string_child ("Studio")) , facility (node->string_child ("Facility")) - , package_type (node->string_child ("PackageType")) /* This stuff was added later */ , temp_version (node->optional_bool_child ("TempVersion").get_value_or (false)) , pre_release (node->optional_bool_child ("PreRelease").get_value_or (false)) @@ -58,7 +57,6 @@ ISDCFMetadata::as_xml (xmlpp::Node* root) const root->add_child("Rating")->add_child_text (rating); root->add_child("Studio")->add_child_text (studio); root->add_child("Facility")->add_child_text (facility); - root->add_child("PackageType")->add_child_text (package_type); root->add_child("TempVersion")->add_child_text (temp_version ? "1" : "0"); root->add_child("PreRelease")->add_child_text (pre_release ? "1" : "0"); root->add_child("RedBand")->add_child_text (red_band ? "1" : "0"); @@ -77,7 +75,6 @@ operator== (ISDCFMetadata const & a, ISDCFMetadata const & b) a.rating == b.rating && a.studio == b.studio && a.facility == b.facility && - a.package_type == b.package_type && a.temp_version == b.temp_version && a.pre_release == b.pre_release && a.red_band == b.red_band && diff --git a/src/lib/isdcf_metadata.h b/src/lib/isdcf_metadata.h index cf4ad34bc..d07cd8605 100644 --- a/src/lib/isdcf_metadata.h +++ b/src/lib/isdcf_metadata.h @@ -50,7 +50,6 @@ public: std::string rating; std::string studio; std::string facility; - std::string package_type; /** true if this is a temporary version (without final picture or sound) */ bool temp_version; /** true if this is a pre-release version (final picture and sound, but without accessibility features) */ |
