X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;fp=src%2Flib%2Ffilm.cc;h=cc80f5bc2d8be73bf40f60b99a136a963f0f582e;hp=21e7383bf94fcfbfd0635c7d1c0efe3c90ee2741;hb=2e504b33eb9f38cac629ad31b7c107fb0cf5efda;hpb=a4c19a34244aeaf183c25878933b570fc5c0ee34 diff --git a/src/lib/film.cc b/src/lib/film.cc index 21e7383bf..cc80f5bc2 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -232,11 +232,9 @@ Film::filename_safe_name () const } boost::filesystem::path -Film::audio_analysis_path (shared_ptr c) const +Film::audio_analysis_dir () const { - boost::filesystem::path p = dir ("analysis"); - p /= c->digest(); - return p; + return dir ("analysis"); } /** Add suitable Jobs to the JobManager to create a DCP for this Film */ @@ -383,8 +381,10 @@ Film::write_metadata () const _dirty = false; } -/** Read state from our metadata file */ -void +/** Read state from our metadata file. + * @return Notes about things that the user should know about, or empty. + */ +list Film::read_metadata () { LocaleGuard lg; @@ -432,9 +432,13 @@ Film::read_metadata () _three_d = f.bool_child ("ThreeD"); _interop = f.bool_child ("Interop"); _key = dcp::Key (f.string_child ("Key")); - _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), _state_version); + + list notes; + /* This method is the only one that can return notes (so far) */ + _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), _state_version, notes); _dirty = false; + return notes; } /** Given a directory name, return its full path within the Film's directory. @@ -923,6 +927,7 @@ Film::set_sequence_video (bool s) signal_changed (SEQUENCE_VIDEO); } +/** @return Size of the largest possible image in whatever resolution we are using */ dcp::Size Film::full_frame () const { @@ -937,6 +942,13 @@ Film::full_frame () const return dcp::Size (); } +/** @return Size of the frame */ +dcp::Size +Film::frame_size () const +{ + return fit_ratio_within (container()->ratio(), full_frame ()); +} + dcp::KDM Film::make_kdm ( shared_ptr target,