MX Foundation 4
|
Accessing a physical CSDB channel requires a handle to the channel.
A channel handle is a reference to a channel holding a physical resource (port). The channel handle is the first argument to be passed to many MXF channel oriented functions.
To get the handle to a CSDB physical port regardless of the devices installed, use the mxfModuleChannelGet() function by specifying the physical port index.
The mxfModuleChannelAllGet() function with the chnClass
argument MXF_CLASS_CSDB
can also be used.
If MXF_DEVICE_ALL
is specified with mxfSystemDeviceAllGet() function, all handles of detected devices are returned.
Protocol selection is made with Channel Class attribute.
Depending on the module type, a CSDB channel can by default be configured to another channel class. To configure a channel to CSDB, an initialization callback set with mxfSystemInitAttributeUint64CallbackHandler() function must be used.
Since MXF 4.5.2, it is now possible to change the channel class by using mxfAttributeUint64Set() with KMXF_CHANNEL_CLASS attribute instead of using the initialization handler.
It is a good programming practice to not rely on default channel class value (or any other attributes for that matter) and set it to the desired value.