[][src]Function nvml_binding::bindings::nvmlVgpuInstanceGetFBCSessions

pub unsafe extern "C" fn nvmlVgpuInstanceGetFBCSessions(
    vgpuInstance: nvmlVgpuInstance_t,
    sessionCount: *mut c_uint,
    sessionInfo: *mut nvmlFBCSessionInfo_t
) -> nvmlReturn_t

Retrieves information about active frame buffer capture sessions on a vGPU Instance.

An array of active FBC sessions is returned in the caller-supplied buffer pointed at by \a sessionInfo. The array element count is passed in \a sessionCount, and \a sessionCount is used to return the number of sessions written to the buffer.

If the supplied buffer is not large enough to accomodate the active session array, the function returns NVML_ERROR_INSUFFICIENT_SIZE, with the element count of nvmlFBCSessionInfo_t array required in \a sessionCount. To query the number of active FBC sessions, call this function with *sessionCount = 0. The code will return NVML_SUCCESS with number of active FBC sessions updated in *sessionCount.

For Maxwell &tm; or newer fully supported devices.

@note hResolution, vResolution, averageFPS and averageLatency data for a FBC session returned in \a sessionInfo may be zero if there are no new frames captured since the session started.

@param vgpuInstance Identifier of the target vGPU instance @param sessionCount Reference to caller supplied array size, and returns the number of sessions. @param sessionInfo Reference in which to return the session information

@return - \ref NVML_SUCCESS if \a sessionInfo is fetched - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuInstance is 0, or \a sessionCount is NULL. - \ref NVML_ERROR_NOT_FOUND if \a vgpuInstance does not match a valid active vGPU instance on the system - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a sessionCount is too small, array element count is returned in \a sessionCount - \ref NVML_ERROR_UNKNOWN on any unexpected error