Add check for mismatch between sound asset and MainSoundConfiguration.
[libdcp.git] / src / verify.h
index e9b5c9d01d82cc89260adbd16d7d566404dbe594..7696ea851151ab2bf5e32b6c53a07335e9b4e1e8 100644 (file)
@@ -410,7 +410,28 @@ public:
                 *  note contains the ASSETMAP ID
                 *  file contains the ASSETMAP filename
                 */
-               DUPLICATE_ASSET_ID_IN_ASSETMAP
+               DUPLICATE_ASSET_ID_IN_ASSETMAP,
+               /** An Interop subtitle asset has no subtitles.
+                *  note contains the asset ID
+                *  file contains the asset filename
+                */
+               MISSING_SUBTITLE,
+               /** A SMPTE subtitle asset as an <IssueDate> which is not of the form yyyy-mm-ddThh:mm:ss
+                *  I can find no reference in a standard to this being required, but the Deluxe delivery
+                *  specifications require it and their QC will fail DCPs that don't have it.
+                *  note contains the incorrect <IssueDate>
+                */
+               INVALID_SUBTITLE_ISSUE_DATE,
+               /** The sound assets in the CPL do not have the same audio channel count.
+                *  file contains the filename of the first asset to differ
+                */
+               MISMATCHED_SOUND_CHANNEL_COUNTS,
+               /** The CPL contains a MainSoundConfiguration tag which does not describe the number of
+                *  channels in the audio assets.
+                *  note contains details of what is wrong
+                *  file contains the CPL filename
+                */
+               INVALID_MAIN_SOUND_CONFIGURATION,
        };
 
        VerificationNote (Type type, Code code)
@@ -477,10 +498,21 @@ private:
 };
 
 
+struct VerificationOptions
+{
+       ///< If set, any assets larger than this number of bytes will not have their hashes checked
+       boost::optional<boost::uintmax_t> maximum_asset_size_for_hash_check;
+       ///< true to check asset hashes (except those which match maximum_asset_size_for_hash_check)
+       ///< false to check no asset hashes.
+       bool check_asset_hashes = true;
+};
+
+
 std::vector<VerificationNote> verify (
        std::vector<boost::filesystem::path> directories,
        boost::function<void (std::string, boost::optional<boost::filesystem::path>)> stage,
        boost::function<void (float)> progress,
+       VerificationOptions options = {},
        boost::optional<boost::filesystem::path> xsd_dtd_directory = boost::optional<boost::filesystem::path>()
        );