summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-07-29 15:54:09 +0100
committerCarl Hetherington <cth@carlh.net>2016-07-29 15:54:09 +0100
commitfe9d2a290682021cd12a00bf21fa4db3012e2049 (patch)
tree9db9c67b4fc29ecd30ab79c9bbf5b5af25ffda8a /src/lib/config.cc
parent7bdd09c815a8f4ddbb70c9fe3c55fa10b67bc641 (diff)
Basics of custom DCP filename components.
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index a5a42436b..b456c605c 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -31,6 +31,7 @@
#include "cross.h"
#include "raw_convert.h"
#include "kdm_name_format.h"
+#include <dcp/filename_format.h>
#include <dcp/colour_matrix.h>
#include <dcp/certificate_chain.h>
#include <libcxml/cxml.h>
@@ -110,6 +111,7 @@ Config::set_defaults ()
_cinemas_file = path ("cinemas.xml");
_show_hints_before_make_dcp = true;
_kdm_filename_format = KDMNameFormat ("KDM %f %c %s");
+ _dcp_filename_format = dcp::FilenameFormat ("%t_%i");
_allowed_dcp_frame_rates.clear ();
_allowed_dcp_frame_rates.push_back (24);
@@ -293,6 +295,7 @@ try
_cinemas_file = f.optional_string_child("CinemasFile").get_value_or (path ("cinemas.xml").string ());
_show_hints_before_make_dcp = f.optional_bool_child("ShowHintsBeforeMakeDCP").get_value_or (true);
_kdm_filename_format = KDMNameFormat (f.optional_string_child("KDMFilenameFormat").get_value_or ("KDM %f %c %s"));
+ _dcp_filename_format = dcp::FilenameFormat (f.optional_string_child("DCPFilenameFormat").get_value_or ("%t_%i.mxf"));
/* Replace any cinemas from config.xml with those from the configured file */
if (boost::filesystem::exists (_cinemas_file)) {
@@ -451,6 +454,7 @@ Config::write_config_xml () const
root->add_child("CinemasFile")->add_child_text (_cinemas_file.string());
root->add_child("ShowHintsBeforeMakeDCP")->add_child_text (_show_hints_before_make_dcp ? "1" : "0");
root->add_child("KDMFilenameFormat")->add_child_text (_kdm_filename_format.specification ());
+ root->add_child("DCPFilenameFormat")->add_child_text (_dcp_filename_format.specification ());
try {
doc.write_to_file_formatted (path("config.xml").string ());