ffmpeg_options = {}
return (('ffmpeg-cdist', '1d4a1a4', ffmpeg_options),
- ('libdcp', '04def4c'),
+ ('libdcp', 'c178a9d'),
('libsub', '067c21c'))
def configure_options(target):
}
void
-AtmosMXFContent::as_xml (xmlpp::Node* node, bool with_paths) const
+AtmosMXFContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("AtmosMXF");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
}
DCPTime
void examine (boost::shared_ptr<Job> job);
std::string summary () const;
- void as_xml (xmlpp::Node* node, bool with_path) const;
+ void as_xml (xmlpp::Node* node) const;
DCPTime full_length () const;
static bool valid_mxf (boost::filesystem::path path);
changed (OTHER);
}
-
-void
-Config::save_template (shared_ptr<const Film> film, string name) const
-{
- boost::filesystem::create_directories (path ("templates"));
- shared_ptr<xmlpp::Document> doc = film->metadata (false);
- doc->write_to_file_formatted (path("templates") / tidy_for_filename (name));
-}
void write () const;
- void save_template (boost::shared_ptr<const Film> film, std::string name) const;
-
static Config* instance ();
static void drop ();
static void restore_defaults ();
}
void
-Content::as_xml (xmlpp::Node* node, bool with_paths) const
+Content::as_xml (xmlpp::Node* node) const
{
boost::mutex::scoped_lock lm (_mutex);
- if (with_paths) {
- for (vector<boost::filesystem::path>::const_iterator i = _paths.begin(); i != _paths.end(); ++i) {
- node->add_child("Path")->add_child_text (i->string ());
- }
+ for (vector<boost::filesystem::path>::const_iterator i = _paths.begin(); i != _paths.end(); ++i) {
+ node->add_child("Path")->add_child_text (i->string ());
}
node->add_child("Digest")->add_child_text (_digest);
node->add_child("Position")->add_child_text (raw_convert<string> (_position.get ()));
*/
virtual std::string technical_summary () const;
- virtual void as_xml (xmlpp::Node *, bool with_paths) const;
+ virtual void as_xml (xmlpp::Node *) const;
virtual DCPTime full_length () const = 0;
virtual std::string identifier () const;
/** @return points at which to split this content when
}
void
-DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
+DCPContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("DCP");
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
std::string identifier () const;
void set_default_colour_conversion ();
}
void
-FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const
+FFmpegContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("FFmpeg");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
if (video) {
video->as_xml (node);
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
DCPTime full_length () const;
std::string identifier () const;
}
shared_ptr<xmlpp::Document>
-Film::metadata (bool with_content_paths) const
+Film::metadata () const
{
shared_ptr<xmlpp::Document> doc (new xmlpp::Document);
xmlpp::Element* root = doc->create_root_node ("Metadata");
root->add_child("ReelType")->add_child_text (raw_convert<string> (static_cast<int> (_reel_type)));
root->add_child("ReelLength")->add_child_text (raw_convert<string> (_reel_length));
root->add_child("UploadAfterMakeDCP")->add_child_text (_upload_after_make_dcp ? "1" : "0");
- _playlist->as_xml (root->add_child ("Playlist"), with_content_paths);
+ _playlist->as_xml (root->add_child ("Playlist"));
return doc;
}
std::list<std::string> read_metadata ();
void write_metadata () const;
- boost::shared_ptr<xmlpp::Document> metadata (bool with_content_paths = true) const;
+ boost::shared_ptr<xmlpp::Document> metadata () const;
std::string isdcf_name (bool if_created_now) const;
std::string dcp_name (bool if_created_now = false) const;
}
void
-ImageContent::as_xml (xmlpp::Node* node, bool with_paths) const
+ImageContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("Image");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
if (video) {
video->as_xml (node);
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
DCPTime full_length () const;
std::string identifier () const;
/** @param node <Playlist> node */
void
-Playlist::as_xml (xmlpp::Node* node, bool with_content_paths)
+Playlist::as_xml (xmlpp::Node* node)
{
BOOST_FOREACH (shared_ptr<Content> i, _content) {
- i->as_xml (node->add_child ("Content"), with_content_paths);
+ i->as_xml (node->add_child ("Content"));
}
}
Playlist ();
~Playlist ();
- void as_xml (xmlpp::Node *, bool with_content_paths);
+ void as_xml (xmlpp::Node *);
void set_from_xml (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int, std::list<std::string> &);
void add (boost::shared_ptr<Content>);
}
void
-TextSubtitleContent::as_xml (xmlpp::Node* node, bool with_paths) const
+TextSubtitleContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("TextSubtitle");
- Content::as_xml (node, with_paths);
+ Content::as_xml (node);
if (subtitle) {
subtitle->as_xml (node);
void examine (boost::shared_ptr<Job>);
std::string summary () const;
std::string technical_summary () const;
- void as_xml (xmlpp::Node *, bool with_paths) const;
+ void as_xml (xmlpp::Node *) const;
DCPTime full_length () const;
private:
ID_file_new = 1,
ID_file_open,
ID_file_save,
- ID_file_save_as_template,
ID_file_history,
/* Allow spare IDs after _history for the recent files list */
ID_content_scale_to_fit_width = 100,
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_new, this), ID_file_new);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_open, this), ID_file_open);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_save, this), ID_file_save);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_save_as_template, this), ID_file_save_as_template);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_history, this, _1), ID_file_history, ID_file_history + HISTORY_SIZE);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_exit, this), wxID_EXIT);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::edit_preferences, this), wxID_PREFERENCES);
SetTitle (std_to_wx (s));
}
- void file_new (bool from_template)
+ void file_new ()
{
NewFilmDialog* d = new NewFilmDialog (this);
int const r = d->ShowModal ();
}
if (maybe_save_then_delete_film ()) {
- new_film (d->get_path(), d->template_name());
+ new_film (d->get_path ());
}
}
_film->write_metadata ();
}
- void file_save_as_template ()
- {
- SaveTemplateDialog* td = new SaveTemplateDialog (this);
- int const r = d->ShowModal ();
- if (r == wxID_OK) {
- bool ok = true;
- if (Config::instance()->existing_template (r->name ())) {
- ok = confirm_dialog (td, _("There is already a template with this name. Do you want to overwrite it?"));
- }
- if (ok) {
- Config::instance()->save_template (_film, r->name ());
- }
- }
- d->Destroy ();
- }
-
void file_history (wxCommandEvent& event)
{
vector<boost::filesystem::path> history = Config::instance()->history ();
add_item (_file_menu, _("&Open...\tCtrl-O"), ID_file_open, ALWAYS);
_file_menu->AppendSeparator ();
add_item (_file_menu, _("&Save\tCtrl-S"), ID_file_save, NEEDS_FILM);
- _file_menu->AppendSeparator ();
- add_item (_file_menu, _("&Save as template"), ID_file_save_as_template, NEEDS_FILM);
_history_position = _file_menu->GetMenuItems().GetCount();
_folder = new wxDirPickerCtrl (this, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1));
#endif
- _use_template = new wxCheckButton (this, wxID_ANY, _("From template"));
- add (_use_template);
- _template_name = new wxChoice (this, wxID_ANY);
-
if (!_directory) {
_directory = Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir()));
}
add (_folder);
_name->SetFocus ();
- _template_name->Enable (false);
-
- BOOST_FOREACH (string i, Config::instance()->template_names ()) {
- _template_name->Append (std_to_wx (i));
- }
-
- _use_template->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, bind (&NewFilmDialog::use_template_clicked, this));
layout ();
}
-void
-NewFilmDialog::use_template_clicked ()
-{
- _template_name->Enable (_use_template->GetValue ());
-}
-
NewFilmDialog::~NewFilmDialog ()
{
_directory = wx_to_std (_folder->GetPath ());
p /= wx_to_std (_name->GetValue ());
return p;
}
-
-optional<string>
-NewFilmDialog::template_name () const
-{
- if (!_use_template->GetValue ()) {
- return optional<string> ();
- }
-
- return wx_to_std (_template_name->GetValue ());
-}
NewFilmDialog (wxWindow *);
~NewFilmDialog ();
- boost::filesystem::path path () const;
- boost::optional<std::string> template_name () const;
+ boost::filesystem::path get_path () const;
private:
wxTextCtrl* _name;
#else
wxDirPickerCtrl* _folder;
#endif
- wxCheckButton* _use_template;
- wxChoice* _template_name;
static boost::optional<boost::filesystem::path> _directory;
};
repeat_dialog.cc
report_problem_dialog.cc
rgba_colour_picker.cc
- save_template_dialog.cc
screen_dialog.cc
screens_panel.cc
self_dkdm_dialog.cc