Mercurial > mplayer.hg
diff libaf/af.c @ 7665:fbd5445cc853
Adding function for calculating the delay caused by the filters
author | anders |
---|---|
date | Tue, 08 Oct 2002 10:20:36 +0000 |
parents | 90e16aa8ae5f |
children | 1d3a3dc1f488 |
line wrap: on
line diff
--- a/libaf/af.c Tue Oct 08 05:46:23 2002 +0000 +++ b/libaf/af.c Tue Oct 08 10:20:36 2002 +0000 @@ -487,6 +487,19 @@ return in; } +/* Calculate the total delay [ms] caused by the filters */ +double af_calc_delay(af_stream_t* s) +{ + af_instance_t* af=s->first; + register double delay = 0.0; + // Iterate through all filters + while(af){ + delay += af->delay; + af=af->next; + } + return delay; +} + /* Helper function called by the macro with the same name this function should not be called directly */ inline int af_resize_local_buffer(af_instance_t* af, af_data_t* data)