X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Ffifo.c;h=3aeeea2734cbcc7598de8464710d2d3afca3e4ff;hb=55b0015a8c50106e553bc2f48336cc2a1c495459;hp=c72b4e10b4e78e0446a20edde55fc98ef871891e;hpb=0099d9ab8e9bd55d6302e20c291ccf55b1604f5c;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/fifo.c b/libhb/fifo.c index c72b4e10..3aeeea27 100644 --- a/libhb/fifo.c +++ b/libhb/fifo.c @@ -235,6 +235,23 @@ hb_fifo_t * hb_fifo_init( int capacity, int thresh ) return f; } +int hb_fifo_size_bytes( hb_fifo_t * f ) +{ + int ret = 0; + hb_buffer_t * link; + + hb_lock( f->lock ); + link = f->first; + while ( link ) + { + ret += link->size; + link = link->next; + } + hb_unlock( f->lock ); + + return ret; +} + int hb_fifo_size( hb_fifo_t * f ) { int ret;