MediaCapture.GetPreviewFrameAsync 方法

定義

多載

GetPreviewFrameAsync()

從擷取裝置取得預覽畫面。

GetPreviewFrameAsync(VideoFrame)

從擷取裝置取得預覽畫面,複製到提供的目的地 VideoFrame ,並轉換成目的地畫面的格式。

GetPreviewFrameAsync()

從擷取裝置取得預覽畫面。

public:
 virtual IAsyncOperation<VideoFrame ^> ^ GetPreviewFrameAsync() = GetPreviewFrameAsync;
/// [Windows.Foundation.Metadata.Overload("GetPreviewFrameAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<VideoFrame> GetPreviewFrameAsync();
[Windows.Foundation.Metadata.Overload("GetPreviewFrameAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<VideoFrame> GetPreviewFrameAsync();
function getPreviewFrameAsync()
Public Function GetPreviewFrameAsync () As IAsyncOperation(Of VideoFrame)

傳回

在成功完成時傳回 VideoFrame 的非同步作業。

屬性

Windows 需求

應用程式功能
backgroundMediaRecording

備註

此方法會傳回目前擷取裝置格式的預覽框架,而不復制或轉換框架。 若要以另一種格式取得預覽畫面,請使用 GetPreviewFrameAsync (VideoFrame) 多載,並以您想要的格式傳入 VideoFrame

如需預覽畫面的作法指引,請參閱 取得預覽框架

注意

針對在序列中擷取大量畫面格的應用程式案例,例如電腦視覺案例,建議您使用 MediaFrameReader 類別,而不是 GetPreviewFrameAsync。 如需詳細資訊和操作指引,請參閱 使用 MediaFrameReader 處理媒體畫面

另請參閱

適用於

GetPreviewFrameAsync(VideoFrame)

從擷取裝置取得預覽畫面,複製到提供的目的地 VideoFrame ,並轉換成目的地畫面的格式。

public:
 virtual IAsyncOperation<VideoFrame ^> ^ GetPreviewFrameAsync(VideoFrame ^ destination) = GetPreviewFrameAsync;
/// [Windows.Foundation.Metadata.Overload("GetPreviewFrameCopyAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<VideoFrame> GetPreviewFrameAsync(VideoFrame const& destination);
[Windows.Foundation.Metadata.Overload("GetPreviewFrameCopyAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<VideoFrame> GetPreviewFrameAsync(VideoFrame destination);
function getPreviewFrameAsync(destination)
Public Function GetPreviewFrameAsync (destination As VideoFrame) As IAsyncOperation(Of VideoFrame)

參數

destination
VideoFrame

將複製預覽畫面的視訊畫面。

傳回

在成功完成時傳回 VideoFrame 的非同步作業。

屬性

Windows 需求

應用程式功能
backgroundMediaRecording

備註

若要在不進行複製或轉換作業的情況下取得預覽框架,請使用 GetPreviewFrameAsync 的 no 引數多載。

如需預覽畫面的作法指引,請參閱 取得預覽框架

注意

針對在序列中擷取大量畫面格的應用程式案例,例如電腦視覺案例,建議您使用 MediaFrameReader 類別,而不是 GetPreviewFrameAsync。 如需詳細資訊和操作指引,請參閱 使用 MediaFrameReader 處理媒體畫面

另請參閱

適用於