Class VideoFrameX
Video frame.
Inherited Members
Namespace: VisioForge.Core.Types.X
Assembly: VisioForge.Core.dll
Syntax
public class VideoFrameX : VideoFrameInfoX
Constructors
VideoFrameX()
Initializes a new instance of the VideoFrameX class.
Declaration
public VideoFrameX()
VideoFrameX(byte[], int, int, int, VideoFormatX)
Initializes a new instance of the VideoFrameX class.
Declaration
public VideoFrameX(byte[] data, int width, int height, int stride, VideoFormatX format)
Parameters
Type | Name | Description |
---|---|---|
byte[] | data | The data. |
int | width | The width. |
int | height | The height. |
int | stride | The stride. |
VideoFormatX | format | The format. |
VideoFrameX(int[], int, int, int, VideoFormatX)
Initializes a new instance of the VideoFrameX class.
Declaration
public VideoFrameX(int[] data, int width, int height, int stride, VideoFormatX format)
Parameters
Type | Name | Description |
---|---|---|
int[] | data | The data. |
int | width | The width. |
int | height | The height. |
int | stride | The stride. |
VideoFormatX | format | The format. |
VideoFrameX(nint, int, int, int, int, VideoFormatX)
Initializes a new instance of the VideoFrameX class.
Declaration
public VideoFrameX(nint data, int dataSize, int width, int height, int stride, VideoFormatX format)
Parameters
Type | Name | Description |
---|---|---|
nint | data | The data. |
int | dataSize | Size of the data. |
int | width | The width. |
int | height | The height. |
int | stride | The stride. |
VideoFormatX | format | The format. |
Properties
Caps
Gets or sets the caps.
Declaration
public string Caps { get; set; }
Property Value
Type | Description |
---|---|
string | The caps. |
Data
Data.
Declaration
public nint Data { get; set; }
Property Value
Type | Description |
---|---|
nint |
DataSize
Data size.
Declaration
public int DataSize { get; set; }
Property Value
Type | Description |
---|---|
int |
Duration
The duration.
Declaration
public TimeSpan Duration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Timestamp
The timestamp.
Declaration
public TimeSpan Timestamp { get; set; }
Property 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. |
Alloc(int, int, int, VideoFormatX)
Allocs the specified frame.
Declaration
public static VideoFrameX Alloc(int width, int height, int stride, VideoFormatX format)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width. |
int | height | The height. |
int | stride | The stride. |
VideoFormatX | format | The format. |
Returns
Type | Description |
---|---|
VideoFrameX | VideoFrameX. |
ClearPixels()
Clears the pixels.
Declaration
public void ClearPixels()
Clone()
Clones this instance.
Declaration
public VideoFrameX Clone()
Returns
Type | Description |
---|---|
VideoFrameX | VideoFrameX. |
CopyFrom(VideoFrameX)
Declaration
public void CopyFrom(VideoFrameX frame)
Parameters
Type | Name | Description |
---|---|---|
VideoFrameX | frame |
CopyInfoFrom(VideoFrameX)
Copies the information from.
Declaration
public void CopyInfoFrom(VideoFrameX frame)
Parameters
Type | Name | Description |
---|---|---|
VideoFrameX | frame | The frame. |
CopyInfoTo(ref VideoFrameX)
Copies the information to.
Declaration
public void CopyInfoTo(ref VideoFrameX frame)
Parameters
Type | Name | Description |
---|---|---|
VideoFrameX | frame | The frame. |
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[]. |
ToVideoFrame()
Converts to VideoFrame.
Declaration
public VideoFrame ToVideoFrame()
Returns
Type | Description |
---|---|
VideoFrame | VideoFrame. |