OpenTok.VideoFrame
Copy
public class VideoFrame : IDisposable
Defines a video frame for the IVideoRenderer.RenderFrame(VideoFrame) and IVideoFrameConsumer.Consume(VideoFrame) methods.
Properties
Methods
| Name | Description |
|---|---|
ConvertInPlace(destinationFormat, planes, strides) |
|
(static) CreateFrameFromBuffer(format, width, height, planes, strides) → {VideoFrame} |
|
(static) CreateFrameFromBuffer(format, width, height, buffer) → {VideoFrame} |
|
(static) CreateYuv420pFrameFromBitmap(bitmap) → {VideoFrame} |
|
(static) CreateYuv420pFrameFromBuffer(sourceFormat, width, height, planes, strides) → {VideoFrame} |
|
Dispose(disposing) |
|
Dispose() |
Disposes of the VideoFrame object's resources. |
GetPlane(index) → {IntPtr} |
|
GetPlaneHeight(index) → {int} |
|
GetPlaneSize(index) → {int} |
|
GetPlaneStride(index) → {int} |
|
GetPlaneWidth(index) → {int} |
ConvertInPlace(destinationFormat, planes, strides)
Parameters:
| Name | Type | Description |
|---|---|---|
destinationFormat |
PixelFormat | The video format. Please note that currently this only works with PixelFormat.FormatYuv420p. |
planes |
IntPtr[] | A pointer to the video data destination buffer planes. |
strides |
int[] | The number of bytes in a single row of pixel data. |
(static) CreateFrameFromBuffer(format, width, height, planes, strides) → {VideoFrame}
Parameters:
| Name | Type | Description |
|---|---|---|
format |
PixelFormat | The format of the source frames. |
width |
int | The width, in pixels. |
height |
int | The height, in pixels. |
planes |
IntPtr[] | An array containing the source planes. |
strides |
int[] | An array containing the source strides. |
Returns:
VideoFrame
(static) CreateFrameFromBuffer(format, width, height, buffer) → {VideoFrame}
Parameters:
| Name | Type | Description |
|---|---|---|
format |
PixelFormat | The format of the source frames. |
width |
int | The width, in pixels. |
height |
int | The height, in pixels. |
buffer |
IntPtr | A pointer to the source buffer. |
Returns:
VideoFrame
(static) CreateYuv420pFrameFromBitmap(bitmap) → {VideoFrame}
Parameters:
| Name | Type | Description |
|---|---|---|
bitmap |
Bitmap | The source bitmap for the frame. |
Returns:
VideoFrame
(static) CreateYuv420pFrameFromBuffer(sourceFormat, width, height, planes, strides) → {VideoFrame}
Parameters:
| Name | Type | Description |
|---|---|---|
sourceFormat |
PixelFormat | The format of the source frames. |
width |
int | The width, in pixels. |
height |
int | The height, in pixels. |
planes |
IntPtr[] | An array containing the source planes. |
strides |
int[] | An array containing the source strides. |
Returns:
VideoFrame
Dispose(disposing)
Parameters:
| Name | Type | Description |
|---|---|---|
disposing |
bool |
Dispose()
Disposes of the VideoFrame object's resources.
GetPlane(index) → {IntPtr}
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |
Returns:
IntPtr
GetPlaneHeight(index) → {int}
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |
Returns:
int
GetPlaneSize(index) → {int}
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |
Returns:
int
GetPlaneStride(index) → {int}
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |
Returns:
int
GetPlaneWidth(index) → {int}
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | The index of the frame. The NumberOfPlanes property of the VideoFrame object is the number of planes available. |
Returns:
int