projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1ba7bca
)
More various KDM fixes.
author
Carl Hetherington
<cth@carlh.net>
Fri, 20 Sep 2013 17:47:13 +0000
(18:47 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 20 Sep 2013 17:47:13 +0000
(18:47 +0100)
src/lib/cinema.cc
patch
|
blob
|
history
src/lib/film.cc
patch
|
blob
|
history
src/lib/util.cc
patch
|
blob
|
history
src/wx/kdm_dialog.cc
patch
|
blob
|
history
src/wx/kdm_dialog.h
patch
|
blob
|
history
diff --git
a/src/lib/cinema.cc
b/src/lib/cinema.cc
index ecd083f0aa1d0407cfd3c3adc5621b0a261c3d84..7af4372f59981fe2b444a0286a829abf8bc88164 100644
(file)
--- a/
src/lib/cinema.cc
+++ b/
src/lib/cinema.cc
@@
-31,7
+31,7
@@
Cinema::Cinema (shared_ptr<const cxml::Node> node)
list<shared_ptr<cxml::Node> > s = node->node_children ("Screen");
for (list<shared_ptr<cxml::Node> >::iterator i = s.begin(); i != s.end(); ++i) {
list<shared_ptr<cxml::Node> > s = node->node_children ("Screen");
for (list<shared_ptr<cxml::Node> >::iterator i = s.begin(); i != s.end(); ++i) {
-
_screens.push_back
(shared_ptr<Screen> (new Screen (*i)));
+
add_screen
(shared_ptr<Screen> (new Screen (*i)));
}
}
}
}
diff --git
a/src/lib/film.cc
b/src/lib/film.cc
index 1e76dac2cab8e8b900100ca1fb0b73fe82a6aec0..7088761511c0bc6262d4b0508b4de04202fc5ab7 100644
(file)
--- a/
src/lib/film.cc
+++ b/
src/lib/film.cc
@@
-933,26
+933,31
@@
Film::make_kdms (
/* Find the DCP to make the KDM for */
string const dir = this->directory ();
/* Find the DCP to make the KDM for */
string const dir = this->directory ();
- list<
string
> dcps;
+ list<
boost::filesystem::path
> dcps;
for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator(dir); i != boost::filesystem::directory_iterator(); ++i) {
for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator(dir); i != boost::filesystem::directory_iterator(); ++i) {
- if (boost::filesystem::is_directory (*i) && i->path().leaf() != "j2c" && i->path().leaf() != "
wavs
") {
- dcps.push_back (i->path()
.string()
);
+ if (boost::filesystem::is_directory (*i) && i->path().leaf() != "j2c" && i->path().leaf() != "
video" && i->path().leaf() != "info
") {
+ dcps.push_back (i->path());
}
}
if (dcps.empty()) {
}
}
if (dcps.empty()) {
- throw KDMError (
"Could not find DCP to make KDM for"
);
+ throw KDMError (
_("Could not find DCP to make KDM for")
);
} else if (dcps.size() > 1) {
} else if (dcps.size() > 1) {
- throw KDMError (
"More than one possible DCP to make KDM for"
);
+ throw KDMError (
_("More than one possible DCP to make KDM for")
);
}
for (list<shared_ptr<Screen> >::iterator i = screens.begin(); i != screens.end(); ++i) {
libdcp::DCP dcp (dcps.front ());
}
for (list<shared_ptr<Screen> >::iterator i = screens.begin(); i != screens.end(); ++i) {
libdcp::DCP dcp (dcps.front ());
- dcp.read ();
+
+ try {
+ dcp.read ();
+ } catch (...) {
+ throw KDMError (_("Could not read DCP to make KDM for"));
+ }
shared_ptr<xmlpp::Document> kdm = dcp.cpls().front()->make_kdm (
shared_ptr<xmlpp::Document> kdm = dcp.cpls().front()->make_kdm (
- signer, (*i)->certificate, from, until, _interop, libdcp::MXFMetadata (), Config::instance()->dcp_metadata ()
+ signer, (*i)->certificate,
key (),
from, until, _interop, libdcp::MXFMetadata (), Config::instance()->dcp_metadata ()
);
boost::filesystem::path out = directory;
);
boost::filesystem::path out = directory;
diff --git
a/src/lib/util.cc
b/src/lib/util.cc
index 4e4493ac785ba1edecb3bdd68a2df1f6c03af676..667ee8ce95926f8c10bf24db3c71d2a41fa77b76 100644
(file)
--- a/
src/lib/util.cc
+++ b/
src/lib/util.cc
@@
-275,6
+275,8
@@
dcpomatic_setup ()
#endif
avfilter_register_all ();
#endif
avfilter_register_all ();
+
+ libdcp::init ();
Ratio::setup_ratios ();
DCPContentType::setup_dcp_content_types ();
Ratio::setup_ratios ();
DCPContentType::setup_dcp_content_types ();
diff --git
a/src/wx/kdm_dialog.cc
b/src/wx/kdm_dialog.cc
index c8db016aa4badb582a6401ebffbef43afb033eb1..c8212636a210d73a45e2f731b997416efffd8c29 100644
(file)
--- a/
src/wx/kdm_dialog.cc
+++ b/
src/wx/kdm_dialog.cc
@@
-26,7
+26,7
@@
#include "cinema_dialog.h"
#include "screen_dialog.h"
#include "wx_util.h"
#include "cinema_dialog.h"
#include "screen_dialog.h"
#include "wx_util.h"
-#ifdef
__WXMSW__
+#ifdef
DCPOMATIC_USE_OWN_DIR_PICKER
#include "dir_picker_ctrl.h"
#else
#include <wx/filepicker.h>
#include "dir_picker_ctrl.h"
#else
#include <wx/filepicker.h>
@@
-92,10
+92,10
@@
KDMDialog::KDMDialog (wxWindow* parent)
add_label_to_sizer (table, this, "Write to", true);
add_label_to_sizer (table, this, "Write to", true);
-#ifdef
__WXMSW__
- _folder = new DirPickerCtrl (this);
+#ifdef
DCPOMATIC_USE_OWN_DIR_PICKER
+ _folder = new DirPickerCtrl (this);
#else
#else
- _folder = new wxDirPickerCtrl (this, wx
DD_DIR_MUST_EXIST
);
+ _folder = new wxDirPickerCtrl (this, wx
ID_ANY
);
#endif
table->Add (_folder, 1, wxEXPAND);
#endif
table->Add (_folder, 1, wxEXPAND);
@@
-176,6
+176,9
@@
KDMDialog::setup_sensitivity ()
_add_screen->Enable (sc);
_edit_screen->Enable (ss);
_remove_screen->Enable (ss);
_add_screen->Enable (sc);
_edit_screen->Enable (ss);
_remove_screen->Enable (ss);
+
+ wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK));
+ ok->Enable (sc || sc);
}
void
}
void
diff --git
a/src/wx/kdm_dialog.h
b/src/wx/kdm_dialog.h
index ac2db9b95bed814f1db5f62abb81b39c2486c5d8..96893ccefc6f8c0e8819be3bd84167c26d4cb4dd 100644
(file)
--- a/
src/wx/kdm_dialog.h
+++ b/
src/wx/kdm_dialog.h
@@
-69,7
+69,7
@@
private:
wxDatePickerCtrl* _until_date;
wxTimePickerCtrl* _from_time;
wxTimePickerCtrl* _until_time;
wxDatePickerCtrl* _until_date;
wxTimePickerCtrl* _from_time;
wxTimePickerCtrl* _until_time;
-#ifdef
__WXMSW__
+#ifdef
DCPOMATIC_USE_OWN_DIR_PICKER
DirPickerCtrl* _folder;
#else
wxDirPickerCtrl* _folder;
DirPickerCtrl* _folder;
#else
wxDirPickerCtrl* _folder;