Struct VideoFrame
Video frame.
Inherited Members
Namespace: VisioForge.Core.Types
Assembly: VisioForge.Core.dll
Syntax
public struct VideoFrame
Fields
Data
Data.
Declaration
public nint Data
Field Value
Type | Description |
---|---|
nint |
DataSize
Data size.
Declaration
public int DataSize
Field Value
Type | Description |
---|---|
int |
Duration
The duration.
Declaration
public TimeSpan Duration
Field Value
Type | Description |
---|---|
TimeSpan |
Info
The information.
Declaration
public RAWBaseVideoInfo Info
Field Value
Type | Description |
---|---|
RAWBaseVideoInfo |
Timestamp
The timestamp.
Declaration
public TimeSpan Timestamp
Field Value
Type | Description |
---|---|
TimeSpan |
Methods
Alloc()
Allocates memory if stride and height set.
Declaration
public void Alloc()
Alloc(int)
Allocs the specified size.
Declaration
public void Alloc(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The size. |
Clone()
Clones this instance.
Declaration
public VideoFrame Clone()
Returns
Type | Description |
---|---|
VideoFrame | VideoFrame. |
CreateAndAlloc(int, int, int, RAWVideoColorSpace)
Creates the VideoFrame and allocates.
Declaration
public static VideoFrame CreateAndAlloc(int width, int height, int stride, RAWVideoColorSpace colorspace)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width. |
int | height | The height. |
int | stride | The stride. |
RAWVideoColorSpace | colorspace | The colorspace. |
Returns
Type | Description |
---|---|
VideoFrame | VideoFrame. |
CreateNoAlloc(int, int, int, RAWVideoColorSpace)
Creates the VideoFrame without allocation.
Declaration
public static VideoFrame CreateNoAlloc(int width, int height, int stride, RAWVideoColorSpace colorspace)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width. |
int | height | The height. |
int | stride | The stride. |
RAWVideoColorSpace | colorspace | The colorspace. |
Returns
Type | Description |
---|---|
VideoFrame | VideoFrame. |
Free()
Frees allocated memory.
Declaration
public void Free()
IsEmpty()
Determines whether this instance is empty.
Declaration
public bool IsEmpty()
Returns
Type | Description |
---|---|
bool |
|
ToArray()
Converts to array.
Declaration
public byte[] ToArray()
Returns
Type | Description |
---|---|
byte[] | System.Byte[]. |
ToRAWImage()
Converts to RAWVideoFrame.
Declaration
public RAWImage ToRAWImage()
Returns
Type | Description |
---|---|
RAWImage | RAWImage. |
ToRAWVideoFrame()
Converts to RAWVideoFrame.
Declaration
public RAWVideoFrame ToRAWVideoFrame()
Returns
Type | Description |
---|---|
RAWVideoFrame | RAWVideoFrame. |
ToVideoFrameX(bool)
Converts to VideoFrameX.
Declaration
public VideoFrameX ToVideoFrameX(bool copyData)
Parameters
Type | Name | Description |
---|---|---|
bool | copyData | if set to |
Returns
Type | Description |
---|---|
VideoFrameX | VideoFrameX. |