videoCaptureDevice.VideoCapabilities.FirstOrDefault(c => c.FrameSize.Width == 640 && c.FrameSize.Height == 480);
时间: 2024-05-25 21:19:13 浏览: 85
&& c.FrameSize.Height == 480);
This code snippet is written in C# and is used to find the first video capability of a video capture device that has a frame size of 640x480.
The videoCaptureDevice is an instance of the VideoCaptureDevice class, which is used to capture video from a camera or other video input source.
The VideoCapabilities property of the videoCaptureDevice object returns a collection of all the video capabilities supported by the device.
The FirstOrDefault method is used to find the first video capability that matches the specified criteria. In this case, the criteria are that the FrameSize property of the video capability must have a Width of 640 and a Height of 480.
If a video capability with those dimensions is found, it will be returned by the method. If not, the method will return null.
阅读全文