예제 #1
0
파일: OeipManager.cs 프로젝트: kbitc/oeip
        /// <summary>
        /// 得到所有Camera
        /// </summary>
        private void GetCameras()
        {
            OeipDevices.Clear();
            int count = OeipHelper.getDeviceCount();

            if (count <= 0)
            {
                return;
            }
            int deviceLenght = Marshal.SizeOf(typeof(OeipDeviceInfo));
            var devices      = PInvokeHelper.GetPInvokeArray <OeipDeviceInfo>(count,
                                                                              (IntPtr ptr, int pcount) =>
            {
                OeipHelper.getDeviceList(ptr, pcount);
            });

            OeipDevices = devices.ToList();
        }