예제 #1
0
 /**
  *获取指定的UVC设备的对应分辨率
  *@param deviceName UVC设备识别字符串
  */
 private SupportedFormats GetSupportedVideoSize(string deviceName)
 {
     AndroidDebug.Logd(TAG, "获取指定的UVC设备的对应分辨率:" + deviceName);
     if (!String.IsNullOrEmpty(deviceName))
     {
         using (AndroidJavaClass clazz = new AndroidJavaClass(FQCN_PLUGIN))
         {
             return(SupportedFormats.Parse(
                        clazz.CallStatic <string>("getSupportedVideoSize",
                                                  AndroidUtils.GetCurrentActivity(), deviceName)));
         }
     }
     else
     {
         throw new ArgumentException("device name is empty/null");
     }
 }
예제 #2
0
        /**
         * 指定したUVC機器の対応解像度を取得する
         * @param deviceName UVC機器識別文字列
         */
        private SupportedFormats GetSupportedVideoSize(string deviceName)
        {
#if (!NDEBUG && DEBUG && ENABLE_LOG)
            Console.WriteLine($"{TAG}GetSupportedVideoSize:{deviceName}");
#endif

            if (!String.IsNullOrEmpty(deviceName))
            {
                using (AndroidJavaClass clazz = new AndroidJavaClass(FQCN_PLUGIN))
                {
                    return(SupportedFormats.Parse(
                               clazz.CallStatic <string>("getSupportedVideoSize",
                                                         AndroidUtils.GetCurrentActivity(), deviceName)));
                }
            }
            else
            {
                throw new ArgumentException("device name is empty/null");
            }
        }