Typedefs | |
typedef AVS_VideoFrame_ | AVS_VideoFrame |
opaque declaration of a videoinfo | |
Functions | |
AVS_C_API void | avs_videoframe_delete (AVS_VideoFrame *p_vf) |
Delete an AVS_VideoFrame. | |
AVS_C_API int | avs_videoframe_width_get (const AVS_VideoFrame *p_vf) |
Retrieve the width of a frame. | |
AVS_C_API int | avs_videoframe_height_get (const AVS_VideoFrame *p_vf) |
Retrieve the height of a frame. | |
AVS_C_API const unsigned char * | avs_videoframe_plane_get (const AVS_VideoFrame *p_vf, char plane) |
Retrieve the plane of a frame. | |
AVS_C_API void | avs_videoframe_plane_blit (const AVS_VideoFrame *p_vf, char plane, unsigned char *ptr, int pitch) |
Blit the plane of a frame on some data. |
You can get the size of the frame with the functions avs_videoframe_width_get() and avs_videoframe_height_get().
You can retrieve the data of a frame with the function avs_videoframe_plane_get(). This function takes a char as parameter, which corresponds to the plane that you want to get. If the colorspace is interleaved (RGB24, RGB32 or YUY2), then use the character '~'. If the colorspace is planar (YV12 or YV24), use 'Y', 'U' or 'V' to access respectively to the Y, U and V planes.
If you want to blit the frame on your own data, use avs_videoframe_plane_blit().
Once you have finished with an AVS_VideoFrame, you delete it with avs_videoframe_delete().
AVS_C_API void avs_videoframe_delete | ( | AVS_VideoFrame * | p_vf | ) |
p_vf | The frame to delete. |
p_vf
.
AVS_C_API int avs_videoframe_height_get | ( | const AVS_VideoFrame * | p_vf | ) |
p_vf | The videoframe. |
p_vf
. If p_vf
is NULL
, this function returns 0
.
AVS_C_API void avs_videoframe_plane_blit | ( | const AVS_VideoFrame * | p_vf, | |
char | plane, | |||
unsigned char * | ptr, | |||
int | pitch | |||
) |
p_vf | The videoframe. | |
plane | The plane to blit. | |
ptr | the pointer on which we want to blit. | |
pitch | The pitch to use. |
plane
of the frame p_vf
on the data specified by ptr
. The pitch is set by pitch
. If p_vf
is NULL
, this function does nothing.
AVS_C_API const unsigned char* avs_videoframe_plane_get | ( | const AVS_VideoFrame * | p_vf, | |
char | plane | |||
) |
p_vf | The videoframe. | |
plane | The plane. |
p_vf
given by plane
. For an interleaved colorspace, use '~'. For a planar colorspace, use 'Y', 'U' or 'V' for respctively the planes Y, U and V. If p_vf
is NULL
, this function returns NULL
, otherwise, it returns a pointer on the data of the plane.
AVS_C_API int avs_videoframe_width_get | ( | const AVS_VideoFrame * | p_vf | ) |
p_vf | The videoframe. |
p_vf
. If p_vf
is NULL
, this function returns 0
.