VideoFrame 類別

定義

代表單一視訊數據框架。

public ref class VideoFrame sealed : IClosable
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.IVideoFrameFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.GCPressure]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class VideoFrame final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.GCPressure]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.IVideoFrameFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class VideoFrame final : IClosable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.IVideoFrameFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.GCPressure]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class VideoFrame : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.GCPressure]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.IVideoFrameFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class VideoFrame : System.IDisposable
function VideoFrame(format, width, height, alpha)
Public NotInheritable Class VideoFrame
Implements IDisposable
繼承
Object Platform::Object IInspectable VideoFrame
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

版本歷程記錄

Windows 版本 SDK 版本 新增值
1803 17134 CopyToAsync (VideoFrame,可為 Null 的<BitmapBounds>,可為 Null 的<BitmapBounds>)

建構函式

VideoFrame(BitmapPixelFormat, Int32, Int32)

初始化 VideoFrame 類別的新實例。

VideoFrame(BitmapPixelFormat, Int32, Int32, BitmapAlphaMode)

初始化 VideoFrame 類別的新實例。

屬性

Direct3DSurface

取得 IDirect3DSurface 物件,其中包含一個影片畫面的像素數據。

Duration

取得或設定視訊畫面的持續時間。

ExtendedProperties

取得擴充屬性集,啟用媒體畫面上的取得和設定屬性。

IsDiscontinuous

取得或設定值,這個值表示視訊畫面是否為數據流中間距之後的第一個畫面。

IsReadOnly

取得值,指出視訊畫面是否為唯讀。

RelativeTime

取得或設定視訊數據流中畫面的相對時間。

SoftwareBitmap

取得 SoftwareBitmap 物件,其中包含影片畫面的像素數據,如果有的話。

SystemRelativeTime

取得或設定相對於系統的時間戳,而且在相同裝置上的多個媒體來源之間可更正。

Type

取得字串,指出視訊框架包含的視訊數據類型。

方法

Close()

處置對象和相關聯的資源。

CopyToAsync(VideoFrame)

將目前的 VideoFrame 複製到提供的 VideoFrame 物件。

CopyToAsync(VideoFrame, IReference<BitmapBounds>, IReference<BitmapBounds>)

將目前 VideoFrame 中指定的矩形複製到所提供 VideoFrame 物件的指定矩形。

CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32)

建立 VideoFrame 類別的新實例,影像數據會儲存在預設 Direct3D 裝置配置的 IDXGISurface 中。

CreateAsDirect3D11SurfaceBacked(DirectXPixelFormat, Int32, Int32, IDirect3DDevice)

建立 VideoFrame 類別的新實例,該類別的影像數據會儲存在所提供 Direct3D 裝置配置的 IDXGISurface 中。

CreateWithDirect3D11Surface(IDirect3DSurface)

建立 VideoFrame 類別的新實例,影像數據會儲存在提供的 IDXGISurface 中。

CreateWithSoftwareBitmap(SoftwareBitmap)

從提供的SoftwareBitmap建立VideoFrame類別的新實例。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

適用於

另請參閱