summaryrefslogtreecommitdiff
path: root/src/sound_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-28 19:39:14 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-28 19:39:14 +0000
commitc9717810952874f38c58b526abf4875abf38534c (patch)
tree49c049fb85a1efe69bcddceae9f8f10198634d5a /src/sound_asset.cc
parentc009f6795d133e8dfe0662042e0b3c90dde0e25b (diff)
Add SoundAsset::valid_mxf().
Diffstat (limited to 'src/sound_asset.cc')
-rw-r--r--src/sound_asset.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index f95b860f..b9be77c8 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -178,3 +178,11 @@ SoundAsset::pkl_type (Standard standard) const
DCP_ASSERT (false);
}
}
+
+bool
+SoundAsset::valid_mxf (boost::filesystem::path file)
+{
+ ASDCP::PCM::MXFReader reader;
+ Kumu::Result_t r = reader.OpenRead (file.string().c_str ());
+ return !ASDCP_FAILURE (r);
+}