[][src]Function nvml_binding::bindings::nvmlDeviceGetEncoderSessions

pub unsafe extern "C" fn nvmlDeviceGetEncoderSessions(
    device: nvmlDevice_t,
    sessionCount: *mut c_uint,
    sessionInfos: *mut nvmlEncoderSessionInfo_t
) -> nvmlReturn_t

Retrieves information about active encoder sessions on a target device.

An array of active encoder sessions is returned in the caller-supplied buffer pointed at by \a sessionInfos. The array elememt 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 nvmlEncoderSessionInfo_t array required in \a sessionCount. To query the number of active encoder sessions, call this function with *sessionCount = 0. The code will return NVML_SUCCESS with number of active encoder sessions updated in *sessionCount.

For Maxwell &tm; or newer fully supported devices.

@param device The identifier of the target device @param sessionCount Reference to caller supplied array size, and returns the number of sessions. @param sessionInfos Reference in which to return the session information

@return - \ref NVML_SUCCESS if \a sessionInfos is fetched - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a sessionCount is too small, array element count is returned in \a sessionCount - \ref NVML_ERROR_INVALID_ARGUMENT if \a sessionCount is NULL. - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible - \ref NVML_ERROR_UNKNOWN on any unexpected error