libdcp
Public Types | Public Member Functions | Private Attributes | List of all members
dcp::VerificationNote Class Reference

Public Types

enum class  Type { ERROR , BV21_ERROR , WARNING }
 
enum class  Code {
  FAILED_READ , MISMATCHED_CPL_HASHES , INVALID_PICTURE_FRAME_RATE , INCORRECT_PICTURE_HASH ,
  MISMATCHED_PICTURE_HASHES , INCORRECT_SOUND_HASH , MISMATCHED_SOUND_HASHES , EMPTY_ASSET_PATH ,
  MISSING_ASSET , MISMATCHED_STANDARD , INVALID_XML , MISSING_ASSETMAP ,
  INVALID_INTRINSIC_DURATION , INVALID_DURATION , INVALID_PICTURE_FRAME_SIZE_IN_BYTES , NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES ,
  EXTERNAL_ASSET , THREED_ASSET_MARKED_AS_TWOD , INVALID_STANDARD , INVALID_LANGUAGE ,
  INVALID_PICTURE_SIZE_IN_PIXELS , INVALID_PICTURE_FRAME_RATE_FOR_2K , INVALID_PICTURE_FRAME_RATE_FOR_4K , INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D ,
  INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES , INVALID_TIMED_TEXT_SIZE_IN_BYTES , INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES , MISSING_SUBTITLE_LANGUAGE ,
  MISMATCHED_SUBTITLE_LANGUAGES , MISSING_SUBTITLE_START_TIME , INVALID_SUBTITLE_START_TIME , INVALID_SUBTITLE_FIRST_TEXT_TIME ,
  INVALID_SUBTITLE_DURATION , INVALID_SUBTITLE_SPACING , SUBTITLE_OVERLAPS_REEL_BOUNDARY , INVALID_SUBTITLE_LINE_COUNT ,
  NEARLY_INVALID_SUBTITLE_LINE_LENGTH , INVALID_SUBTITLE_LINE_LENGTH , INVALID_CLOSED_CAPTION_LINE_COUNT , INVALID_CLOSED_CAPTION_LINE_LENGTH ,
  INVALID_SOUND_FRAME_RATE , MISSING_CPL_ANNOTATION_TEXT , MISMATCHED_CPL_ANNOTATION_TEXT , MISMATCHED_ASSET_DURATION ,
  MISSING_MAIN_SUBTITLE_FROM_SOME_REELS , MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS , MISSING_SUBTITLE_ENTRY_POINT , INCORRECT_SUBTITLE_ENTRY_POINT ,
  MISSING_CLOSED_CAPTION_ENTRY_POINT , INCORRECT_CLOSED_CAPTION_ENTRY_POINT , MISSING_HASH , MISSING_FFEC_IN_FEATURE ,
  MISSING_FFMC_IN_FEATURE , MISSING_FFOC , MISSING_LFOC , INCORRECT_FFOC ,
  INCORRECT_LFOC , MISSING_CPL_METADATA , MISSING_CPL_METADATA_VERSION_NUMBER , MISSING_EXTENSION_METADATA ,
  INVALID_EXTENSION_METADATA , UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT , UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT , MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL ,
  PARTIALLY_ENCRYPTED , INVALID_JPEG2000_CODESTREAM , INVALID_JPEG2000_GUARD_BITS_FOR_2K , INVALID_JPEG2000_GUARD_BITS_FOR_4K ,
  INVALID_JPEG2000_TILE_SIZE , INVALID_JPEG2000_CODE_BLOCK_WIDTH , INVALID_JPEG2000_CODE_BLOCK_HEIGHT , INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_2K ,
  INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_4K , INCORRECT_JPEG2000_POC_MARKER , INVALID_JPEG2000_POC_MARKER_LOCATION , INVALID_JPEG2000_TILE_PARTS_FOR_2K ,
  INVALID_JPEG2000_TILE_PARTS_FOR_4K , MISSING_JPEG200_TLM_MARKER , MISMATCHED_TIMED_TEXT_RESOURCE_ID , INCORRECT_TIMED_TEXT_ASSET_ID ,
  MISMATCHED_TIMED_TEXT_DURATION , MISSED_CHECK_OF_ENCRYPTED , EMPTY_TEXT , MISMATCHED_CLOSED_CAPTION_VALIGN ,
  INCORRECT_CLOSED_CAPTION_ORDERING
}
 

Public Member Functions

 VerificationNote (Type type, Code code)
 
 VerificationNote (Type type, Code code, std::string note)
 
 VerificationNote (Type type, Code code, boost::filesystem::path file)
 
 VerificationNote (Type type, Code code, std::string note, boost::filesystem::path file)
 
 VerificationNote (Type type, Code code, std::string note, boost::filesystem::path file, uint64_t line)
 
Type type () const
 
Code code () const
 
boost::optional< std::string > note () const
 
boost::optional< boost::filesystem::path > file () const
 
boost::optional< uint64_t > line () const
 

Private Attributes

Type _type
 
Code _code
 
boost::optional< std::string > _note
 
boost::optional< boost::filesystem::path > _file
 
boost::optional< uint64_t > _line
 

Detailed Description

Definition at line 58 of file verify.h.

Member Enumeration Documentation

◆ Code

Codes for errors or warnings from verifying DCPs.

The names should (in general) answer the question "what is wrong?" with an answer that begins "There is a ..." e.g. "There is a INCORRECT_CPL_HASH" "There is a MISSING_ASSET"

In general the pattern should be <negative-adjective> <noun>. Some <negative-adjective>s are:

  • INCORRECT: something, which could have any value, is wrong.
  • INVALID: something, which should only be one of a set of values, is not in the set, or some preformatted quantity (e.g. XML) is in the wrong format.
  • MISMATCHED: two things, which should be the same, are not.
  • EMPTY: something, which should have a value, has no value.
  • MISSING: something, which should be present, is not.
  • FAILED: some part of the verification failed in some serious way.

Comments should clarify meaning and also say which of the optional fields (e.g. file) are filled in when this code is used.

Enumerator
FAILED_READ 

A general error when reading the DCP note contains (probably technical) details

MISMATCHED_CPL_HASHES 

The hash of the CPL in the PKL does not agree with the CPL file note contains CPL ID file contains CPL filename

INVALID_PICTURE_FRAME_RATE 

The frame rate given in a reel for the main picture is not 24, 25, 30, 48, 50 or 60 note contains the invalid frame rate as "<numerator>/<denominator>"

INCORRECT_PICTURE_HASH 

The hash of a main picture asset does not agree with the PKL file file contains the picture asset filename

MISMATCHED_PICTURE_HASHES 

The hash of a main picture is different in the CPL and PKL file contains the picture asset filename

INCORRECT_SOUND_HASH 

The hash of a main sound asset does not agree with the PKL file file contains the sound asset filename

MISMATCHED_SOUND_HASHES 

The hash of a main sound is different in the CPL and PKL file contains the sound asset filename

EMPTY_ASSET_PATH 

An assetmap's _<Path>_ entry is empty

MISSING_ASSET 

A file mentioned in an asset map cannot be found file contains the filename that is missing

MISMATCHED_STANDARD 

The DCP contains both SMPTE and Interop-standard components

INVALID_XML 

Some XML fails to validate against its XSD/DTD note contains the (probably technical) details file contains the invalid filename line contains the line number

MISSING_ASSETMAP 

No ASSETMAP or ASSETMAP.xml was found

INVALID_INTRINSIC_DURATION 

An asset's IntrinsicDuration is less than 1 second note contains asset ID

INVALID_DURATION 

An asset's Duration is less than 1 second note contains asset ID

INVALID_PICTURE_FRAME_SIZE_IN_BYTES 

The JPEG2000 data in at least one picture frame is larger than the equivalent of 250Mbit/s file contains the picture asset filename

NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES 

The JPEG2000 data in at least one picture frame is larger than the equivalent of 230Mbit/s file contains the picture asset filename

EXTERNAL_ASSET 

An asset that the CPL requires is not in this DCP; the DCP may be a VF note contains the asset ID

THREED_ASSET_MARKED_AS_TWOD 

A stereoscopic asset has an MXF which is marked as being monoscopic file contains the asset filename

INVALID_STANDARD 

DCP is Interop, not SMPTE [Bv2.1_6.1]

INVALID_LANGUAGE 

A language or territory does not conform to RFC 5646 [Bv2.1_6.2.1] note contains the invalid language

INVALID_PICTURE_SIZE_IN_PIXELS 

A picture asset does not have one of the required Bv2.1 sizes (in pixels) [Bv2.1_7.1] note contains the incorrect size as "<width>x<height>" file contains the asset filename

INVALID_PICTURE_FRAME_RATE_FOR_2K 

A picture asset is 2K but is not at 24, 25 or 48 fps as required by Bv2.1 [Bv2.1_7.1] note contains the invalid frame rate as "<numerator>/<denominator>" file contains the asset filename

INVALID_PICTURE_FRAME_RATE_FOR_4K 

A picture asset is 4K but is not at 24fps as required by Bv2.1 [Bv2.1_7.1] note contains the invalid frame rate as "<numerator>/<denominator>" file contains the asset filename

INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D 

A picture asset is 4K but is 3D which is not allowed by Bv2.1 [Bv2.1_7.1] note contains the invalid frame rate as "<numerator>/<denominator>" file contains the asset filename

INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES 

A closed caption's XML file is larger than 256KB [Bv2.1_7.2.1] note contains the invalid size in bytes file contains the asset filename

INVALID_TIMED_TEXT_SIZE_IN_BYTES 

Any timed text asset's total files is larger than 115MB [Bv2.1_7.2.1] note contains the invalid size in bytes file contains the asset filename

INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES 

The total size of all a timed text asset's fonts is larger than 10MB [Bv2.1_7.2.1] note contains the invalid size in bytes file contains the asset filename

MISSING_SUBTITLE_LANGUAGE 

Some SMPTE subtitle XML has no _<Language>_ tag [Bv2.1_7.2.2] file contains the asset filename

MISMATCHED_SUBTITLE_LANGUAGES 

Not all subtitle assets specify the same _<Language>_ tag [Bv2.1_7.2.2]

MISSING_SUBTITLE_START_TIME 

Some SMPTE subtitle XML has no _<StartTime>_ tag [Bv2.1_7.2.3] file contains the asset filename

INVALID_SUBTITLE_START_TIME 

Some SMPTE subtitle XML has a non-zero _<StartTime>_ tag [Bv2.1_7.2.3] file contains the asset filename

INVALID_SUBTITLE_FIRST_TEXT_TIME 

The first subtitle or closed caption happens before 4s into the first reel [Bv2.1_7.2.4]

INVALID_SUBTITLE_DURATION 

At least one subtitle is less than the minimum of 15 frames suggested by [Bv2.1_7.2.5]

INVALID_SUBTITLE_SPACING 

At least one pair of subtitles are separated by less than the the minimum of 2 frames suggested by [Bv2.1_7.2.5]

SUBTITLE_OVERLAPS_REEL_BOUNDARY 

A subtitle lasts for longer than the reel which contains it

INVALID_SUBTITLE_LINE_COUNT 

There are more than 3 subtitle lines in at least one place [Bv2.1_7.2.7]

NEARLY_INVALID_SUBTITLE_LINE_LENGTH 

There are more than 52 characters in at least one subtitle line [Bv2.1_7.2.7]

INVALID_SUBTITLE_LINE_LENGTH 

There are more than 79 characters in at least one subtitle line [Bv2.1_7.2.7]

INVALID_CLOSED_CAPTION_LINE_COUNT 

There are more than 3 closed caption lines in at least one place [Bv2.1_7.2.6]

INVALID_CLOSED_CAPTION_LINE_LENGTH 

There are more than 32 characters in at least one closed caption line [Bv2.1_7.2.6]

INVALID_SOUND_FRAME_RATE 

The audio sampling rate must be 48kHz [Bv2.1_7.3] note contains the invalid frame rate file contains the asset filename

MISSING_CPL_ANNOTATION_TEXT 

The CPL has no _<AnnotationText>_ tag [Bv2.1_8.1] note contains the CPL ID file contains the CPL filename

MISMATCHED_CPL_ANNOTATION_TEXT 

The _<AnnotationText>_ is not the same as the _<ContentTitleText>_ [Bv2.1_8.1] note contains the CPL ID file contains the CPL filename

MISMATCHED_ASSET_DURATION 

At least one asset in a reel does not have the same duration as the others

MISSING_MAIN_SUBTITLE_FROM_SOME_REELS 

If one reel has a MainSubtitle, all must have them

MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS 

If one reel has at least one ClosedCaption, all reels must have the same number of ClosedCaptions

MISSING_SUBTITLE_ENTRY_POINT 

MainSubtitle in reels must have _<EntryPoint>_ [Bv2.1_8.3.2] note contains the asset ID

INCORRECT_SUBTITLE_ENTRY_POINT 

MainSubtitle _<EntryPoint>_ must be zero [Bv2.1_8.3.2] note contains the asset ID

MISSING_CLOSED_CAPTION_ENTRY_POINT 

Closed caption in reels must have _<EntryPoint>_ [Bv2.1_8.3.2] note contains the asset ID

INCORRECT_CLOSED_CAPTION_ENTRY_POINT 

Closed caption MainSubtitle _<EntryPoint>_ must be zero [Bv2.1_8.3.2] note contains the asset ID

MISSING_HASH 

_<Hash>_ must be present for assets in CPLs note contains the asset ID

MISSING_FFEC_IN_FEATURE 

If ContentKind is Feature there must be a FFEC marker

MISSING_FFMC_IN_FEATURE 

If ContentKind is Feature there must be a FFMC marker

MISSING_FFOC 

There should be a FFOC marker

MISSING_LFOC 

There should be a LFOC marker

INCORRECT_FFOC 

The FFOC marker should be 1 note contains the incorrect value.

INCORRECT_LFOC 

The LFOC marker should be the last frame in the reel note contains the incorrect value

MISSING_CPL_METADATA 

There must be a _<CompositionMetadataAsset>_ note contains the CPL ID file contains the CPL filename

MISSING_CPL_METADATA_VERSION_NUMBER 

CPL metadata should contain _<VersionNumber>_ of 1, at least note contains the CPL ID file contains the CPL filename

MISSING_EXTENSION_METADATA 

There must be an _<ExtensionMetadata>_ in _<CompositionMetadataAsset>_ [Bv2.1_8.6.3] note contains the CPL ID file contains the CPL filename

INVALID_EXTENSION_METADATA 

_<ExtensionMetadata>_ does not have the correct form [Bv2.1_8.6.3] note contains details of what's wrong file contains the CPL filename

UNSIGNED_CPL_WITH_ENCRYPTED_CONTENT 

A CPL containing encrypted content is not signed [Bv2.1_8.7] note contains the CPL ID file contains the CPL filename

UNSIGNED_PKL_WITH_ENCRYPTED_CONTENT 

A PKL containing encrypted content is not signed [Bv2.1_8.7] note contains the PKL ID file contains the PKL filename

MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL 

If a PKL has one CPL its _<ContentTitleText>_ must be the same as the PKL's _<AnnotationText>_ note contains the PKL ID file contains the PKL filename

PARTIALLY_ENCRYPTED 

Some, but not all content, is encrypted

INVALID_JPEG2000_CODESTREAM 

General error during JPEG2000 codestream verification note contains details

INVALID_JPEG2000_GUARD_BITS_FOR_2K 

Invalid number of guard bits in a 2K JPEG2000 stream (should be 1) [Bv2.1_10.2.1] note contains the number of guard bits

INVALID_JPEG2000_GUARD_BITS_FOR_4K 

Invalid number of guard bits in a 4K JPEG2000 stream (should be 2) [Bv2.1_10.2.1] note contains the number of guard bits

INVALID_JPEG2000_TILE_SIZE 

JPEG2000 tile size is not the same as the image size [Bv2.1_10.2.1]

INVALID_JPEG2000_CODE_BLOCK_WIDTH 

JPEG2000 code block width is not 32 [Bv2.1_10.2.1] note contains the code block width

INVALID_JPEG2000_CODE_BLOCK_HEIGHT 

JPEG2000 code block height is not 32 [Bv2.1_10.2.1] note contains the code block height

INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_2K 

There must be no POC markers in a 2K codestream [Bv2.1_10.2.1] note contains the number of POC markers found

INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_4K 

There must be exactly one POC marker in a 4K codestream [Bv2.1_10.2.1] note contains the number of POC markers found

INCORRECT_JPEG2000_POC_MARKER 

A POC marker has incorrect content [Bv2.1_10.2.1] note contains details

INVALID_JPEG2000_POC_MARKER_LOCATION 

A POC marker was found outside the main head [Bv2.1_10.2.1]

INVALID_JPEG2000_TILE_PARTS_FOR_2K 

Invalid number of tile parts for 2K JPEG2000 stream (should be 3) [Bv2.1_10.2.1] note contains the number of tile parts

INVALID_JPEG2000_TILE_PARTS_FOR_4K 

Invalid number of tile parts for 4K JPEG2000 stream (should be 6) [Bv2.1_10.2.1] note contains the number of tile parts

MISSING_JPEG200_TLM_MARKER 

No TLM marker was found [Bv2.1_10.2.1]

MISMATCHED_TIMED_TEXT_RESOURCE_ID 

The MXF ResourceID of a timed text resource was not the same as that of the contained XML essence [Bv2.1_10.4.3]

INCORRECT_TIMED_TEXT_ASSET_ID 

The AssetID of a timed text MXF is the same as its ResourceID or that of the contained XML essence [Bv2.1_10.4.2]

MISMATCHED_TIMED_TEXT_DURATION 

The ContainerDuration of a timed text MXF is not the same as the Duration in its reel [Bv2.1_10.4.3] note contains the reel duration, followed by a space, followed by the MXF duration file contains the asset filename

MISSED_CHECK_OF_ENCRYPTED 

Something could not be verified because content is encrypted and no key is available

EMPTY_TEXT 

Some timed-text XML has an empty <Text> node

MISMATCHED_CLOSED_CAPTION_VALIGN 

Some closed captions do not have the same vertical alignment within a <Subtitle> node

INCORRECT_CLOSED_CAPTION_ORDERING 

Some closed captions are not listed in the XML in the order of their vertical position

Definition at line 95 of file verify.h.

◆ Type

Enumerator
BV21_ERROR 

may not always be considered an error, but violates a "shall" requirement of Bv2.1

Definition at line 64 of file verify.h.

Member Data Documentation

◆ _file

boost::optional<boost::filesystem::path> dcp::VerificationNote::_file
private

Path of file containing the error, if applicable

Definition at line 455 of file verify.h.

◆ _line

boost::optional<uint64_t> dcp::VerificationNote::_line
private

Error line number within _file, if applicable

Definition at line 457 of file verify.h.

◆ _note

boost::optional<std::string> dcp::VerificationNote::_note
private

Further information about the error, if applicable

Definition at line 453 of file verify.h.


The documentation for this class was generated from the following file: