WVR_GetAvailableFrameRates

WVR_EXPORT WVR_Result WVR_GetAvailableFrameRates(uint32_t frameRateCapacityInput, uint32_t * frameRateCountOutput, uint32_t * availableFrameRates)

Function to get available frame rates.

Use this function to get available frame rates for the HMD.

Version
API Level 12
Note
Supported since Runtime version 12 or higher.
Parameters
  • frameRateCapacityInput: The capacity of the availableFrameRates array, or 0 to indicate a request to retrieve the required capacity.
  • frameRateCountOutput: A pointer to the count of availableFrameRates written, or a pointer to the required capacity in the case that frameRateCapacityInput is insufficient.
  • availableFrameRates: A pointer to an array of integer HMD available frame rates. It can be NULL if frameRateCapacityInput is 0.
Return Value
  • WVR_SUCCESS: Get available frame rates successfully.
  • WVR_Error_RuntimeVersionNotSupport: This feature is supported from Runtime version 12 or higher.
  • WVR_Error_FeatureNotSupport: This feature is not supported on this device.
  • WVR_Error_SystemInvalid: The runtime initialization was not finished.
  • Others: Failed, please see WVR_Result for more information.

How to use

Here is an example for the function:

uint32_t frameRateCount = 0;
WVR_GetAvailableFrameRates(0, &frameRateCount, nullptr);
if (frameRateCount > 0) {
    LOGI("Get available framerate count: %d", frameRateCount);

    int availableFrameRates[frameRateCount];
    WVR_GetAvailableFrameRates(frameRateCount, &frameRateCount, availableFrameRates);
    for (int i=0; i < frameRateCount; i++) {
        LOGI("Available framerate: %d", availableFrameRates[i]);
    }
}