From 18189c197f5d5e04e8e8cd37de0caedb1a469a38 Mon Sep 17 00:00:00 2001 From: johnallen Date: Mon, 8 Jan 2007 03:18:40 +0000 Subject: added worker thread sleep throttling. each of the work object threads now self adjust their sleep interval based on the "fullness" of their fifo. 80% is the choose threshold. Work objects with a fifo fullness of greater than 80% increase their sleep interval. This allows other work object with less than 80% fullness more CPU usage. Also adjusted thread_func, reader, and muxer sleep intervals to more reasonable values. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@98 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libhb/internal.h') diff --git a/libhb/internal.h b/libhb/internal.h index e13008f9b..36ead1bf0 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -57,6 +57,7 @@ void hb_buffer_close( hb_buffer_t ** ); hb_fifo_t * hb_fifo_init(); int hb_fifo_size( hb_fifo_t * ); int hb_fifo_is_full( hb_fifo_t * ); +float hb_fifo_percent_full( hb_fifo_t * f ); hb_buffer_t * hb_fifo_get( hb_fifo_t * ); hb_buffer_t * hb_fifo_see( hb_fifo_t * ); hb_buffer_t * hb_fifo_see2( hb_fifo_t * ); -- cgit v1.2.3