summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-09-16 10:46:53 +0100
committerCarl Hetherington <cth@carlh.net>2015-09-16 10:46:53 +0100
commitb85420b326b74c7c8125bf599993d71460ad881e (patch)
treec4da8ccf3b3234df7a577452e6b7718788d67f78 /src
parent4e6f15f602c605804f95c6b06af9bf79eaf2dde1 (diff)
Set up OV/VF in name according to whether DCP content has been referenced.
Diffstat (limited to 'src')
-rw-r--r--src/lib/film.cc15
-rw-r--r--src/lib/isdcf_metadata.cc3
-rw-r--r--src/lib/isdcf_metadata.h1
-rw-r--r--src/wx/dcp_panel.cc6
-rw-r--r--src/wx/isdcf_metadata_dialog.cc5
-rw-r--r--src/wx/isdcf_metadata_dialog.h1
6 files changed, 18 insertions, 13 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) */
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index a5105bad9..65bf908a7 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -29,6 +29,7 @@
#include "lib/film.h"
#include "lib/ffmpeg_content.h"
#include "lib/audio_processor.h"
+#include "lib/dcp_content.h"
#include <dcp/key.h>
#include <dcp/raw_convert.h>
#include <wx/wx.h>
@@ -372,7 +373,10 @@ DCPPanel::film_content_changed (int property)
{
if (property == AudioContentProperty::AUDIO_STREAMS ||
property == SubtitleContentProperty::USE_SUBTITLES ||
- property == VideoContentProperty::VIDEO_SCALE) {
+ property == VideoContentProperty::VIDEO_SCALE ||
+ property == DCPContentProperty::REFERENCE_VIDEO ||
+ property == DCPContentProperty::REFERENCE_AUDIO ||
+ property == DCPContentProperty::REFERENCE_SUBTITLE) {
setup_dcp_name ();
}
}
diff --git a/src/wx/isdcf_metadata_dialog.cc b/src/wx/isdcf_metadata_dialog.cc
index 65f3b53ff..a25a2b8df 100644
--- a/src/wx/isdcf_metadata_dialog.cc
+++ b/src/wx/isdcf_metadata_dialog.cc
@@ -51,9 +51,6 @@ ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm, bo
add (_("Facility (e.g. DLA)"), true);
_facility = add (new wxTextCtrl (this, wxID_ANY));
- add (_("Package Type (e.g. OV)"), true);
- _package_type = add (new wxTextCtrl (this, wxID_ANY));
-
_temp_version = add (new wxCheckBox (this, wxID_ANY, _("Temp version")));
add_spacer ();
@@ -85,7 +82,6 @@ ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm, bo
_rating->SetValue (std_to_wx (dm.rating));
_studio->SetValue (std_to_wx (dm.studio));
_facility->SetValue (std_to_wx (dm.facility));
- _package_type->SetValue (std_to_wx (dm.package_type));
_temp_version->SetValue (dm.temp_version);
_pre_release->SetValue (dm.pre_release);
_red_band->SetValue (dm.red_band);
@@ -108,7 +104,6 @@ ISDCFMetadataDialog::isdcf_metadata () const
dm.rating = wx_to_std (_rating->GetValue ());
dm.studio = wx_to_std (_studio->GetValue ());
dm.facility = wx_to_std (_facility->GetValue ());
- dm.package_type = wx_to_std (_package_type->GetValue ());
dm.temp_version = _temp_version->GetValue ();
dm.pre_release = _pre_release->GetValue ();
dm.red_band = _red_band->GetValue ();
diff --git a/src/wx/isdcf_metadata_dialog.h b/src/wx/isdcf_metadata_dialog.h
index db34a7fca..ef5eac40c 100644
--- a/src/wx/isdcf_metadata_dialog.h
+++ b/src/wx/isdcf_metadata_dialog.h
@@ -40,7 +40,6 @@ private:
wxTextCtrl* _rating;
wxTextCtrl* _studio;
wxTextCtrl* _facility;
- wxTextCtrl* _package_type;
wxCheckBox* _temp_version;
wxCheckBox* _pre_release;
wxCheckBox* _red_band;