共用方式為


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

適用於

另請參閱