[][src]Function x264_dev::sys::x264_encoder_invalidate_reference

pub unsafe fn x264_encoder_invalidate_reference(
    arg1: *mut X264T,
    pts: i64
) -> c_int

An interactive error resilience tool, designed for use in a low-latency one-encoder-few-clients system.

When the client has packet loss or otherwise incorrectly decodes a frame, the encoder can be told with this command to "forget" the frame and all frames that depend on it, referencing only frames that occurred before the loss. This will force a keyframe if no frames are left to reference after the aforementioned "forgetting".

It is strongly recommended to use a large i_dpb_size in this case, which allows the encoder to keep around extra, older frames to fall back on in case more recent frames are all invalidated. Unlike increasing i_frame_reference, this does not increase the number of frames used for motion estimation and thus has no speed impact. It is also recommended to set a very large keyframe interval, so that keyframes are not used except as necessary for error recovery.

x264_encoder_invalidate_reference is not currently compatible with the use of B-frames or intra refresh.

In multi-pass encoding, if x264_encoder_invalidate_reference is called differently in each pass, behavior is undefined.

Should not be called during an x264_encoder_encode, but multiple calls can be made simultaneously.

Returns 0 on success, negative on failure. */