Report every frame (with index) that has a JPEG2000 codestream error (DoM #2698).
[libdcp.git] / src / verify.h
index 37a1fc11400fba8235faa4896e93ffd9039a27b0..7bfe4217c5f934cc77ac8725003363ea0727bcd4 100644 (file)
@@ -41,6 +41,7 @@
 #define LIBDCP_VERIFY_H
 
 
+#include "decrypted_kdm.h"
 #include <boost/any.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/function.hpp>
@@ -330,6 +331,7 @@ public:
                /** Some, but not all content, is encrypted */
                PARTIALLY_ENCRYPTED,
                /** General error during JPEG2000 codestream verification
+                *  frame contains the frame index (counted from 0)
                 *  note contains details
                 */
                INVALID_JPEG2000_CODESTREAM,
@@ -462,6 +464,11 @@ public:
                 *  other_id contains the ID from the file.
                 */
                MISMATCHED_ASSET_MAP_ID,
+               /** The <LabelText> inside a <ContentVersion> is empty
+                *  note contains the CPL ID
+                *  file contains the CPL filename
+                */
+               EMPTY_CONTENT_VERSION_LABEL_TEXT,
        };
 
        VerificationNote (Type type, Code code)
@@ -518,6 +525,7 @@ private:
                SIZE,
                ID,
                OTHER_ID,
+               FRAME_RATE
        };
 
        template <class T>
@@ -588,6 +596,15 @@ public:
                return data<std::string>(Data::OTHER_ID);
        }
 
+       VerificationNote& set_frame_rate(int frame_rate) {
+               _data[Data::FRAME_RATE] = frame_rate;
+               return *this;
+       }
+
+       boost::optional<int> frame_rate() const {
+               return data<int>(Data::FRAME_RATE);
+       }
+
 private:
        Type _type;
        Code _code;
@@ -607,6 +624,7 @@ struct VerificationOptions
 
 std::vector<VerificationNote> verify (
        std::vector<boost::filesystem::path> directories,
+       std::vector<dcp::DecryptedKDM> kdms,
        boost::function<void (std::string, boost::optional<boost::filesystem::path>)> stage,
        boost::function<void (float)> progress,
        VerificationOptions options = {},