MaxOmfSdk uses an unsigned long array to signal channel availability and selected track mapping.
These are used in the by-directional mxOmfInSettings_t and mxOmfOutSettings_t and in OmfInDialog and OmfOutDialog.
They are declared -
unsigned long m_ulOmfTrkAvlV[25] (Video)
unsigned long m_ulOmfTrkAvlA[25] (Audio)
The first (zeroth) element (m_ulOmfTrkAvlV[0]) is NEVER USED, that is, the address of channels is one-based count.
SOURCE and AVAILABILITY is encoded by the value of an element - * If the elements value is greater than zero, the value is the channel of the source in the composition and is AVAILABLE. * If the elements value is zero, the source channel does not exist (is UNAVAILABLE).
TARGET MAPPING is encoded by the elements array position -
m_ulOmfTrkAvlV[1] is target video channel one
m_ulOmfTrkAvlV[2] is target video channel two, etc
For example, one-to-one mapping of two video channels is encoded
m_ulOmfTrkAvlV[1] == 1 - video one (the value) is mapped to video one (the element position)
m_ulOmfTrkAvlV[2] == 2 - video two (the value) is mapped to video two (the element position)
m_ulOmfTrkAvlV[3-24] == 0 - element values are zero
In this example, only values 1 and 2 (the available source channels) are valid.
To re-map the two available channels of this example -
m_ulOmfTrkAvlV[4] == 1 - video one (the value) is mapped to video four (the element position)
m_ulOmfTrkAvlV[3] == 2 - video two (the value) is mapped to video three (the element position)
m_ulOmfTrkAvlV[1-2] == 0 - element values are zero
m_ulOmfTrkAvlV[5-24] == 0 - element values are zero
Again, in this example, only values 1 and 2 (the available source channels) are valid. They may be mapped to any of the 24 target channels (element position)
--------------
As bi-directional members of mxOmfInSettings_t and mxOmfOutSettings_t, they represent -
* On input, as when set by mxOmfGetProjectInfoToInSettings(), mxOmfCompleteOmf(), or mxOmfGetProjectInfoToOutSettings(), one-to-one mapping of the compositions available channels
* On output, as when set by the user (with OmfInDialog or OmfOutDialog) or programmatically, the requested track mapping.