OpenTimelineIO
OpenTimelineIO copied to clipboard
C++ API should honor OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL environment variable
The OTIO schema versioning system (documented here) provides a mechanism for causing software to output older schema versions. The environment variable OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL can be set to control this behavior. However, that environment variable is only used in OTIO's Python layer, which means that applications built on OITO's C++ API don't honor that setting.
This discrepancy creates difficulty for pipelines that use a mixture of software, some using OTIO via Python, and some using OTIO via C++. In order to uniformly control the emitted OTIO schema version, C++ applications need to be modified and/or OTIO files need to be converted via otiotool
or otioconvert
after they are written to disk.
This situation would be much easier to deal with if the OTIO C++ layer honored the OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL environment variable in the same way that the Python layer does.
I anticipate if we allow one env controlled behavior it's inevitable that switches will accrue. If we go down the road of env var controls, let's abstract the reading to a platform specific function, so that hardened runtimes that shouldn't access the environment can trivially nop out the access.
We should probably discuss this - I'd be reluctant to add this to the C++ core