diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-28 15:09:30 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-28 15:09:30 +0000 |
| commit | 521c09170d9e62cd72cc2da66c41816761008a4b (patch) | |
| tree | 267f5cb83ba72a1d489f32ba3c94d5ac02579a4e /src/lib | |
| parent | 0987c41ac468fd93bbb444093e66d5d6753cb927 (diff) | |
| parent | af3e8ed8382cdc35e361cdca1f735a379fce1317 (diff) | |
Merge 1.0
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/content.cc | 2 | ||||
| -rw-r--r-- | src/lib/content.h | 2 | ||||
| -rw-r--r-- | src/lib/film.cc | 6 | ||||
| -rw-r--r-- | src/lib/film.h | 1 | ||||
| -rw-r--r-- | src/lib/image_decoder.cc | 9 | ||||
| -rw-r--r-- | src/lib/playlist.cc | 12 | ||||
| -rw-r--r-- | src/lib/playlist.h | 2 |
7 files changed, 10 insertions, 24 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index 7db349617..fa0031abf 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -232,7 +232,7 @@ Content::identifier () const } bool -Content::path_valid () const +Content::paths_valid () const { for (vector<boost::filesystem::path>::const_iterator i = _paths.begin(); i != _paths.end(); ++i) { if (!boost::filesystem::exists (*i)) { diff --git a/src/lib/content.h b/src/lib/content.h index 1eee02e01..965b33b22 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -84,7 +84,7 @@ public: return _paths[i]; } - bool path_valid () const; + bool paths_valid () const; /** @return MD5 digest of the content's file(s) */ std::string digest () const { diff --git a/src/lib/film.cc b/src/lib/film.cc index 8e93667d5..98b7bf6b9 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -860,12 +860,6 @@ Film::best_video_frame_rate () const return _playlist->best_dcp_frame_rate (); } -bool -Film::content_paths_valid () const -{ - return _playlist->content_paths_valid (); -} - FrameRateChange Film::active_frame_rate_change (DCPTime t) const { diff --git a/src/lib/film.h b/src/lib/film.h index a0ace9981..f1564e83b 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -114,7 +114,6 @@ public: DCPTime length () const; bool has_subtitles () const; OutputVideoFrame best_video_frame_rate () const; - bool content_paths_valid () const; FrameRateChange active_frame_rate_change (DCPTime) const; libdcp::KDM diff --git a/src/lib/image_decoder.cc b/src/lib/image_decoder.cc index 9e90b5bc8..a5ca67e0d 100644 --- a/src/lib/image_decoder.cc +++ b/src/lib/image_decoder.cc @@ -54,7 +54,14 @@ ImageDecoder::pass () return false; } - Magick::Image* magick_image = new Magick::Image (_image_content->path (_image_content->still() ? 0 : _video_position).string ()); + Magick::Image* magick_image = 0; + boost::filesystem::path const path = _image_content->path (_image_content->still() ? 0 : _video_position); + try { + magick_image = new Magick::Image (path.string ()); + } catch (...) { + throw OpenFileError (path); + } + libdcp::Size size (magick_image->columns(), magick_image->rows()); _image.reset (new Image (PIX_FMT_RGB24, size, true)); diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index 9fc62f8be..4175de4c9 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -406,15 +406,3 @@ Playlist::move_later (shared_ptr<Content> c) Changed (); } - -bool -Playlist::content_paths_valid () const -{ - for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) { - if (!(*i)->path_valid ()) { - return false; - } - } - - return true; -} diff --git a/src/lib/playlist.h b/src/lib/playlist.h index a985bf93d..35709f109 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -82,8 +82,6 @@ public: void repeat (ContentList, int); - bool content_paths_valid () const; - mutable boost::signals2::signal<void ()> Changed; /** Third parameter is true if signals are currently being emitted frequently */ mutable boost::signals2::signal<void (boost::weak_ptr<Content>, int, bool)> ContentChanged; |
