
Device Setup and Control
Quadro SDI Output PG-03776-001_v06 | 6
4.2 DETERMINING VIDEO CAPABILITES
On Windows, prior to configuring a video device, an application must query the
available video I/O topologies and locate a video device with the capability
NVVIOCAPS_VIDOUT_SDI. The procedure for doing this is outlined in Code Listing 2.
Once a video device with the desired capabilities is found, it is important to save the
VIO handle as this is the handle that will be passed to other NVAPI VIO functions for
configuring and controlling the device.
Code Listing 2: Locating an SDI Output Device on Windows
// Query Available Video I/O Topologies
memset(&l_vioTopos, 0, sizeof(l_vioTopos));
l_vioTopos.version = NVVIOTOPOLOGY_VER;
if (NvAPI_VIO_QueryTopology(&l_vioTopos) != NVAPI_OK) {
MessageBox(NULL, "Video I/O Unsupported.", "Error", MB_OK);
return E_FAIL;
}
// Cycle through all SDI topologies looking for the first
// available SDI output device topology.
l_bFound = FALSE;
i = 0;
while ((i < l_vioTopos.vioTotalDeviceCount) && (!l_bFound)) {
// Get video I/O capabilities for current video I/O target.
memset(&l_vioCaps, 0, sizeof(l_vioCaps));
l_vioCaps.version = NVVIOCAPS_VER;
if (NvAPI_VIO_GetCapabilities(l_vioTopos.vioTarget[i].hVioHandle,
&l_vioCaps) != NVAPI_OK) {
MessageBox(NULL, "Video I/O Unsupported.", "Error", MB_OK);
return E_FAIL;
}
// If video output device found, save VIO handle and set flag.
if (l_vioCaps.adapterCaps & NVVIOCAPS_VIDOUT_SDI) {
m_vioHandle = l_vioTopos.vioTarget[i].hVioHandle;
m_physicalGPU = l_vioTopologies.vioTarget[i].hPhysicalGpu;
l_bFound = TRUE;
} else {
i++;
}
} // while i < vioTotalDeviceCount
// If no video output device found, return error.
if (!l_bFound) {
MessageBox(NULL, "No SDI video output devices found.", "Error",
MB_OK);
return E_FAIL;
}
Comentarios a estos manuales