sony / nmos-cpp

An NMOS (Networked Media Open Specifications) Registry and Node in C++ (IS-04, IS-05)
Apache License 2.0
136 stars 79 forks source link

Fix downgrade support #343

Open lo-simon opened 10 months ago

lo-simon commented 10 months ago

Fix IS-04 (v1.3) downgrade resource to register to v1.2 Registry.

There are some parameters which have been extended in nmos-parameter-registers for the latest nmos version.

The problem was identified when a downgraded v1.3 video flow with transfer_characteristic set to UNSPECIFIED failed to register to the v1.2 Registry. It is because v1.2 video flow schema used in the Registry does not allow transfer_characteristic to be UNSPECIFIED. This PR sets the default values for the downgraded resources when an invalid value is used or removes it if the parameter is optional.

See https://specs.amwa.tv/nmos-parameter-registers/branches/main/flow-attributes/#transfer-characteristic

garethsb commented 10 months ago

Since this is a significant change to code which is used by both Node and Registry, I recommend unit tests with very good coverage are added.

lo-simon commented 10 months ago

Since this is a significant change to code which is used by both Node and Registry, I recommend unit tests with very good coverage are added.

Yes totally agree