summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-13 02:16:37 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:23 +0100
commit33942a6c7ab40dfe1ccb87e80497fc0b5390b76a (patch)
tree8e77c3aa3927fe9d186d921ed8a0a8e0dd96d974 /src
parent5c57052dfeda55dc218001b089ebcdaaf6bedc3b (diff)
Bv2.1 7.3: audio sample rate must be 48kHz.
Diffstat (limited to 'src')
-rw-r--r--src/sound_asset.h4
-rw-r--r--src/verify.cc9
-rw-r--r--src/verify.h2
3 files changed, 13 insertions, 2 deletions
diff --git a/src/sound_asset.h b/src/sound_asset.h
index 69f74c6a..cc8f2ce0 100644
--- a/src/sound_asset.h
+++ b/src/sound_asset.h
@@ -51,7 +51,7 @@ namespace dcp {
}
extern std::shared_ptr<dcp::SoundAsset> simple_sound (
- boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames
+ boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames, int sample_rate
);
@@ -106,7 +106,7 @@ 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, int frames
+ boost::filesystem::path path, std::string suffix, dcp::MXFMetadata mxf_meta, std::string language, int frames, int sample_rate
);
std::string pkl_type (Standard standard) const {
diff --git a/src/verify.cc b/src/verify.cc
index d1b4988a..b6498891 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -616,6 +616,13 @@ verify_main_sound_asset (
stage ("Checking sound asset metadata", asset->file());
verify_language_tag (asset->language(), notes);
+ if (asset->sampling_rate() != 48000) {
+ notes.push_back (
+ VerificationNote(
+ VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_SOUND_FRAME_RATE, *asset->file()
+ )
+ );
+ }
}
@@ -1210,6 +1217,8 @@ dcp::note_to_string (dcp::VerificationNote note)
return "There are more than 3 closed caption lines in at least one place, which is disallowed by Bv2.1";
case dcp::VerificationNote::CLOSED_CAPTION_LINE_TOO_LONG:
return "There are more than 32 characters in at least one closed caption line, which is disallowed by Bv2.1";
+ case dcp::VerificationNote::INVALID_SOUND_FRAME_RATE:
+ return "A sound asset has a sampling rate other than 48kHz, which is disallowed by Bv2.1";
}
return "";
diff --git a/src/verify.h b/src/verify.h
index 0398c909..fa16dfa1 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -131,6 +131,8 @@ public:
TOO_MANY_CLOSED_CAPTION_LINES,
/** There are more than 32 characters in at least one closed caption line [Bv2.1_7.2.6] */
CLOSED_CAPTION_LINE_TOO_LONG,
+ /** The audio sampling rate must be 48kHz [Bv2.1_7.3] */
+ INVALID_SOUND_FRAME_RATE,
};
VerificationNote (Type type, Code code)