MediaCaptureInitializationSettings.SharingMode Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets an object that specifies the sharing mode for the MediaCapture.
public:
property MediaCaptureSharingMode SharingMode { MediaCaptureSharingMode get(); void set(MediaCaptureSharingMode value); };
MediaCaptureSharingMode SharingMode();
void SharingMode(MediaCaptureSharingMode value);
public MediaCaptureSharingMode SharingMode { get; set; }
var mediaCaptureSharingMode = mediaCaptureInitializationSettings.sharingMode;
mediaCaptureInitializationSettings.sharingMode = mediaCaptureSharingMode;
Public Property SharingMode As MediaCaptureSharingMode
Property Value
An object that specifies the sharing mode for the MediaCapture.
Windows requirements
| Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|
| App capabilities |
backgroundMediaRecording
|
Remarks
Multiple apps can simultaneously acquire frames from the same MediaFrameSource, but only a single active MediaCapture instance can acquire exclusive control and modify the settings for the frame source. Set SharingMode to ExclusiveControl if you need to adjust the configuration (of any of the frame sources included the requested SourceGroup. A MediaCapture instance becomes active when a stream has been started or after a camera control value is set by using the MediaCapture.VideoDeviceController. Attempting to render active a MediaCapture instance when another controlling mode instance is already active will result in a sharing violation failure. If you only need to acquire frames without modifying the configuration, set SharingMode to SharedReadOnly.
When the SharingMode is set to SharedReadOnly, some of the MediaCaptureInitializationSettings properties can't be configured. See below table for details.
| Properties | Can be configured in Sharing Mode |
|---|---|
| AlwaysPlaySystemShutterSound | Yes |
| AudioDeviceId | Yes |
| AudioProcessing | Yes |
| AudioSource | N/A |
| DeviceUri | Yes |
| DeviceUriPasswordCredential | Yes |
| MediaCategory | Yes |
| MemoryPreference | Yes |
| PhotoCaptureSource | N/A |
| PhotoMediaDescription | No |
| PreviewMediaDescription | No |
| RecordMediaDescription | No |
| SourceGroup | Yes |
| StreamingCaptureMode | Yes |
| VideoDeviceId | Yes |
| VideoProfile | No |
| VideoSource | Yes |
Applies to
See also
- <xref:%2f%2ffree.blessedness.top%2fen-us%2fwindows%2fwin32%2fmedfound%2fmf-devsource-attribute-frameserver-share-mode)>