CapturedFrame CapturedFrame CapturedFrame CapturedFrame Class

Definition

Represents a captured video frame.

public : sealed class CapturedFrame : IClosable, ICapturedFrame, ICapturedFrameWithSoftwareBitmap, IContentTypeProvider, IInputStream, IOutputStream, IRandomAccessStream, IRandomAccessStreamWithContentTypepublic sealed class CapturedFrame : IDisposable, ICapturedFrame, ICapturedFrameWithSoftwareBitmap, IContentTypeProvider, IInputStream, IOutputStream, IRandomAccessStream, IRandomAccessStreamWithContentTypePublic NotInheritable Class CapturedFrame Implements IDisposable, ICapturedFrame, ICapturedFrameWithSoftwareBitmap, IContentTypeProvider, IInputStream, IOutputStream, IRandomAccessStream, IRandomAccessStreamWithContentType// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

CanRead CanRead CanRead CanRead

Gets a value that indicates if the captured frame can be read from.

public : PlatForm::Boolean CanRead { get; }public bool CanRead { get; }Public ReadOnly Property CanRead As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

true if the captured frame can be read from; otherwise, false.

CanWrite CanWrite CanWrite CanWrite

Gets a value that indicates if the captured frame can be written to.

public : PlatForm::Boolean CanWrite { get; }public bool CanWrite { get; }Public ReadOnly Property CanWrite As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

true if the captured frame can be written to; otherwise, false.

ContentType ContentType ContentType ContentType

Gets the content type of the captured frame.

public : PlatForm::String ContentType { get; }public string ContentType { get; }Public ReadOnly Property ContentType As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The content type of the captured frame.

Height Height Height Height

Gets the height of the captured frame

public : unsigned int Height { get; }public uint Height { get; }Public ReadOnly Property Height As uint// You can use this property in JavaScript.
Value
unsigned int uint uint uint

The height of the frame.

Position Position Position Position

Gets the position of the captured frame.

public : ulong Position { get; }public ulong Position { get; }Public ReadOnly Property Position As ulong// You can use this property in JavaScript.
Value
ulong ulong ulong ulong

The position of the captured frame.

Size Size Size Size

Gets the size of the captured frame in bytes.

public : ulong Size { get; set; }public ulong Size { get; set; }Public ReadWrite Property Size As ulong// You can use this property in JavaScript.
Value
ulong ulong ulong ulong

The size of the captured frame in bytes.

SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap

Gets a SoftwareBitmap object representing the captured frame.

public : SoftwareBitmap SoftwareBitmap { get; }public SoftwareBitmap SoftwareBitmap { get; }Public ReadOnly Property SoftwareBitmap As SoftwareBitmap// You can use this property in JavaScript.
Value
SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap

A SoftwareBitmap object representing the captured frame.

Width Width Width Width

Gets the width of the captured frame.

public : unsigned int Width { get; }public uint Width { get; }Public ReadOnly Property Width As uint// You can use this property in JavaScript.
Value
unsigned int uint uint uint

The width of the captured frame.

Methods

CloneStream() CloneStream() CloneStream() CloneStream()

Creates a copy of the stream.

public : IRandomAccessStream CloneStream()public IRandomAccessStream CloneStream()Public Function CloneStream() As IRandomAccessStream// You can use this method in JavaScript.
Returns

Close() Close() Close() Close()

Closes the captured framed 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.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()

FlushAsync() FlushAsync() FlushAsync() FlushAsync()

Asynchronously commits and flushes all of the data of the CapturedFrame.

public : IAsyncOperation<PlatForm::Boolean> FlushAsync()public IAsyncOperation<bool> FlushAsync()Public Function FlushAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Returns

When this method completes, a boolean value is returned which specifies true if the operation completed successfully; otherwise, false.

GetInputStreamAt(UInt64) GetInputStreamAt(UInt64) GetInputStreamAt(UInt64) GetInputStreamAt(UInt64)

Gets the input stream at the specified position.

public : IInputStream GetInputStreamAt(unsigned __int64 position)public IInputStream GetInputStreamAt(UInt64 position)Public Function GetInputStreamAt(position As UInt64) As IInputStream// You can use this method in JavaScript.
Parameters
position
unsigned __int64 UInt64 UInt64 UInt64

The position in the input stream.

Returns

GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64)

Gets the output stream at the specified position.

public : IOutputStream GetOutputStreamAt(unsigned __int64 position)public IOutputStream GetOutputStreamAt(UInt64 position)Public Function GetOutputStreamAt(position As UInt64) As IOutputStream// You can use this method in JavaScript.
Parameters
position
unsigned __int64 UInt64 UInt64 UInt64

The position in the output stream.

Returns

ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions)

Returns an asynchronous byte reader object.

public : IAsyncOperationWithProgress<IBuffer, unsigned int> ReadAsync(IBuffer buffer, unsigned int count, InputStreamOptions options)public IAsyncOperationWithProgress<IBuffer, uint> ReadAsync(IBuffer buffer, UInt32 count, InputStreamOptions options)Public Function ReadAsync(buffer As IBuffer, count As UInt32, options As InputStreamOptions) As IAsyncOperationWithProgress( Of IBuffer, uint )// You can use this method in JavaScript.
Parameters
buffer
IBuffer IBuffer IBuffer IBuffer

The buffer into which the asynchronous read operation places the bytes that are read.

count
unsigned int UInt32 UInt32 UInt32

The number of bytes to read that is less than or equal to the Capacity value.

options
InputStreamOptions InputStreamOptions InputStreamOptions InputStreamOptions

Specifies the type of the asynchronous read operation.

Returns

Seek(UInt64) Seek(UInt64) Seek(UInt64) Seek(UInt64)

Seeks the stream to the specified position.

public : void Seek(unsigned __int64 position)public void Seek(UInt64 position)Public Function Seek(position As UInt64) As void// You can use this method in JavaScript.
Parameters
position
unsigned __int64 UInt64 UInt64 UInt64

The position in the stream to seek too.

WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer)

Asynchronously writes the specified data to the stream.

public : IAsyncOperationWithProgress<unsigned int, unsigned int> WriteAsync(IBuffer buffer)public IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer)Public Function WriteAsync(buffer As IBuffer) As IAsyncOperationWithProgress( Of uint, uint )// You can use this method in JavaScript.
Parameters
buffer
IBuffer IBuffer IBuffer IBuffer

The data to write to the stream.

Returns

Represents an asynchronous operation that returns a result and reports progress.

See Also