pub unsafe extern "C" fn swr_get_delay(
    s: *mut SwrContext,
    base: i64
) -> i64
Expand description

Gets the delay the next input sample will experience relative to the next output sample.

Swresample can buffer data if more input has been provided than available output space, also converting between sample rates needs a delay. This function returns the sum of all such delays. The exact delay is not necessarily an integer value in either input or output sample rate. Especially when downsampling by a large value, the output sample rate may be a poor choice to represent the delay, similarly for upsampling and the input sample rate.

@param s swr context @param base timebase in which the returned delay will be: @li if it’s set to 1 the returned delay is in seconds @li if it’s set to 1000 the returned delay is in milliseconds @li if it’s set to the input sample rate then the returned delay is in input samples @li if it’s set to the output sample rate then the returned delay is in output samples @li if it’s the least common multiple of in_sample_rate and out_sample_rate then an exact rounding-free delay will be returned @returns the delay in 1 / @c base units.