PerceptionVideoFrameAllocator
PerceptionVideoFrameAllocator
PerceptionVideoFrameAllocator
PerceptionVideoFrameAllocator
Class
Definition
An allocator that can create PerceptionFrames directly which can be written into or copied from Windows::Media::VideoFrame into a PerceptionFrame.
public : sealed class PerceptionVideoFrameAllocator : IPerceptionVideoFrameAllocator, IClosablepublic sealed class PerceptionVideoFrameAllocator : IPerceptionVideoFrameAllocator, IDisposablePublic NotInheritable Class PerceptionVideoFrameAllocator Implements IPerceptionVideoFrameAllocator, IDisposable// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
PerceptionVideoFrameAllocator(UInt32, BitmapPixelFormat, Size, BitmapAlphaMode) PerceptionVideoFrameAllocator(UInt32, BitmapPixelFormat, Size, BitmapAlphaMode) PerceptionVideoFrameAllocator(UInt32, BitmapPixelFormat, Size, BitmapAlphaMode) PerceptionVideoFrameAllocator(UInt32, BitmapPixelFormat, Size, BitmapAlphaMode)
Initializes a new PerceptionVideoFrameAllocator with the required properties for use by the IPerceptionFrameProvider to create PerceptionFrames published via PerceptionFrameProviderManagerService::PublishFrameForProvider.
public : PerceptionVideoFrameAllocator(unsigned int maxOutstandingFrameCountForWrite, BitmapPixelFormat format, Size resolution, BitmapAlphaMode alpha)public PerceptionVideoFrameAllocator(UInt32 maxOutstandingFrameCountForWrite, BitmapPixelFormat format, Size resolution, BitmapAlphaMode alpha)Public Sub New(maxOutstandingFrameCountForWrite As UInt32, format As BitmapPixelFormat, resolution As Size, alpha As BitmapAlphaMode)// You can use this method in JavaScript.
- maxOutstandingFrameCountForWrite
- unsigned int UInt32 UInt32 UInt32
This is the number of buffers in flight required by the FrameProvider to produce its * frames at framerate. The suggestion is at least 2.
The Windows::Graphics::Imaging::BitmapPixelFormat describing the format of the bytes of the frame.
The Windows::Graphics::Imaging::BitmapAlphaMode describing how transparency is handled in the pixels.
Methods
AllocateFrame() AllocateFrame() AllocateFrame() AllocateFrame()
Creates an empty PerceptionFrame with the properties specified when creating the PerceptionVideoFrameAllocator.
public : PerceptionFrame AllocateFrame()public PerceptionFrame AllocateFrame()Public Function AllocateFrame() As PerceptionFrame// You can use this method in JavaScript.
The empty frame with the properties specified when creating the PerceptionVideoFrameAllocator.
Close() Close() Close() Close()
Releases system resources that are exposed by a Windows Runtime object.
public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
CopyFromVideoFrame(VideoFrame) CopyFromVideoFrame(VideoFrame) CopyFromVideoFrame(VideoFrame) CopyFromVideoFrame(VideoFrame)
Creates a deep copy of the video FrameProvider with the bytes already filled in with the resulting PerceptionFrame.
public : PerceptionFrame CopyFromVideoFrame(VideoFrame frame)public PerceptionFrame CopyFromVideoFrame(VideoFrame frame)Public Function CopyFromVideoFrame(frame As VideoFrame) As PerceptionFrame// You can use this method in JavaScript.
The input frame from which to copy the pixel data.
The resulting filled PerceptionFrame.