X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fvideo_mxf_content.cc;h=4f69cb2e2301ed1fb76d2395b25b058934638dbd;hp=1f416312233f3efe21edae87ccfbc248abfa2d3a;hb=254b3044d72de6b033d7c584f5abd2b9aa70aad5;hpb=1a693725f9a8cc6ba58f65b2f1ef03255d295f23 diff --git a/src/lib/video_mxf_content.cc b/src/lib/video_mxf_content.cc index 1f4163122..4f69cb2e2 100644 --- a/src/lib/video_mxf_content.cc +++ b/src/lib/video_mxf_content.cc @@ -24,6 +24,7 @@ #include "job.h" #include "film.h" #include "compose.hpp" +#include #include #include #include @@ -35,14 +36,14 @@ using std::list; using std::string; using boost::shared_ptr; -VideoMXFContent::VideoMXFContent (shared_ptr film, boost::filesystem::path path) - : Content (film, path) +VideoMXFContent::VideoMXFContent (boost::filesystem::path path) + : Content (path) { } -VideoMXFContent::VideoMXFContent (shared_ptr film, cxml::ConstNodePtr node, int version) - : Content (film, node) +VideoMXFContent::VideoMXFContent (cxml::ConstNodePtr node, int version) + : Content (node) { video = VideoContent::from_xml (this, node, version); } @@ -50,6 +51,8 @@ VideoMXFContent::VideoMXFContent (shared_ptr film, cxml::ConstNodePt bool VideoMXFContent::valid_mxf (boost::filesystem::path path) { + Kumu::DefaultLogSink().UnsetFilterFlag(Kumu::LOG_ALLOW_ALL); + try { shared_ptr mp (new dcp::MonoPictureAsset (path)); return true; @@ -60,6 +63,7 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path) } try { + Kumu::DefaultLogSink().SetFilterFlag(0); shared_ptr sp (new dcp::StereoPictureAsset (path)); return true; } catch (dcp::MXFFileError& e) { @@ -68,19 +72,22 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path) } + Kumu::DefaultLogSink().SetFilterFlag(Kumu::LOG_ALLOW_ALL); + return false; } void -VideoMXFContent::examine (shared_ptr job) +VideoMXFContent::examine (shared_ptr film, shared_ptr job) { job->set_progress_unknown (); - Content::examine (job); + Content::examine (film, job); video.reset (new VideoContent (this)); shared_ptr examiner (new VideoMXFExaminer (shared_from_this ())); video->take_from_examiner (examiner); + video->unset_colour_conversion (); } string @@ -110,10 +117,10 @@ VideoMXFContent::as_xml (xmlpp::Node* node, bool with_paths) const } DCPTime -VideoMXFContent::full_length () const +VideoMXFContent::full_length (shared_ptr film) const { - FrameRateChange const frc (active_video_frame_rate(), film()->video_frame_rate()); - return DCPTime::from_frames (llrint (video->length_after_3d_combine() * frc.factor()), film()->video_frame_rate()); + FrameRateChange const frc (active_video_frame_rate(film), film->video_frame_rate()); + return DCPTime::from_frames (llrint (video->length_after_3d_combine() * frc.factor()), film->video_frame_rate()); } void @@ -121,9 +128,3 @@ VideoMXFContent::add_properties (list& p) const { video->add_properties (p); } - -void -VideoMXFContent::set_default_colour_conversion () -{ - video->unset_colour_conversion (); -}