diff options
author | sr55 <[email protected]> | 2011-02-26 17:22:36 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-02-26 17:22:36 +0000 |
commit | 0761f1109607f4500722c979bf3d0b021742e862 (patch) | |
tree | 24567f7334c3f507e19a735e0cd63ec9a8e7ba24 /libhb | |
parent | 48aebee9e159dd5b8e4e91af0f221d8b00ddbe8f (diff) |
Remove depreciated cpu count from the api
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3813 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/hb.c | 13 | ||||
-rw-r--r-- | libhb/internal.h | 2 | ||||
-rw-r--r-- | libhb/work.c | 13 |
3 files changed, 6 insertions, 22 deletions
diff --git a/libhb/hb.c b/libhb/hb.c index 60b0bcc33..46720c138 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -40,8 +40,6 @@ struct hb_handle_s int work_error; hb_thread_t * work_thread; - int cpu_count; - hb_lock_t * state_lock; hb_state_t state; @@ -331,10 +329,6 @@ hb_handle_t * hb_init( int verbose, int update_check ) */ hb_buffer_pool_init(); - /* CPU count detection */ - hb_log( "hb_init: checking cpu count" ); - h->cpu_count = hb_get_cpu_count(); - h->list_title = hb_list_init(); h->jobs = hb_list_init(); @@ -435,10 +429,6 @@ hb_handle_t * hb_init_dl( int verbose, int update_check ) } } - /* CPU count detection */ - hb_log( "hb_init: checking cpu count" ); - h->cpu_count = hb_get_cpu_count(); - h->list_title = hb_list_init(); h->jobs = hb_list_init(); h->current_job = NULL; @@ -1496,8 +1486,7 @@ void hb_start( hb_handle_t * h ) h->paused = 0; h->work_die = 0; - h->work_thread = hb_work_init( h->jobs, h->cpu_count, - &h->work_die, &h->work_error, &h->current_job ); + h->work_thread = hb_work_init( h->jobs, &h->work_die, &h->work_error, &h->current_job ); } /** diff --git a/libhb/internal.h b/libhb/internal.h index 7896bee16..d025f50b4 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -170,7 +170,7 @@ hb_thread_t * hb_scan_init( hb_handle_t *, volatile int * die, const char * path, int title_index, hb_list_t * list_title, int preview_count, int store_previews, uint64_t min_duration ); -hb_thread_t * hb_work_init( hb_list_t * jobs, int cpu_count, +hb_thread_t * hb_work_init( hb_list_t * jobs, volatile int * die, int * error, hb_job_t ** job ); hb_thread_t * hb_reader_init( hb_job_t * ); hb_work_object_t * hb_muxer_init( hb_job_t * ); diff --git a/libhb/work.c b/libhb/work.c index e3d094542..d05a22aa7 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -13,14 +13,13 @@ typedef struct { hb_list_t * jobs; hb_job_t ** current_job; - int cpu_count; int * error; volatile int * die; } hb_work_t; static void work_func(); -static void do_job( hb_job_t *, int cpu_count ); +static void do_job( hb_job_t *); static void work_loop( void * ); #define FIFO_UNBOUNDED 65536 @@ -33,18 +32,15 @@ static void work_loop( void * ); /** * Allocates work object and launches work thread with work_func. * @param jobs Handle to hb_list_t. - * @param cpu_count Humber of CPUs found in system. * @param die Handle to user inititated exit indicator. * @param error Handle to error indicator. */ -hb_thread_t * hb_work_init( hb_list_t * jobs, int cpu_count, - volatile int * die, int * error, hb_job_t ** job ) +hb_thread_t * hb_work_init( hb_list_t * jobs, volatile int * die, int * error, hb_job_t ** job ) { hb_work_t * work = calloc( sizeof( hb_work_t ), 1 ); work->jobs = jobs; work->current_job = job; - work->cpu_count = cpu_count; work->die = die; work->error = error; @@ -86,7 +82,7 @@ static void work_func( void * _work ) job->die = work->die; *(work->current_job) = job; InitWorkState( job->h ); - do_job( job, work->cpu_count ); + do_job( job ); *(work->current_job) = NULL; } @@ -423,9 +419,8 @@ static int check_ff_audio( hb_list_t *list_audio, hb_audio_t *ff_audio ) * Exits loop when conversion is done and fifos are empty. * Closes threads and frees fifos. * @param job Handle work hb_job_t. - * @param cpu_count number of CPUs found in system. */ -static void do_job( hb_job_t * job, int cpu_count ) +static void do_job( hb_job_t * job ) { hb_title_t * title; int i, j; |