From e00acf99009749508223639454e4e4ab6ed567c9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 24 Jun 2014 22:48:13 +0100 Subject: More attempts to build on Debian unstable. --- cscript | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'cscript') diff --git a/cscript b/cscript index 9a576c2f4..c96fbb000 100644 --- a/cscript +++ b/cscript @@ -97,6 +97,21 @@ deb_depends['7'] = {'libc6': '2.13', 'libcurl3': '7.26.0', 'libzip2': '0.10.1'} +deb_depends['unstable'] = {'libc6': '2.13', + 'libssh-4': '0.5.4', + 'libboost-filesystem1.49.0': '1.49.0', + 'libboost-thread1.49.0': '1.49.0', + 'libsndfile1': '1.0.25', + 'libmagick++5': '8:6.7.7.10', + 'libxml++2.6-2': '2.34.2', + 'libgtk2.0-0': '2.24.10', + 'libxmlsec1': '1.2.18', + 'libboost-date-time1.49.0': '1.49.0', + 'libxmlsec1-openssl': '1.2.18', + 'libcurl3': '7.26.0', + 'libzip2': '0.10.1'} + + def packages(name, packages, f): s = '%s: ' % name for p in packages: -- cgit v1.2.3 From ebaf77e6a4c2fb938adc22f05dcb371fbb8c1221 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Jun 2014 09:19:01 +0100 Subject: Try to fix debian unstable deps. --- cscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cscript') diff --git a/cscript b/cscript index c96fbb000..8259264b4 100644 --- a/cscript +++ b/cscript @@ -99,14 +99,14 @@ deb_depends['7'] = {'libc6': '2.13', deb_depends['unstable'] = {'libc6': '2.13', 'libssh-4': '0.5.4', - 'libboost-filesystem1.49.0': '1.49.0', - 'libboost-thread1.49.0': '1.49.0', + 'libboost-filesystem1.55.0': '1.55.0', + 'libboost-thread1.55.0': '1.55.0', 'libsndfile1': '1.0.25', 'libmagick++5': '8:6.7.7.10', 'libxml++2.6-2': '2.34.2', 'libgtk2.0-0': '2.24.10', 'libxmlsec1': '1.2.18', - 'libboost-date-time1.49.0': '1.49.0', + 'libboost-date-time1.55.0': '1.55.0', 'libxmlsec1-openssl': '1.2.18', 'libcurl3': '7.26.0', 'libzip2': '0.10.1'} -- cgit v1.2.3 From 7a39db80265dc177d0c2de8360bdb77e35896bb3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Jun 2014 10:44:19 +0100 Subject: Pass --debian-unstable to trigger linking hacks as required. --- cscript | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cscript') diff --git a/cscript b/cscript index 8259264b4..5591bbdab 100644 --- a/cscript +++ b/cscript @@ -169,6 +169,9 @@ def build(target, options): elif target.distro == 'centos': cmd += ' --target-centos' + if target.distro == 'debian' and target.version == 'unstable': + cmd += ' --debian-unstable' + target.command(cmd) target.command('./waf') -- cgit v1.2.3 From 223a9a691167cdc2b75627bdd851636b91528f6a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Jun 2014 12:46:39 +0100 Subject: More debian unstable hacks. --- cscript | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cscript') diff --git a/cscript b/cscript index 5591bbdab..f699e8089 100644 --- a/cscript +++ b/cscript @@ -204,6 +204,8 @@ def package_debian(target, cpu, version): target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS')) target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS')) target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH')) + if target.version == 'unstable': + target.set('CDIST_EXTRA_CONFIGURE', '--debian-unstable') target.command('dpkg-buildpackage') debs = [] -- cgit v1.2.3 From a4129317c46490dabaa9903f7c5ded9550285788 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Jun 2014 23:09:37 +0100 Subject: More build fixes. --- cscript | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cscript') diff --git a/cscript b/cscript index f699e8089..fd8d36d1e 100644 --- a/cscript +++ b/cscript @@ -166,12 +166,11 @@ def build(target, options): elif target.platform == 'linux': if target.distro == 'debian' or target.distro == 'ubuntu': cmd += ' --target-debian' + if target.version == 'unstable': + cmd += ' --debian-unstable' elif target.distro == 'centos': cmd += ' --target-centos' - if target.distro == 'debian' and target.version == 'unstable': - cmd += ' --debian-unstable' - target.command(cmd) target.command('./waf') -- cgit v1.2.3 From d1125d09c7741d05b57b1520531a0451663ad66c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 26 Jun 2014 14:35:33 +0100 Subject: Allow user to set video frame rate of video sources (to override the detected one). --- ChangeLog | 2 ++ cscript | 2 +- src/lib/video_content.cc | 15 +++++++++++++++ src/lib/video_content.h | 1 + src/wx/timing_panel.cc | 14 ++++++++------ wscript | 2 +- 6 files changed, 28 insertions(+), 8 deletions(-) (limited to 'cscript') diff --git a/ChangeLog b/ChangeLog index 6b004770c..39acb863e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-06-26 Carl Hetherington + * Allow override of detected video frame rates. + * Optimisation of uncertain effect to encoder and server thread handling. diff --git a/cscript b/cscript index fd8d36d1e..9080a1e09 100644 --- a/cscript +++ b/cscript @@ -157,7 +157,7 @@ def make_control(debian_version, bits, filename, debug): def dependencies(target): return (('ffmpeg-cdist', '67dc770'), - ('libdcp', 'v0.95.0')) + ('libdcp', '2224998')) def build(target, options): cmd = './waf configure --prefix=%s' % target.work_dir_cscript() diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 6f6b2c441..676a694da 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -405,6 +405,21 @@ VideoContent::scale_and_crop_to_fit_height () set_right_crop (crop / 2); } +void +VideoContent::set_video_frame_rate (float r) +{ + { + boost::mutex::scoped_lock lm (_mutex); + if (_video_frame_rate == r) { + return; + } + + _video_frame_rate = r; + } + + signal_changed (VideoContentProperty::VIDEO_FRAME_RATE); +} + VideoContentScale::VideoContentScale (Ratio const * r) : _ratio (r) , _scale (true) diff --git a/src/lib/video_content.h b/src/lib/video_content.h index f23bf0abe..d0b907cb8 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -116,6 +116,7 @@ public: } void set_video_frame_type (VideoFrameType); + void set_video_frame_rate (float); void set_left_crop (int); void set_right_crop (int); diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index 5d21d0a02..ef963bbfc 100644 --- a/src/wx/timing_panel.cc +++ b/src/wx/timing_panel.cc @@ -17,6 +17,7 @@ */ +#include #include "lib/content.h" #include "lib/image_content.h" #include "timing_panel.h" @@ -28,7 +29,7 @@ using std::cout; using std::string; using boost::shared_ptr; using boost::dynamic_pointer_cast; -using boost::lexical_cast; +using libdcp::raw_convert; TimingPanel::TimingPanel (FilmEditor* e) /* horrid hack for apparent lack of context support with wxWidgets i18n code */ @@ -124,7 +125,7 @@ TimingPanel::film_content_changed (int property) if (content) { shared_ptr vc = dynamic_pointer_cast (content); if (vc) { - _video_frame_rate->SetValue (std_to_wx (lexical_cast (vc->video_frame_rate ()))); + _video_frame_rate->SetValue (std_to_wx (raw_convert (vc->video_frame_rate (), 5))); } else { _video_frame_rate->SetValue ("24"); } @@ -133,10 +134,11 @@ TimingPanel::film_content_changed (int property) } } + shared_ptr vc = dynamic_pointer_cast (content); shared_ptr ic = dynamic_pointer_cast (content); _full_length->set_editable (ic && ic->still ()); _play_length->set_editable (!ic || !ic->still ()); - _video_frame_rate->Enable (ic && !ic->still ()); + _video_frame_rate->Enable (vc); _set_video_frame_rate->Enable (false); } @@ -200,9 +202,9 @@ TimingPanel::set_video_frame_rate () { ContentList c = _editor->selected_content (); if (c.size() == 1) { - shared_ptr ic = dynamic_pointer_cast (c.front ()); - if (ic) { - ic->set_video_frame_rate (lexical_cast (wx_to_std (_video_frame_rate->GetValue ()))); + shared_ptr vc = dynamic_pointer_cast (c.front ()); + if (vc) { + vc->set_video_frame_rate (raw_convert (wx_to_std (_video_frame_rate->GetValue ()))); } _set_video_frame_rate->Enable (false); } diff --git a/wscript b/wscript index 82a56e237..866b230c5 100644 --- a/wscript +++ b/wscript @@ -56,7 +56,7 @@ def dynamic_openjpeg(conf): conf.check_cfg(package='libopenjpeg', args='--cflags --libs', max_version='1.5.2', mandatory=True) def static_dcp(conf, static_boost, static_xmlpp, static_xmlsec, static_ssh): - conf.check_cfg(package='libdcp', atleast_version='0.92', args='--cflags', uselib_store='DCP', mandatory=True) + conf.check_cfg(package='libdcp', atleast_version='0.95', args='--cflags', uselib_store='DCP', mandatory=True) conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP] conf.env.STLIB_DCP = ['dcp', 'asdcp-libdcp', 'kumu-libdcp'] conf.env.LIB_DCP = ['glibmm-2.4', 'ssl', 'crypto', 'bz2', 'xslt'] -- cgit v1.2.3 From 075f418cc6d9be06bed7a1d98257ae8d17ef3019 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 26 Jun 2014 19:15:56 +0100 Subject: Support different KDM formulations. --- ChangeLog | 2 ++ cscript | 2 +- src/lib/film.cc | 10 ++++++---- src/lib/film.h | 8 +++++--- src/lib/kdm.cc | 21 +++++++++++++-------- src/lib/kdm.h | 5 ++++- src/lib/send_kdm_email_job.cc | 6 ++++-- src/lib/send_kdm_email_job.h | 5 ++++- src/tools/dcpomatic.cc | 4 ++-- src/tools/dcpomatic_kdm.cc | 21 +++++++++++++++++---- src/wx/kdm_dialog.cc | 23 +++++++++++++++++++++++ src/wx/kdm_dialog.h | 2 ++ 12 files changed, 83 insertions(+), 26 deletions(-) (limited to 'cscript') diff --git a/ChangeLog b/ChangeLog index 39acb863e..bcf3cdb79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-06-26 Carl Hetherington + * Support different KDM formulations. + * Allow override of detected video frame rates. * Optimisation of uncertain effect to encoder and server diff --git a/cscript b/cscript index 9080a1e09..af3921e2f 100644 --- a/cscript +++ b/cscript @@ -157,7 +157,7 @@ def make_control(debian_version, bits, filename, debug): def dependencies(target): return (('ffmpeg-cdist', '67dc770'), - ('libdcp', '2224998')) + ('libdcp', '7103135')) def build(target, options): cmd = './waf configure --prefix=%s' % target.work_dir_cscript() diff --git a/src/lib/film.cc b/src/lib/film.cc index 940eba1eb..0a77caf50 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1086,7 +1086,8 @@ Film::make_kdm ( shared_ptr target, boost::filesystem::path cpl_file, boost::posix_time::ptime from, - boost::posix_time::ptime until + boost::posix_time::ptime until, + libdcp::KDM::Formulation formulation ) const { shared_ptr signer = make_signer (); @@ -1095,7 +1096,7 @@ Film::make_kdm ( struct tm* tm = localtime (&now); string const issue_date = libdcp::tm_to_string (tm); - return libdcp::KDM (cpl_file, signer, target, key (), from, until, "DCP-o-matic", issue_date); + return libdcp::KDM (cpl_file, signer, target, key (), from, until, "DCP-o-matic", issue_date, formulation); } list @@ -1103,13 +1104,14 @@ Film::make_kdms ( list > screens, boost::filesystem::path dcp, boost::posix_time::ptime from, - boost::posix_time::ptime until + boost::posix_time::ptime until, + libdcp::KDM::Formulation formulation ) const { list kdms; for (list >::iterator i = screens.begin(); i != screens.end(); ++i) { - kdms.push_back (make_kdm ((*i)->certificate, dcp, from, until)); + kdms.push_back (make_kdm ((*i)->certificate, dcp, from, until, formulation)); } return kdms; diff --git a/src/lib/film.h b/src/lib/film.h index cbe6d7b6b..b7d105688 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -128,14 +128,16 @@ public: boost::shared_ptr target, boost::filesystem::path cpl_file, boost::posix_time::ptime from, - boost::posix_time::ptime until + boost::posix_time::ptime until, + libdcp::KDM::Formulation formulation ) const; std::list make_kdms ( std::list >, boost::filesystem::path cpl_file, boost::posix_time::ptime from, - boost::posix_time::ptime until + boost::posix_time::ptime until, + libdcp::KDM::Formulation formulation ) const; libdcp::Key key () const { diff --git a/src/lib/kdm.cc b/src/lib/kdm.cc index 5efea089c..49bfae20a 100644 --- a/src/lib/kdm.cc +++ b/src/lib/kdm.cc @@ -105,10 +105,11 @@ make_screen_kdms ( list > screens, boost::filesystem::path cpl, boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation ) { - list kdms = film->make_kdms (screens, cpl, from, to); + list kdms = film->make_kdms (screens, cpl, from, to, formulation); list screen_kdms; @@ -129,10 +130,11 @@ make_cinema_kdms ( list > screens, boost::filesystem::path cpl, boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation ) { - list screen_kdms = make_screen_kdms (film, screens, cpl, from, to); + list screen_kdms = make_screen_kdms (film, screens, cpl, from, to, formulation); list cinema_kdms; while (!screen_kdms.empty ()) { @@ -175,10 +177,11 @@ write_kdm_files ( boost::filesystem::path cpl, boost::posix_time::ptime from, boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation, boost::filesystem::path directory ) { - list screen_kdms = make_screen_kdms (film, screens, cpl, from, to); + list screen_kdms = make_screen_kdms (film, screens, cpl, from, to, formulation); /* Write KDMs to the specified directory */ for (list::iterator i = screen_kdms.begin(); i != screen_kdms.end(); ++i) { @@ -195,10 +198,11 @@ write_kdm_zip_files ( boost::filesystem::path cpl, boost::posix_time::ptime from, boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation, boost::filesystem::path directory ) { - list cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to); + list cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to, formulation); for (list::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) { boost::filesystem::path path = directory; @@ -213,10 +217,11 @@ email_kdms ( list > screens, boost::filesystem::path cpl, boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation ) { - list cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to); + list cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to, formulation); for (list::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) { diff --git a/src/lib/kdm.h b/src/lib/kdm.h index 8aacd7b72..8fb4ec494 100644 --- a/src/lib/kdm.h +++ b/src/lib/kdm.h @@ -29,6 +29,7 @@ extern void write_kdm_files ( boost::filesystem::path cpl, boost::posix_time::ptime from, boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation, boost::filesystem::path directory ); @@ -38,6 +39,7 @@ extern void write_kdm_zip_files ( boost::filesystem::path cpl, boost::posix_time::ptime from, boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation, boost::filesystem::path directory ); @@ -46,6 +48,7 @@ extern void email_kdms ( std::list > screens, boost::filesystem::path cpl, boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation ); diff --git a/src/lib/send_kdm_email_job.cc b/src/lib/send_kdm_email_job.cc index 8af0b556a..1dec2ffb0 100644 --- a/src/lib/send_kdm_email_job.cc +++ b/src/lib/send_kdm_email_job.cc @@ -33,13 +33,15 @@ SendKDMEmailJob::SendKDMEmailJob ( list > screens, boost::filesystem::path dcp, boost::posix_time::ptime from, - boost::posix_time::ptime to + boost::posix_time::ptime to, + libdcp::KDM::Formulation formulation ) : Job (f) , _screens (screens) , _dcp (dcp) , _from (from) , _to (to) + , _formulation (formulation) { } @@ -62,7 +64,7 @@ SendKDMEmailJob::run () try { set_progress_unknown (); - email_kdms (_film, _screens, _dcp, _from, _to); + email_kdms (_film, _screens, _dcp, _from, _to, _formulation); set_progress (1); set_state (FINISHED_OK); diff --git a/src/lib/send_kdm_email_job.h b/src/lib/send_kdm_email_job.h index f4d154a91..8a8903040 100644 --- a/src/lib/send_kdm_email_job.h +++ b/src/lib/send_kdm_email_job.h @@ -18,6 +18,7 @@ */ #include +#include #include "job.h" class Screen; @@ -30,7 +31,8 @@ public: std::list >, boost::filesystem::path, boost::posix_time::ptime, - boost::posix_time::ptime + boost::posix_time::ptime, + libdcp::KDM::Formulation ); std::string name () const; @@ -42,4 +44,5 @@ private: boost::filesystem::path _dcp; boost::posix_time::ptime _from; boost::posix_time::ptime _to; + libdcp::KDM::Formulation _formulation; }; diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index c9d17eb9b..588fd5c48 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -470,10 +470,10 @@ private: try { if (d->write_to ()) { - write_kdm_files (film, d->screens (), d->cpl (), d->from (), d->until (), d->directory ()); + write_kdm_files (film, d->screens (), d->cpl (), d->from (), d->until (), d->formulation (), d->directory ()); } else { JobManager::instance()->add ( - shared_ptr (new SendKDMEmailJob (film, d->screens (), d->cpl (), d->from (), d->until ())) + shared_ptr (new SendKDMEmailJob (film, d->screens (), d->cpl (), d->from (), d->until (), d->formulation ())) ); } } catch (libdcp::NotEncryptedError& e) { diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 041f6c7ef..8c26ba4cc 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -44,6 +44,7 @@ help () " -f, --valid-from valid from time (e.g. \"2013-09-28 01:41:51\") or \"now\"\n" " -t, --valid-to valid to time (e.g. \"2014-09-28 01:41:51\")\n" " -d, --valid-duration valid duration (e.g. \"1 day\", \"4 hours\", \"2 weeks\")\n" + " --formulation modified-transitional-1, dci-any or dci-specific [default modified-transitional-1]\n" " -z, --zip ZIP each cinema's KDMs into its own file\n" " -v, --verbose be verbose\n" " -c, --cinema specify a cinema, either by name or email address\n" @@ -110,6 +111,7 @@ int main (int argc, char* argv[]) bool cinemas = false; string duration_string; bool verbose = false; + libdcp::KDM::Formulation formulation = libdcp::KDM::MODIFIED_TRANSITIONAL_1; program_name = argv[0]; @@ -126,10 +128,11 @@ int main (int argc, char* argv[]) { "zip", no_argument, 0, 'z' }, { "duration", required_argument, 0, 'd' }, { "verbose", no_argument, 0, 'v' }, + { "formulation", required_argument, 0, 'C' }, { 0, 0, 0, 0 } }; - int c = getopt_long (argc, argv, "ho:f:t:c:A:Bzd:v", long_options, &option_index); + int c = getopt_long (argc, argv, "ho:f:t:c:A:Bzd:vC:", long_options, &option_index); if (c == -1) { break; @@ -166,6 +169,16 @@ int main (int argc, char* argv[]) case 'v': verbose = true; break; + case 'C': + if (string (optarg) == "modified-transitional-1") { + formulation = libdcp::KDM::MODIFIED_TRANSITIONAL_1; + } else if (string (optarg) == "dci-any") { + formulation = libdcp::KDM::DCI_ANY; + } else if (string (optarg) == "dci-specific") { + formulation = libdcp::KDM::DCI_SPECIFIC; + } else { + error ("unrecognised KDM formulation " + formulation); + } } } @@ -236,7 +249,7 @@ int main (int argc, char* argv[]) } shared_ptr certificate (new libdcp::Certificate (boost::filesystem::path (certificate_file))); - libdcp::KDM kdm = film->make_kdm (certificate, cpl, valid_from.get(), valid_to.get()); + libdcp::KDM kdm = film->make_kdm (certificate, cpl, valid_from.get(), valid_to.get(), formulation); kdm.as_xml (output); if (verbose) { cout << "Generated KDM " << output << " for certificate.\n"; @@ -260,12 +273,12 @@ int main (int argc, char* argv[]) try { if (zip) { - write_kdm_zip_files (film, (*i)->screens(), cpl, valid_from.get(), valid_to.get(), output); + write_kdm_zip_files (film, (*i)->screens(), cpl, valid_from.get(), valid_to.get(), formulation, output); if (verbose) { cout << "Wrote ZIP files to " << output << "\n"; } } else { - write_kdm_files (film, (*i)->screens(), cpl, valid_from.get(), valid_to.get(), output); + write_kdm_files (film, (*i)->screens(), cpl, valid_from.get(), valid_to.get(), formulation, output); if (verbose) { cout << "Wrote KDM files to " << output << "\n"; } diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index 6750e0e98..8df94de9c 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -159,6 +159,14 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr film) table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, 0); + add_label_to_sizer (table, this, _("KDM type"), true); + _type = new wxChoice (this, wxID_ANY); + _type->Append ("Modified Transitional 1"); + _type->Append ("DCI Any"); + _type->Append ("DCI Specific"); + table->Add (_type, 1, wxEXPAND); + _type->SetSelection (0); + _write_to = new wxRadioButton (this, wxID_ANY, _("Write to")); table->Add (_write_to, 1, wxEXPAND); @@ -480,6 +488,21 @@ KDMDialog::write_to () const return _write_to->GetValue (); } +libdcp::KDM::Formulation +KDMDialog::formulation () const +{ + switch (_type->GetSelection()) { + case 0: + return libdcp::KDM::MODIFIED_TRANSITIONAL_1; + case 1: + return libdcp::KDM::DCI_ANY; + case 2: + return libdcp::KDM::DCI_SPECIFIC; + default: + assert (false); + } +} + void KDMDialog::update_cpl_choice () { diff --git a/src/wx/kdm_dialog.h b/src/wx/kdm_dialog.h index 6327b29e8..13e9196ea 100644 --- a/src/wx/kdm_dialog.h +++ b/src/wx/kdm_dialog.h @@ -48,6 +48,7 @@ public: boost::filesystem::path cpl () const; boost::filesystem::path directory () const; bool write_to () const; + libdcp::KDM::Formulation formulation () const; private: void add_cinema (boost::shared_ptr); @@ -83,6 +84,7 @@ private: wxStaticText* _dcp_directory; wxStaticText* _cpl_id; wxStaticText* _cpl_annotation_text; + wxChoice* _type; wxRadioButton* _write_to; #ifdef DCPOMATIC_USE_OWN_DIR_PICKER DirPickerCtrl* _folder; -- cgit v1.2.3