Frame
Struct representing a captured camera frame.
Public Fields
Format
Gets the format of the image planes in this frame.
public MLWebRTC.VideoSink.Frame.OutputFormat Format { get; set; }
Type | Description |
---|---|
MLWebRTC.VideoSink.Frame.OutputFormat | Defines the supported output formats of the image planes. |
Id
Gets the id of the frame.
public ulong Id { get; set; }
ImagePlanes
Gets the array of image planes contained in this frame.
public MLWebRTC.VideoSink.Frame.PlaneInfo [] ImagePlanes { get; set; }
Type | Description |
---|---|
MLWebRTC.VideoSink.Frame.PlaneInfo [] | Struct representing an image plane that comes from some captured camera frame. |
NativeFrame
public NativeBufferInfo NativeFrame { get; set; }
TimeStampUs
Gets the timestamp of the frame in microseconds.
public ulong TimeStampUs { get; set; }
Public Methods
Frame Create
Creates and returns an initialized version of this struct.
public static Frame Create(
ulong id,
ulong timeStampUs,
PlaneInfo [] imagePlanes,
OutputFormat format
)
Parameters
Type | Name | Description |
---|---|---|
ulong | id | Id of the frame. |
ulong | timeStampUs | Timestamp of the frame in microseconds. |
PlaneInfo [] | imagePlanes | Array of image planes this frame contains. |
OutputFormat | format | The output format of this frame. |
Returns: An initialized version of this struct.
Frame Create
public static Frame Create(
ulong id,
ulong timeStampUs,
NativeBufferInfo nativeBufferInfo
)
Parameters
Type | Name | Description |
---|---|---|
ulong | id | |
ulong | timeStampUs | |
NativeBufferInfo | nativeBufferInfo |
override string ToString
Override to display the contents of a frame as a string.
public override string ToString()
Returns: A string representation of this struct.
Public Attributes
NativeImagePlanesLength
Defines amount of valid image planes to be found within the frame's image planes array output formats of the image planes.
public static readonly Dictionary< OutputFormat, byte > NativeImagePlanesLength = new Dictionary<OutputFormat, byte>()
{
{ OutputFormat.YUV_420_888, 3 },
{ OutputFormat.RGBA_8888, 1 },
{ OutputFormat.NativeBuffer, 0 }
};
Type | Description |
---|---|
readonly Dictionary< OutputFormat, byte > | Defines the supported output formats of the image planes. |
Public Enums
OutputFormat
Defines the supported output formats of the image planes.
Enumerator | Value | Description |
---|---|---|
YUV_420_888 | YUV_420_888 format. | |
RGBA_8888 | RGBA_8888 format. | |
NativeBuffer | Native buffer format |