Netflix / photon

Photon is a Java implementation of the Interoperable Master Format (IMF) standard. IMF is a SMPTE standard whose core constraints are defined in the specification st2067-2:2013
Apache License 2.0
234 stars 76 forks source link

Fix wrong processing of ApplicationIdentification #246

Closed cconcolato closed 5 years ago

cconcolato commented 5 years ago

Closes #218

Per 2067-2 (2013 or 2016), the ApplicationIdentification element in the CPL can contain multiple URIs. Current code assumes it's a single string.

This PR fixes that using a Set and validating that a CPL conforms to all the applications in the Set. Previous public methods that used a single String are kept for backwards compatibility for now but marked as deprecated.

codecov[bot] commented 5 years ago

Codecov Report

Merging #246 into master will increase coverage by <.01%. The diff coverage is 78.78%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #246      +/-   ##
============================================
+ Coverage     66.82%   66.83%   +<.01%     
- Complexity     1482     1487       +5     
============================================
  Files           153      153              
  Lines         10740    10755      +15     
  Branches       1590     1594       +4     
============================================
+ Hits           7177     7188      +11     
- Misses         2794     2799       +5     
+ Partials        769      768       -1
Impacted Files Coverage Δ Complexity Δ
...ry/st2067_2/ApplicationUnsupportedComposition.java 85.71% <100%> (+2.38%) 4 <0> (+2) :arrow_up:
...ibrary/st2067_2/ApplicationCompositionFactory.java 85.24% <100%> (+2.48%) 6 <0> (+1) :arrow_up:
...mflibrary/st2067_2/IMFCompositionPlaylistType.java 65.14% <28.57%> (-1.92%) 25 <1> (ø)
...brary/st2067_2/CompositionModel_st2067_2_2016.java 77.77% <75%> (+0.38%) 16 <0> (+1) :arrow_up:
...brary/st2067_2/CompositionModel_st2067_2_2013.java 75.22% <75%> (+0.44%) 18 <0> (+1) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 45e21c8...acf4720. Read the comment docs.