VideoReceiveFrameCallback


Description:

public delegate void VideoReceiveFrameCallback (ToxAV av, uint32 friend_number, uint16 width, uint16 height, uint8[] y, uint8[] u, uint8[] v, int32 ystride, int32 ustride, int32 vstride)

The function type for the video_receive_frame callback.

The size of plane data is derived from width and height as documented below.

Strides represent padding for each plane that may or may not be present. You must handle strides in your image processing code. Strides are negative if the image is bottom-up hence why you MUST abs() it when calculating plane buffer size.

Parameters:

friend_number

The friend number of the friend who sent a video frame.

width

Width of the frame in pixels.

height

Height of the frame in pixels.

y

Luminosity plane. Size = MAX(width, abs(ystride)) * height.

u

U chroma plane. Size = MAX(width/2, abs(ustride)) * (height/2).

v

V chroma plane. Size = MAX(width/2, abs(vstride)) * (height/2).

ystride

Luminosity plane stride.

ustride

U chroma plane stride.

vstride

V chroma plane stride.


Namespace: ToxAV
Package: toxcore