diff --git a/src/main/java/com/netflix/imflibrary/st2067_2/Application2E2021.java b/src/main/java/com/netflix/imflibrary/st2067_2/Application2E2021.java index 811cad2c..a6ce6e45 100644 --- a/src/main/java/com/netflix/imflibrary/st2067_2/Application2E2021.java +++ b/src/main/java/com/netflix/imflibrary/st2067_2/Application2E2021.java @@ -20,15 +20,15 @@ import java.util.Set; import java.util.Arrays; -import static com.netflix.imflibrary.st0377.header.GenericPictureEssenceDescriptor.FrameLayoutType; - /** * A class that models Composition with Application 2Extended constraints from * 2067-21 specification */ public class Application2E2021 extends AbstractApplicationComposition { + public static final String APP_IDENTIFICATION = "http://www.smpte-ra.org/ns/2067-21/2021"; private static String APP_STRING = ApplicationCompositionType.APPLICATION_2E2021_COMPOSITION_TYPE.toString(); + static class CharacteristicsSet { private Integer maxWidth; private Integer maxHeight; @@ -606,7 +606,7 @@ public static void validateImageCharacteristics(CompositionImageEssenceDescripto IMFErrorLogger.IMFErrors.ErrorLevels.NON_FATAL, String.format( "Invalid image characteristics per %s", - APP_STRING + APP_STRING ) ); } diff --git a/src/main/java/com/netflix/imflibrary/st2067_2/CoreConstraints.java b/src/main/java/com/netflix/imflibrary/st2067_2/CoreConstraints.java index 79362612..49a90b34 100644 --- a/src/main/java/com/netflix/imflibrary/st2067_2/CoreConstraints.java +++ b/src/main/java/com/netflix/imflibrary/st2067_2/CoreConstraints.java @@ -40,7 +40,7 @@ else if (coreConstraintsSchema.equals(NAMESPACE_IMF_2020)) { // NOTE- When adding new namespaces or core constraint versions, be sure that the most recent core constraints // are checked first. That way if there are multiple ApplicationIdentifications, the newest version is returned. - if (applicationIds.contains(Application2ExtendedComposition.SCHEMA_URI_APP2E_2020)) + if (applicationIds.contains(Application2ExtendedComposition.SCHEMA_URI_APP2E_2020) || (applicationIds.contains(Application2E2021.APP_IDENTIFICATION))) { return CoreConstraints.NAMESPACE_IMF_2020; } diff --git a/src/test/java/com/netflix/imflibrary/app/IMPAnalyzerTestApp2E2021.java b/src/test/java/com/netflix/imflibrary/app/IMPAnalyzerTestApp2E2021.java index 995559b2..936e3b6f 100644 --- a/src/test/java/com/netflix/imflibrary/app/IMPAnalyzerTestApp2E2021.java +++ b/src/test/java/com/netflix/imflibrary/app/IMPAnalyzerTestApp2E2021.java @@ -4,6 +4,7 @@ import com.netflix.imflibrary.IMFErrorLoggerImpl; import com.netflix.imflibrary.st2067_2.ApplicationComposition; import com.netflix.imflibrary.st2067_2.ApplicationCompositionFactory; +import com.netflix.imflibrary.st2067_2.CoreConstraints; import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -63,4 +64,18 @@ public void InvalidCPLBadColor() throws IOException ApplicationCompositionFactory.getApplicationComposition(inputFile, logger); Assert.assertNotEquals(logger.getErrors().size(), 0); } + + @Test + public void CoreConstraintsSchemaFromApplicationIdentification() throws IOException + { + File inputFile = TestHelper.findResourceByPath("TestIMP/Application2E2021/CPL_3714715a-af0c-4a89-9cc9-c99f61e7eb6d_CC-Namespaces.xml"); + IMFErrorLogger logger = new IMFErrorLoggerImpl(); + + ApplicationComposition applicationComposition = ApplicationCompositionFactory.getApplicationComposition(inputFile, logger); + Assert.assertNotNull(applicationComposition); + Assert.assertEquals(applicationComposition.getCoreConstraintsSchema(), CoreConstraints.NAMESPACE_IMF_2020); + Assert.assertEquals(logger.getErrors().size(), 0); + } + + } diff --git a/src/test/resources/TestIMP/Application2E2021/CPL_3714715a-af0c-4a89-9cc9-c99f61e7eb6d_CC-Namespaces.xml b/src/test/resources/TestIMP/Application2E2021/CPL_3714715a-af0c-4a89-9cc9-c99f61e7eb6d_CC-Namespaces.xml new file mode 100644 index 00000000..3417c869 --- /dev/null +++ b/src/test/resources/TestIMP/Application2E2021/CPL_3714715a-af0c-4a89-9cc9-c99f61e7eb6d_CC-Namespaces.xml @@ -0,0 +1,254 @@ + + + urn:uuid:ca3e808a-43ea-4e49-92ff-35bc8bc016aa + Netflix + 2024-10-04T18:18:20.576Z + Netflix - PhotonService + Photon PackingListBuilder + Not Included + + + urn:uuid:aa8b1162-185e-4f29-845a-07ac8eb21c9d + Photon CompositionPlaylistBuilder + + + + + urn:uuid:7c73c158-b8e8-41d6-b84b-c54998378315 + + urn:uuid:f7f35b93-e78e-43ec-b21e-5ed9ccc074d5 + 1 + 24/1 + 48000/1 + 0 + urn:smpte:ul:060e2b34.0401010d.0d010301.021d0101 + 56904 + 24 + urn:smpte:ul:060e2b34.04010105.0e090604.00000000 + False + + + urn:uuid:88bb7e2f-aeaa-498f-8dbc-f5c9ab6f40ac + urn:smpte:ul:060e2b34.0401010d.03020221.00000000 + urn:uuid:d75c4593-0e65-4a5a-8566-e922cac41a54 + PRM + FCMP + IAB + IAB + pl + + + + + + urn:uuid:b8f9c9cd-50c0-481f-b34e-a7b05664d7ec + + + + CompRed + 12 + + + CompGreen + 12 + + + CompBlue + 12 + + + CompFill + 4 + + + CompNull + 0 + + + CompNull + 0 + + + CompNull + 0 + + + CompNull + 0 + + + 0 + 4095 + ScanningDirection_LeftToRightTopToBottom + 2 + urn:uuid:5e668179-f35d-9b40-9d30-c5bf5df4837b + + 0 + 0 + + 0 + 0 + 0 + 0 + 3840 + 2160 + 3840 + 2160 + 3840 + 2160 + FullFrame + 16/9 + 66 + 24/1 + urn:smpte:ul:060e2b34.0401010d.04010101.010a0000 + urn:smpte:ul:060e2b34.0401010d.04010101.03060000 + urn:smpte:ul:060e2b34.0401010d.0d010301.020c0600 + urn:smpte:ul:060e2b34.0401010d.04010202.03010312 + 56904 + 1 + 10000000 + + 15635 + 16450 + + + + 34000 + 16000 + + + 13250 + 34500 + + + 7500 + 3000 + + + + + urn:uuid:027d8675-d522-4d46-863f-4731205abdbc + 1334 + 3840 + 2160 + 0 + 0 + 3840 + 2160 + 0 + 0 + 3 + 0104000101060303000077888888888888 + 229f1e9eea9eea9ebc96ea96ea96bc8f008f008ee2874c874c876470037003704577d277d27761 + + +11 +1 +1 + + +11 +1 +1 + + +11 +1 +1 + + + + +CompRed +12 + + +CompGreen +12 + + +CompBlue +12 + + +CompNull +0 + + +CompNull +0 + + +CompNull +0 + + +CompNull +0 + + +CompNull +0 + + + + + urn:uuid:db965338-b65d-bb4b-acaa-8e7611c85eae + urn:smpte:ul:060e2b34.04010105.0e090607.01010101 + 2 + 3 + + + + + + 24 1 + 00:39:31 + + http://www.smpte-ra.org/ns/2067-21/2021 + + + + urn:uuid:ca3e808a-43ea-4e49-92ff-35bc8bc016aa + Segment-1 + + + urn:uuid:edd24f83-5690-45e7-96e4-cef73e70da6d + urn:uuid:6ce04db7-a68b-44bb-9af5-597c7285ced4 + + + urn:uuid:be0f4305-7294-4a7a-ae08-db9cde235851 + 24 1 + 56904 + 0 + 56904 + 1 + urn:uuid:7c73c158-b8e8-41d6-b84b-c54998378315 + urn:uuid:c8f83d37-51bc-4b3a-a114-2883914f8658 + FPZiENHFRJkbdil+IYXqca+xiIk= + + + + + + urn:uuid:ecc2b3d1-69a7-4a2b-af74-205cc2e5b05f + urn:uuid:b00a70b4-55f9-49ea-81a0-11ef74dc9407 + + + urn:uuid:5fd4587b-469a-4c8f-84ba-28ba52312d40 + 24 1 + 56904 + 0 + 56904 + 1 + urn:uuid:b8f9c9cd-50c0-481f-b34e-a7b05664d7ec + urn:uuid:e01dd09d-e0ec-4f73-a4c0-aea8ddeeed50 + qX2KBRL4GQO6L1pThk6LC5qvApo= + + + + + + + +