Closed rsjbailey closed 2 years ago
This element is used only if an audioTrackFormat is omitted for PCM audio
audio_track_uid.hpp audio_track_uid.cpp route_tracer.hpp (maybe)
There seems to be a similar case about validation in AudioObject
, with the restriction not enforced.
(We think) that AudioObject
should link to either (AudioTrackUID
and PackFormat
), or (audioObjectUID
), but not both -- but that does not actually seem to be specified in the standard text (sec 5.6) so maybe isn't quite the same.
There's a test in audio_object_tests
that adds all three and does not expect an error.
Edit: this restriction is only stipulated in the EBU profile, the ADM standard lets you have both.
We'll try and work on this in TDD fashion; I'll start by adding a test that creates an ADM document and tries to add the ChannelFormat reference to a TrackUID next.
Looking at libbw64, it looks like it should just work, but you would be calling trackRef() to get the channel format ref in some cases which would seem a little illogical, and you'd still need to truncate the final 3 chars before it becomes a usable channel format ID.
It seems sensible to have a channelRef() method as well to maintain backwards-compatibility. The question is, how much ADM-specific logic should be in here? It feels like trackRef() should only return if it is a track format reference, and channelRef() only return if it is a channel format reference. We could compare the first 3 chars of the ID to do this, and either throw or return a blank string if it's not the expected type.
Looking at libbw64, it looks like it should just work, but you would be calling trackRef() to get the channel format ref in some cases which would seem a little illogical, and you'd still need to truncate the final 3 chars before it becomes a usable channel format ID.
Having talked this over with @kristianhentschelbbc and @tomjnixon we decided libbw64 should probably remain as it is. BS.2088-1 (pages 16-17) still names the field "trackRef" even though it can now contain a channel format reference, and it makes sense for the method to retrieve this field (regardless of its actual content) to follow the same name.
Merged #76 into the 2076-2
branch.
In 2076-2, audioChannelFormatIDRef sub-element was added to audioTrackUID (enabling bypassing of audioTrackFormat and audioStreamFormat for PCM only).
Definition of done
Stretch goal