var mediaCapture = new MediaCapture(); // initialization here await mediaCapture.InitializeAsync(); // get available resolutions var resolutions = mediaCapture.VideoDeviceController.GetAvailableMediaStreamProperties(MediaStreamType.VideoPreview).ToList(); int i = 0; foreach (var res in resolutions) { log.Info(string.Format( "Resolution [{0}] - {1}x{2}", i++, (res as VideoEncodingProperties).Width, (res as VideoEncodingProperties).Height) ); } // set used resolution await mediaCapture.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, resolutions[7]);
[1] http://stackoverflow.com/questions/35261485/how-to-change-media-capture-photo-resolution-for-uwp
[2] https://msdn.microsoft.com/en-us/library/windows/apps/windows.media.devices.videodevicecontroller.getavailablemediastreamproperties.aspx
[3] http://stackoverflow.com/questions/15412772/take-photo-with-custom-resolution-from-captureelement-with-mediacapture
Žádné komentáře:
Okomentovat