Defines a video frame for the IVideoRenderer.RenderFrame(VideoFrame) and IVideoFrameConsumer.Consume(VideoFrame) methods. More...

Inherits IDisposable.

Public Member Functions
void Dispose ()
Disposes of the VideoFrame object's resources.
IntPtr GetPlane (int index)
Gets a pointer to a specified video plane for the frame. More...
int GetPlaneStride (int index)
Gets the stride for a specified video plane for the frame. More...
int GetPlaneSize (int index)
Gets the size of a specified video plane for the frame. More...
int GetPlaneWidth (int index)
Gets the width (in pixels) for a specified video plane for the frame. More...
int GetPlaneHeight (int index)
Gets the height (in pixels) for a specified video plane for the frame. More...
void ConvertInPlace (PixelFormat destinationFormat, IntPtr[] planes, int[] strides)
Copies the video frame to a buffer, passed in as the planes parameter. More...
Static Public Member Functions
static VideoFrame CreateYuv420pFrameFromBuffer (PixelFormat sourceFormat, int width, int height, IntPtr[] planes, int[] strides)
Creates a I420 video frame from an array of planes. More...
static VideoFrame CreateFrameFromBuffer (PixelFormat format, int width, int height, IntPtr[] planes, int[] strides)
Creates a video frame from a set of planes. More...
static VideoFrame CreateFrameFromBuffer (PixelFormat format, int width, int height, IntPtr buffer)
Creates a video frame from a buffer. More...
static VideoFrame CreateYuv420pFrameFromBitmap (Bitmap bitmap)
Creates a YUV420p video frame from a bitmap. More...
Protected Member Functions
virtual void Dispose (bool disposing)
Properties
int Width [get]
The width of the video frame, in pixels.
int Height [get]
The height of the video frame, in pixels.
PixelFormat PixelFormat [get]
The pixel format of the video frame.
bool IsMirrored [get]
Whether the video image is mirrored in the local client.
int NumberOfPlanes [get]
The number of planes in this video frame.

Detailed Description

Defines a video frame for the IVideoRenderer.RenderFrame(VideoFrame) and IVideoFrameConsumer.Consume(VideoFrame) methods.

Member Function Documentation

ConvertInPlace()

void OpenTok.VideoFrame.ConvertInPlace ( PixelFormat destinationFormat,
IntPtr[] planes,
int[] strides
)

Copies the video frame to a buffer, passed in as the planes parameter.

Parameters : | | | | --- | --- | | destinationFormat | The video format. Please note that currently this only works with PixelFormat.FormatYuv420p. | | planes | A pointer to the video data destination buffer planes. | | strides | The number of bytes in a single row of pixel data. |

CreateFrameFromBuffer() [1/2]

--- --- --- --- static VideoFrame OpenTok.VideoFrame.CreateFrameFromBuffer ( PixelFormat format, int width,

Creates a video frame from a buffer.

Parameters : | | | | --- | --- | | format | The format of the source frames. | | width | The width, in pixels. | | height | The height, in pixels. | | buffer | A pointer to the source buffer. |

CreateFrameFromBuffer() [2/2]

--- --- --- --- static VideoFrame OpenTok.VideoFrame.CreateFrameFromBuffer ( PixelFormat format, int width, int height,

Creates a video frame from a set of planes.

Parameters : | | | | --- | --- | | format | The format of the source frames. | | width | The width, in pixels. | | height | The height, in pixels. | | planes | An array containing the source planes. | | strides | An array containing the source strides. |

CreateYuv420pFrameFromBitmap()

Creates a YUV420p video frame from a bitmap.

Parameters : | | | | --- | --- | | bitmap | The source bitmap for the frame. |

CreateYuv420pFrameFromBuffer()

--- --- --- --- static VideoFrame OpenTok.VideoFrame.CreateYuv420pFrameFromBuffer ( PixelFormat sourceFormat, int width, int height,

Creates a I420 video frame from an array of planes.

Parameters : | | | | --- | --- | | sourceFormat | The format of the source frames. | | width | The width, in pixels. | | height | The height, in pixels. | | planes | An array containing the source planes. | | strides | An array containing the source strides. |

GetPlane()

IntPtr OpenTok.VideoFrame.GetPlane ( int index )

Gets a pointer to a specified video plane for the frame.

Parameters : | | | | --- | --- | | index | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |

GetPlaneHeight()

int OpenTok.VideoFrame.GetPlaneHeight ( int index )

Gets the height (in pixels) for a specified video plane for the frame.

Parameters : | | | | --- | --- | | index | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |

GetPlaneSize()

int OpenTok.VideoFrame.GetPlaneSize ( int index )

Gets the size of a specified video plane for the frame.

Parameters : | | | | --- | --- | | index | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |

GetPlaneStride()

int OpenTok.VideoFrame.GetPlaneStride ( int index )

Gets the stride for a specified video plane for the frame.

Parameters : | | | | --- | --- | | index | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |

GetPlaneWidth()

int OpenTok.VideoFrame.GetPlaneWidth ( int index )

Gets the width (in pixels) for a specified video plane for the frame.

Parameters : | | | | --- | --- | | index | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |