Compartilhar via


PerceptionVideoFrameAllocator Classe

Definição

Um alocador que pode criar PerceptionFrames diretamente, que podem ser gravados ou copiados do Windows::Media::VideoFrame em um 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
Herança
Object Platform::Object IInspectable PerceptionVideoFrameAllocator
Atributos
Implementações

Requisitos do Windows

Família de dispositivos
Windows 10 (introduzida na 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduzida na v1.0)

Construtores

PerceptionVideoFrameAllocator(UInt32, BitmapPixelFormat, Size, BitmapAlphaMode)

Inicializa um novo PerceptionVideoFrameAllocator com as propriedades necessárias para uso pelo IPerceptionFrameProvider para criar PerceptionFrames publicados por meio de PerceptionFrameProviderManagerService::P ublishFrameForProvider.

Métodos

AllocateFrame()

Cria um PerceptionFrame vazio com as propriedades especificadas ao criar o PerceptionVideoFrameAllocator.

Close()

Libera recursos do sistema expostos por um objeto Windows Runtime.

CopyFromVideoFrame(VideoFrame)

Cria uma cópia profunda do vídeo FrameProvider com os bytes já preenchidos com o PerceptionFrame resultante.

Dispose()

Realiza tarefas definidas pelo aplicativo associadas à liberação ou à redefinição de recursos não gerenciados.

Aplica-se a

Confira também