
Device Setup and Control
Quadro SDI Output PG-03776-001_v06 | 7
On Linux, use the XNVCTRLQueryAttribute function to query NV_CTRL_GVO_SUPPORTED
to determine if the X screen supports video output. This call will fail if video output is
not supported on the current X screen, or if the video output is already in use by the
desktop or another application.
Code Listing 3: Using NV_CONTROL-X Extension to Query Video
Output Capabilities
If (!XNVCTRLQueryAttribute(dpy, screen, 0,
NV_CTRL_GVO_SUPPORTED, &value)) {
return FALSE;
} else {
return TRUE;
}
4.3 OPENING THE VIDEO DEVICE
Once the availability of a SDI video output device has been confirmed, the next step is to
open the video device by calling
NvAPI_VIO_Open(). This is demonstrated in Code
Listing 4. In this example,
NVVIOCLASS_SDI indicates that the device is an SDI device
while
NVVIOOWNERTYPE_APPLICATION indicates that the device will be controlled by an
application rather than the desktop or NVIDIA control panel.
Code Listing 4: Opening the Video Device
// Open the video output device.
if (NvAPI_VIO_Open(m_vioHandle, NVVIOCLASS_SDI,
NVVIOOWNERTYPE_APPLICATION) != NVAPI_OK) {
MessageBox(NULL, "Cannot open SDI output device.", "Error",
MB_OK);
return E_FAIL;
}
Kommentare zu diesen Handbüchern