Esempio n. 1
0
    private static AVProLiveCameraDeviceMode GetClosestMode(AVProLiveCameraDevice device, List <Vector2> resolutions, bool maintainApectRatio)
    {
        AVProLiveCameraDeviceMode result = null;

        for (int i = 0; i < resolutions.Count; i++)
        {
            result = device.GetClosestMode(Mathf.FloorToInt(resolutions[i].x), Mathf.FloorToInt(resolutions[i].y), maintainApectRatio);
            if (result != null)
            {
                break;
            }
        }
        return(result);
    }
Esempio n. 2
0
 private static AVProLiveCameraDeviceMode GetClosestMode(AVProLiveCameraDevice device, List<Vector2> resolutions, bool maintainApectRatio)
 {
     AVProLiveCameraDeviceMode result = null;
     for (int i = 0; i < resolutions.Count; i++)
     {
         result = device.GetClosestMode(Mathf.FloorToInt(resolutions[i].x), Mathf.FloorToInt(resolutions[i].y), maintainApectRatio);
         if (result != null)
             break;
     }
     return result;
 }