MediaCapture.GetPreviewFrameAsync MediaCapture.GetPreviewFrameAsync MediaCapture.GetPreviewFrameAsync MediaCapture.GetPreviewFrameAsync MediaCapture.GetPreviewFrameAsync Method

Definition

Overloads

GetPreviewFrameAsync() GetPreviewFrameAsync() GetPreviewFrameAsync() GetPreviewFrameAsync() GetPreviewFrameAsync()

Gets a preview frame from the capture device.

GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame)

Gets a preview frame from the capture device, copied into the provided destination VideoFrame and converted into the destination frame's format.

GetPreviewFrameAsync() GetPreviewFrameAsync() GetPreviewFrameAsync() GetPreviewFrameAsync() GetPreviewFrameAsync()

Gets a preview frame from the capture device.

public : IAsyncOperation<VideoFrame> GetPreviewFrameAsync()
IAsyncOperation<VideoFrame> GetPreviewFrameAsync() const;
public IAsyncOperation<VideoFrame> GetPreviewFrameAsync()
Public Function GetPreviewFrameAsync() As IAsyncOperation(Of VideoFrame)
Windows.Media.Capture.MediaCapture.getPreviewFrameAsync().done( /* Your success and error handlers */ );

Returns

An asynchronous operation that returns a VideoFrame on successful completion.

Additional features and requirements

Capabilities
backgroundMediaRecording

Remarks

This method returns the preview frame in the current format of the capture device without copying or converting the frame. To get the preview frame in another format, use the GetPreviewFrameAsync(VideoFrame) overload and pass in a VideoFrame with your desired format.

For how-to guidance on preview frames, see Get a preview frame.

See also

GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame) GetPreviewFrameAsync(VideoFrame)

Gets a preview frame from the capture device, copied into the provided destination VideoFrame and converted into the destination frame's format.

public : IAsyncOperation<VideoFrame> GetPreviewFrameAsync(VideoFrame destination)
IAsyncOperation<VideoFrame> GetPreviewFrameAsync(VideoFrame destination) const;
public IAsyncOperation<VideoFrame> GetPreviewFrameAsync(VideoFrame destination)
Public Function GetPreviewFrameAsync(destination As VideoFrame) As IAsyncOperation(Of VideoFrame)
Windows.Media.Capture.MediaCapture.getPreviewFrameAsync(destination).done( /* Your success and error handlers */ );

Parameters

destination
VideoFrame VideoFrame VideoFrame

The video frame into which the preview frame will be copied.

Returns

An asynchronous operation that returns a VideoFrame on successful completion.

Additional features and requirements

Capabilities
backgroundMediaRecording

Remarks

To get a preview frame without going through a copy or conversion operation, use the no argument overload of GetPreviewFrameAsync.

For how-to guidance on preview frames, see Get a preview frame.

See also