Esempio n. 1
0
        public IEnumerable <CameraDeviceInformation> GetDeviceInformation()
        {
            var deviceList = new Native.CameraDeviceListStruct();

            Native.GetDeviceList(Handle, ref deviceList).
            ThrowIfFailed("Failed to get camera device list");

            return(GetDeviceInformation(deviceList));
        }
Esempio n. 2
0
        internal static IEnumerable <CameraDeviceInformation> GetDeviceInformation(Native.CameraDeviceListStruct list)
        {
            if (list.count == 0)
            {
                return(Enumerable.Empty <CameraDeviceInformation>());
            }

            var deviceList = new List <CameraDeviceInformation>();

            for (int i = 0; i < list.count; i++)
            {
                deviceList.Add(GetDeviceInformation(list.device[i]));
            }

            return(deviceList.AsReadOnly());
        }
Esempio n. 3
0
        internal static ReadOnlyCollection <CameraDeviceInformation> GetDeviceInformation(Native.CameraDeviceListStruct list)
        {
            var devices    = list.device;
            var deviceList = new List <CameraDeviceInformation>();

            for (int i = 0; i < list.count; i++)
            {
                var deviceInfo = GetDeviceInformation(devices[i]);
                deviceList.Add(deviceInfo);

                Log.Info(CameraLog.Tag, deviceInfo.ToString());
            }

            return(new ReadOnlyCollection <CameraDeviceInformation>(deviceList));
        }