共用方式為


PerceptionVideoFrameAllocator 類別

定義

可直接建立 PerceptionFrame 的配置器,可直接寫入 Windows::Media::VideoFrame 或從 Windows::Media::VideoFrame 複製到 PerceptionFrame。

public ref class PerceptionVideoFrameAllocator sealed : IClosable
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Perception.Provider.IPerceptionVideoFrameAllocatorFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [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 PerceptionVideoFrameAllocator final : IClosable
/// [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.Activatable(Windows.Devices.Perception.Provider.IPerceptionVideoFrameAllocatorFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class PerceptionVideoFrameAllocator final : IClosable
/// [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.Activatable(Windows.Devices.Perception.Provider.IPerceptionVideoFrameAllocatorFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Deprecated("PerceptionVideoFrameAllocator may be unavailable after Windows Creator Update. Please refer to AVStream on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
class PerceptionVideoFrameAllocator final : IClosable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Perception.Provider.IPerceptionVideoFrameAllocatorFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[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 PerceptionVideoFrameAllocator : System.IDisposable
[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.Activatable(typeof(Windows.Devices.Perception.Provider.IPerceptionVideoFrameAllocatorFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PerceptionVideoFrameAllocator : System.IDisposable
[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.Activatable(typeof(Windows.Devices.Perception.Provider.IPerceptionVideoFrameAllocatorFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Deprecated("PerceptionVideoFrameAllocator may be unavailable after Windows Creator Update. Please refer to AVStream on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public sealed class PerceptionVideoFrameAllocator : System.IDisposable
function PerceptionVideoFrameAllocator(maxOutstandingFrameCountForWrite, format, resolution, alpha)
Public NotInheritable Class PerceptionVideoFrameAllocator
Implements IDisposable
繼承
Object Platform::Object IInspectable PerceptionVideoFrameAllocator
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

建構函式

PerceptionVideoFrameAllocator(UInt32, BitmapPixelFormat, Size, BitmapAlphaMode)

使用 IPerceptionFrameProvider 使用的必要屬性,初始化新的 PerceptionVideoFrameAllocator,以建立透過 PerceptionFrameProviderManagerService::P ublishFrameForProvider 發佈的 PerceptionFrames。

方法

AllocateFrame()

使用建立 PerceptionVideoFrameAllocator 時所指定的屬性,建立空的 PerceptionFrame。

Close()

釋放由 Windows 執行階段 物件公開的系統資源。

CopyFromVideoFrame(VideoFrame)

建立影片 FrameProvider 的深層複本,其中包含已填入結果 PerceptionFrame 的位元組。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

適用於

另請參閱