MediaStreamSourceSampleRequestDeferral 类

定义

提供一种方法,让应用程序异步报告它已完成对 MediaStreamSample 的检索。

public ref class MediaStreamSourceSampleRequestDeferral 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 MediaStreamSourceSampleRequestDeferral 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 MediaStreamSourceSampleRequestDeferral
Public NotInheritable Class MediaStreamSourceSampleRequestDeferral
继承
Object Platform::Object IInspectable MediaStreamSourceSampleRequestDeferral
属性

Windows 要求

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

注解

可以使用延迟以异步方式检索 MediaStreamSampleMediaStreamSource 将等待,直到将延迟标记为完成。

若要创建延迟,请调用 MediaStreamSourceSampleRequest.GetDeferral。 这将指示 MediaStreamSource 等待 MediaStreamSample。 将 MediaStreamSample 分配给 MediaStreamSourceSampleRequest.Sample 属性后,调用 Complete 方法以结束延迟。

有关在 UWP 应用中使用媒体流源的示例,请参阅 MediaStreamSource 示例

方法

Complete()

报告应用程序已完成检索 MediaStreamSample

适用于

另请参阅