Function av_video_hint_alloc

pub unsafe extern "C" fn av_video_hint_alloc(
    nb_rects: usize,
    out_size: *mut usize,
) -> *mut AVVideoHint
Expand description

Allocate memory for the AVVideoHint struct along with an nb_rects-sized arrays of AVVideoRect.

The side data contains a list of rectangles for the portions of the frame which changed from the last encoded one (and the remainder are assumed to be changed), or, alternately (depending on the type parameter) the unchanged ones (and the remanining ones are those which changed). Macroblocks will thus be hinted either to be P_SKIP-ped or go through the regular encoding procedure.

It’s responsibility of the caller to fill the AVRects accordingly, and to set the proper AVVideoHintType field.

@param out_size if non-NULL, the size in bytes of the resulting data array is written here

@return newly allocated AVVideoHint struct (must be freed by the caller using av_free()) on success, NULL on memory allocation failure