MixedReality-WebRTC MixedReality-WebRTC
Search Results for

    Show / Hide Table of Contents

    Struct I420AVideoFrame

    Single video frame encoded in I420A format (triplanar YUV with optional alpha plane). See e.g. https://wiki.videolan.org/YUV/#I420 for details.

    The I420 format uses chroma downsampling in both directions, resulting in 12 bits per pixel. With the optional alpha plane, the size increases to 20 bits per pixel.

    Namespace: Microsoft.MixedReality.WebRTC
    Assembly: Microsoft.MixedReality.WebRTC.dll
    Syntax
    public ref struct I420AVideoFrame
    Remarks

    The use of ref struct is an optimization to avoid heap allocation on each frame while having a nicer-to-use container to pass a frame accross methods.

    The alpha plane is generically supported in this data structure, but actual support in the video tracks depend on the underlying implementation and the video codec used, and is generally not available.

    Fields

    | Improve this Doc View Source

    dataA

    Optional pointer to the alpha plane buffer, if any, or null if the frame has no alpha plane.

    Declaration
    public IntPtr dataA
    Field Value
    Type Description
    IntPtr
    | Improve this Doc View Source

    dataU

    Pointer to the U plane buffer.

    Declaration
    public IntPtr dataU
    Field Value
    Type Description
    IntPtr
    | Improve this Doc View Source

    dataV

    Pointer to the V plane buffer.

    Declaration
    public IntPtr dataV
    Field Value
    Type Description
    IntPtr
    | Improve this Doc View Source

    dataY

    Pointer to the Y plane buffer.

    Declaration
    public IntPtr dataY
    Field Value
    Type Description
    IntPtr
    | Improve this Doc View Source

    height

    Frame height, in pixels.

    Declaration
    public uint height
    Field Value
    Type Description
    UInt32
    | Improve this Doc View Source

    strideA

    Stride in bytes between rows of the A plane, if present.

    Declaration
    public int strideA
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    strideU

    Stride in bytes between rows of the U plane.

    Declaration
    public int strideU
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    strideV

    Stride in bytes between rows of the V plane.

    Declaration
    public int strideV
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    strideY

    Stride in bytes between rows of the Y plane.

    Declaration
    public int strideY
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    width

    Frame width, in pixels.

    Declaration
    public uint width
    Field Value
    Type Description
    UInt32

    Methods

    | Improve this Doc View Source

    CopyTo(Byte[])

    Copy the frame content to a Byte[] buffer as a contiguous block of memory containing the Y, U, and V planes one after another, and the alpha plane at the end if present.

    Declaration
    public void CopyTo(byte[] buffer)
    Parameters
    Type Name Description
    Byte[] buffer

    The destination buffer to copy the frame to.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX