Exactly: the desiredFrameSize
property is obsolete. You must use the VideoResolution
property; for example, using resolution number 0:
yourvideoSource.VideoResolution = yourvideoSource.VideoCapabilities[0];
The number of the array represents a different resolution.
Use the following command to determine the amount of available resolutions and dimensions:
yourvideoSource.VideoCapabilities.Length;
for (int i = 0; i < yourvideoSource.VideoCapabilities.Length; i++ ){
string resolution= "Resolution Number "+Convert.Tostring(i);
string resolution_size = yourvideoSource.VideoCapabilities[i].FrameSize.ToString();
}