question

jonavarque-7291 avatar image
0 Votes"
jonavarque-7291 asked jonavarque-7291 edited

How do I set the record resoultion in MediaCapture?

C# WPF .net5 windows 19041
MediaCapture
Previewing Cameras on a XAML Image element.

Using MediaFrameReader

I attempt to set
await TheCaptureMgr.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoRecord, <IMediaEncodingProperties>someProperty);

And I always get an exception "File is in use by another process"

UPDATE:
Can not set set streamproperties unless you have ExclusiveControl of the 'camera'.
MediaCapture init settings:
SharingMode = MediaCaptureSharingMode.ExclusiveControl,
Now, you can set StreamProperties without exceptions.

You can remove this post, but this information wasn't evident in all of the documentation I've been looking at.
It does make perfect sense though.




dotnet-wpf-xaml
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers