summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-07 13:04:50 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-07 13:04:50 +0100
commitf12587df699a72655230ac737ece31a5436a5a5e (patch)
treeba9c4bbf20f0166c0ae1f45cebea1ac1f0e98842 /src
parentbe2e60789c5b4ed99d68625b5f793092afa2cbf4 (diff)
Fix console noise when importing non-DCP MXFs (#1362).
Diffstat (limited to 'src')
-rw-r--r--src/lib/atmos_mxf_content.cc5
-rw-r--r--src/lib/video_mxf_content.cc6
2 files changed, 11 insertions, 0 deletions
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 <asdcp/KM_log.h>
#include <dcp/atmos_asset.h>
#include <dcp/exceptions.h>
#include <libxml++/libxml++.h>
@@ -47,6 +48,8 @@ AtmosMXFContent::AtmosMXFContent (shared_ptr<const Film> film, cxml::ConstNodePt
bool
AtmosMXFContent::valid_mxf (boost::filesystem::path path)
{
+ Kumu::DefaultLogSink().UnsetFilterFlag(Kumu::LOG_ALLOW_ALL);
+
try {
shared_ptr<dcp::AtmosAsset> 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 <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;
}