/// <summary> /// Get video formats. /// </summary> public static VideoFormat[] GetVideoFormat(int cameraIndex) { var filter = DirectShow.CreateFilter(DirectShow.DsGuid.CLSID_VideoInputDeviceCategory, cameraIndex); var pin = DirectShow.FindPin(filter, 0, DirectShow.PIN_DIRECTION.PINDIR_OUTPUT); return(GetVideoOutputFormat(pin)); }
/// <summary> /// Video Capture Sourceフィルタを作成する /// </summary> private DirectShow.IBaseFilter CreateVideoCaptureSource(int index, VideoFormat format) { var filter = DirectShow.CreateFilter(DirectShow.DsGuid.CLSID_VideoInputDeviceCategory, index); var pin = DirectShow.FindPin(filter, 0, DirectShow.PIN_DIRECTION.PINDIR_OUTPUT); SetVideoOutputFormat(pin, format); return(filter); }