예제 #1
0
파일: OeipManager.cs 프로젝트: kbitc/oeip
        public List <VideoFormat> GetCameraFormats(int cameraId)
        {
            if (cameraId < 0 && cameraId >= OeipDevices.Count)
            {
                return(null);
            }
            int count = OeipHelper.getFormatCount(cameraId);

            if (count > 0)
            {
                var videoFormats = PInvokeHelper.GetPInvokeArray <VideoFormat>(count,
                                                                               (IntPtr ptr, int pcount) =>
                {
                    OeipHelper.getFormatList(cameraId, ptr, pcount);
                });
                return(videoFormats.ToList());
            }
            return(new List <VideoFormat>());
        }