From: Carl Hetherington Date: Fri, 7 Sep 2018 12:04:50 +0000 (+0100) Subject: Fix console noise when importing non-DCP MXFs (#1362). X-Git-Tag: v2.13.49~40 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=f12587df699a72655230ac737ece31a5436a5a5e Fix console noise when importing non-DCP MXFs (#1362). --- diff --git a/src/lib/atmos_mxf_content.cc b/src/lib/atmos_mxf_content.cc index 2fd9ead06..a42b10954 100644 --- a/src/lib/atmos_mxf_content.cc +++ b/src/lib/atmos_mxf_content.cc @@ -22,6 +22,7 @@ #include "job.h" #include "film.h" #include "compose.hpp" +#include #include #include #include @@ -47,6 +48,8 @@ AtmosMXFContent::AtmosMXFContent (shared_ptr film, cxml::ConstNodePt bool AtmosMXFContent::valid_mxf (boost::filesystem::path path) { + Kumu::DefaultLogSink().UnsetFilterFlag(Kumu::LOG_ALLOW_ALL); + try { shared_ptr a (new dcp::AtmosAsset (path)); return true; @@ -56,6 +59,8 @@ AtmosMXFContent::valid_mxf (boost::filesystem::path path) } + Kumu::DefaultLogSink().SetFilterFlag(Kumu::LOG_ALLOW_ALL); + return false; } diff --git a/src/lib/video_mxf_content.cc b/src/lib/video_mxf_content.cc index 325ea8e72..8e762ae14 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 @@ -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,6 +72,8 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path) } + Kumu::DefaultLogSink().SetFilterFlag(Kumu::LOG_ALLOW_ALL); + return false; }