PerceptionDepthFrameSource.TrySetVideoProfileAsync 方法

定义

尝试在此深度帧源上设置视频配置文件。 需要此帧源上的活动控制器模式控制会话。

public:
 virtual IAsyncOperation<PerceptionFrameSourcePropertyChangeResult ^> ^ TrySetVideoProfileAsync(PerceptionControlSession ^ controlSession, PerceptionVideoProfile ^ profile) = TrySetVideoProfileAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetVideoProfileAsync(PerceptionControlSession const& controlSession, PerceptionVideoProfile const& profile);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("PerceptionDepthFrameSource may be unavailable after Windows Creator Update.  Use Windows.Media.Capture.Frames.MediaFrameSource instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetVideoProfileAsync(PerceptionControlSession const& controlSession, PerceptionVideoProfile const& profile);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetVideoProfileAsync(PerceptionControlSession controlSession, PerceptionVideoProfile profile);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("PerceptionDepthFrameSource may be unavailable after Windows Creator Update.  Use Windows.Media.Capture.Frames.MediaFrameSource instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetVideoProfileAsync(PerceptionControlSession controlSession, PerceptionVideoProfile profile);
function trySetVideoProfileAsync(controlSession, profile)
Public Function TrySetVideoProfileAsync (controlSession As PerceptionControlSession, profile As PerceptionVideoProfile) As IAsyncOperation(Of PerceptionFrameSourcePropertyChangeResult)

参数

controlSession
PerceptionControlSession

一个 PerceptionControlSession,表示对此帧源的活动控制。

profile
PerceptionVideoProfile

要设置的视频配置文件。

返回

此方法异步返回 PerceptionFrameSourcePropertyChangeResult 对象。 如果控制会话在设置视频配置文件时仍然处于活动状态,并且视频配置文件受支持且可激活,则结果将指示成功。

属性

适用于