Configurable window arrangement in player dual-screen mode.
[dcpomatic.git] / src / lib / video_mxf_content.cc
index 1f416312233f3efe21edae87ccfbc248abfa2d3a..8e762ae14f6d8545993f185d370a630dae1436eb 100644 (file)
@@ -24,6 +24,7 @@
 #include "job.h"
 #include "film.h"
 #include "compose.hpp"
+#include <asdcp/KM_log.h>
 #include <dcp/mono_picture_asset.h>
 #include <dcp/stereo_picture_asset.h>
 #include <dcp/exceptions.h>
@@ -50,6 +51,8 @@ VideoMXFContent::VideoMXFContent (shared_ptr<const Film> film, cxml::ConstNodePt
 bool
 VideoMXFContent::valid_mxf (boost::filesystem::path path)
 {
+       Kumu::DefaultLogSink().UnsetFilterFlag(Kumu::LOG_ALLOW_ALL);
+
        try {
                shared_ptr<dcp::MonoPictureAsset> 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<dcp::StereoPictureAsset> sp (new dcp::StereoPictureAsset (path));
                return true;
        } catch (dcp::MXFFileError& e) {
@@ -68,6 +72,8 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path)
 
        }
 
+       Kumu::DefaultLogSink().SetFilterFlag(Kumu::LOG_ALLOW_ALL);
+
        return false;
 }
 
@@ -81,6 +87,7 @@ VideoMXFContent::examine (shared_ptr<Job> job)
        video.reset (new VideoContent (this));
        shared_ptr<VideoMXFExaminer> examiner (new VideoMXFExaminer (shared_from_this ()));
        video->take_from_examiner (examiner);
+       video->unset_colour_conversion ();
 }
 
 string
@@ -121,9 +128,3 @@ VideoMXFContent::add_properties (list<UserProperty>& p) const
 {
        video->add_properties (p);
 }
-
-void
-VideoMXFContent::set_default_colour_conversion ()
-{
-       video->unset_colour_conversion ();
-}