swrgetdelay
swr_get_delay is a function from FFmpeg’s libswresample library that reports the internal delay of a resampling context. In casual usage it is sometimes referred to by the shorthand name "swrgetdelay," but the canonical API name is swr_get_delay. The function helps applications understand how many input samples are effectively buffered or how far the resampler is offset in producing output samples.
The function takes a SwrContext pointer and a value representing the number of input samples (in_nb_samples)
- Call swr_get_delay after configuring and initializing the SwrContext (swr_alloc, swr_alloc_set_opts, swr_init).
- You can pass 0 for in_nb_samples to obtain the current delay without considering additional input.
- The value helps estimate how many output samples will be produced before new input will be fully
Related functions include swr_alloc, swr_init, swr_convert, and swr_free. While "swrgetdelay" may appear in some codebases as