summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-09 13:13:23 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:22 +0100
commit8edf0af514e285454a15f14561519608e6d6aad9 (patch)
treefd2c6727c2c26a6f3c8279ef4a194296ffb778dc /src
parent0b39df958f534068950669a763be7b4602740107 (diff)
Bv2.1 6.2.1: Check that the sound MXF Language tag conforms to RFC 5646.
Diffstat (limited to 'src')
-rw-r--r--src/sound_asset.h13
-rw-r--r--src/verify.cc11
2 files changed, 21 insertions, 3 deletions
diff --git a/src/sound_asset.h b/src/sound_asset.h
index 91a213b8..d4b41a1a 100644
--- a/src/sound_asset.h
+++ b/src/sound_asset.h
@@ -45,6 +45,16 @@
#include "sound_frame.h"
#include "sound_asset_reader.h"
+
+namespace dcp {
+ class SoundAsset;
+}
+
+extern std::shared_ptr<dcp::SoundAsset> simple_sound (
+ boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language
+ );
+
+
namespace dcp
{
@@ -95,6 +105,9 @@ public:
private:
friend class SoundAssetWriter;
+ friend std::shared_ptr<dcp::SoundAsset> (::simple_sound) (
+ boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language
+ );
std::string pkl_type (Standard standard) const {
return static_pkl_type (standard);
diff --git a/src/verify.cc b/src/verify.cc
index 89d84eef..eec63d51 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -532,26 +532,31 @@ verify_main_sound_asset (
list<VerificationNote>& notes
)
{
- stage ("Checking sound asset hash", reel->main_sound()->asset()->file());
+ shared_ptr<dcp::SoundAsset> asset = reel->main_sound()->asset();
+ stage ("Checking sound asset hash", asset->file());
VerifyAssetResult const r = verify_asset (dcp, reel->main_sound(), progress);
switch (r) {
case VERIFY_ASSET_RESULT_BAD:
notes.push_back (
VerificationNote(
- VerificationNote::VERIFY_ERROR, VerificationNote::SOUND_HASH_INCORRECT, *reel->main_sound()->asset()->file()
+ VerificationNote::VERIFY_ERROR, VerificationNote::SOUND_HASH_INCORRECT, *asset->file()
)
);
break;
case VERIFY_ASSET_RESULT_CPL_PKL_DIFFER:
notes.push_back (
VerificationNote(
- VerificationNote::VERIFY_ERROR, VerificationNote::PKL_CPL_SOUND_HASHES_DISAGREE, *reel->main_sound()->asset()->file()
+ VerificationNote::VERIFY_ERROR, VerificationNote::PKL_CPL_SOUND_HASHES_DISAGREE, *asset->file()
)
);
break;
default:
break;
}
+
+ stage ("Checking sound asset metadata", asset->file());
+
+ verify_language_tag (asset->language(), notes);
}