PerceptionDepthFrameSourceWatcher 类

定义

监视对深度帧源列表的更改,并在列表更改时提供通知。

public ref class PerceptionDepthFrameSourceWatcher sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PerceptionDepthFrameSourceWatcher final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Deprecated("PerceptionDepthFrameSourceWatcher may be unavailable after Windows Creator Update.  Use Windows.Devices.Enumeration.DeviceWatcher instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
class PerceptionDepthFrameSourceWatcher final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PerceptionDepthFrameSourceWatcher
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Deprecated("PerceptionDepthFrameSourceWatcher may be unavailable after Windows Creator Update.  Use Windows.Devices.Enumeration.DeviceWatcher instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public sealed class PerceptionDepthFrameSourceWatcher
Public NotInheritable Class PerceptionDepthFrameSourceWatcher
继承
Object Platform::Object IInspectable PerceptionDepthFrameSourceWatcher
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

属性

Status

获取深度帧源观察程序的操作状态。

方法

Start()

调用此方法时,深度帧源观察程序会通过为每个源触发 SourceAdded 事件来枚举它尚未枚举的任何现有深度帧源。 此枚举完成后,将触发 EnumerationCompleted 事件。 然后,深度帧源开始监视新的深度帧源。

Stop()

调用此方法时,深度帧源观察程序将停止查找对深度帧源列表的更改。 此操作不是即时的;停止操作完成后,将触发 Stopped 事件。

事件

EnumerationCompleted

订阅 EnumerationCompleted 事件。 在完成已知深度帧源的初始枚举后触发此事件。

SourceAdded

订阅 SourceAdded 事件。

SourceRemoved

订阅 SourceRemoved 事件。 对于删除的每个深度帧源,都会触发一次此事件。

Stopped

订阅 Stopped 事件。 当 IPerceptionColorFrameSourceWatcher 停止侦听对深度帧源列表的更改时,将触发此事件。

适用于