MediaCaptureDeviceExclusiveControlReleaseMode 枚举

定义

指定释放对相机的独占访问权限的条件。

public enum class MediaCaptureDeviceExclusiveControlReleaseMode
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 983040)]
enum class MediaCaptureDeviceExclusiveControlReleaseMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 983040)]
public enum MediaCaptureDeviceExclusiveControlReleaseMode
var value = Windows.Media.Capture.MediaCaptureDeviceExclusiveControlReleaseMode.onDispose
Public Enum MediaCaptureDeviceExclusiveControlReleaseMode
继承
MediaCaptureDeviceExclusiveControlReleaseMode
属性

Windows 要求

设备系列
Windows 11 Insider Preview (在 10.0.23504.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v15.0 中引入)

字段

OnAllStreamsStopped 1

当来自关联相机的所有流停止时,将释放独占控制。

OnDispose 0

释放关联的相机对象时,将释放独占控件。

注解

通过调用 [TryAcquireExclusiveControl] (xref:Windows.Media.Devices.VideoDeviceController.TryAcquireExclusiveControl (System.String,Windows.Media.Capture.MediaCaptureDeviceExclusiveControlReleaseMode) 获取对相机的独占访问权限。

适用于