diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-09 09:36:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-09 09:36:58 +0100 |
| commit | 2cf3da72a017eebf741dfb9a5ec158df94a4e7b7 (patch) | |
| tree | 2fcc142d132fb1de2228cfca201a4e0825415dc8 /src/wx/film_editor.cc | |
| parent | 02de0e70ffa175861fb4392e9df4e5a7c1579375 (diff) | |
Basics of DCP import.
Diffstat (limited to 'src/wx/film_editor.cc')
| -rw-r--r-- | src/wx/film_editor.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 5b4f6e8fe..ad7451cb9 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -45,6 +45,7 @@ #include "lib/playlist.h" #include "lib/content.h" #include "lib/content_factory.h" +#include "lib/dcp_content.h" #include "timecode.h" #include "wx_util.h" #include "film_editor.h" @@ -836,16 +837,22 @@ FilmEditor::content_add_folder_clicked () return; } - shared_ptr<ImageContent> ic; + shared_ptr<Content> content; try { - ic.reset (new ImageContent (_film, boost::filesystem::path (wx_to_std (d->GetPath ())))); - } catch (FileError& e) { - error_dialog (this, std_to_wx (e.what ())); - return; + content.reset (new ImageContent (_film, boost::filesystem::path (wx_to_std (d->GetPath ())))); + } catch (...) { + try { + content.reset (new DCPContent (_film, boost::filesystem::path (wx_to_std (d->GetPath ())))); + } catch (...) { + error_dialog (this, _("Could not find any images nor a DCP in that folder")); + return; + } } - _film->examine_and_add_content (ic); + if (content) { + _film->examine_and_add_content (content); + } } void |
