How to change the A/V input interface of capture device

 The video input interfaces which capture devices support are: HDMI, VGA, SDI, COMPONENT, CVBS, YC
The audio input interfaces are: HDMI, SDI, LINE IN, MIC IN.

For one capture device, it may have one or more audio and video input interfaces. For example, AIO capture card has different types of input interfaces, so is the DVI capture card after interface conversion by using a breakout cable

The methods to change capture device A/V input interface with MWCapture SDK

Method A)   change video input interface: MWOpenChannel() → MWGetVideoInputSourceArray() / MWGetVideoInputSource() → MWSetVideoInputSource()

Method B)   change audio input interface: MWOpenChannel() → MWGetAudioInputSourceArray() / MWGetAudioInputSource() → MWSetAudioInputSource()

In method A/B, execute MWGetVideoInputSourceArray() / MWGetVideoInputSource() to get what the A/V input interfaces of capture device are present, and the current A/V input source in the channel;

Next, the obtained last 8Bits of DWORD corresponds to an input type mask. With the help of SDK manual, we can find out the interface name.

When using MWSetVideoInputSource() to set video input interface, users need to execute MWGetInputSourceScan() to get the scan status of input source. If the status value is TRUE, it represents the video input source will be automatically selected. At this moment, users should execute MWSetInputSourceScan() to cancel the scan status of input source because setting with MWSetVideoInputSource() is correct in this situation.

Likewise, when using MWSetAudioInputSource() to set audio input interface, users need to execute MWGetAVInputSourceLink() to get the connection status of input audio source. If the status value is TRUE, it represents the audio input source will match video input source. At this moment, users should execute MWSetAVInputSourceLink() to cancel the connection status of input source. Only in this way will MWSetAudioInputSource() be effective.

In all, to the capture cards like AIO, which have many different input interfaces, when setting the A/V input source, users need to cancel the auto-select status of capture device, otherwise the input source setting is invalid.


Examples\CmdLineTools\InputSource contains a demo for the method mentioned above.