• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

githubのコードからのfolk


Commit MetaInfo

Revisionf7a7eaca69b887a91039717492387862ccc22265 (tree)
Zeit2011-02-27 02:22:36
Autorsr55 <sr55@b64f...>
Commitersr55

Log Message

Remove depreciated cpu count from the api

git-svn-id: svn://localhost/HandBrake/trunk@3813 b64f7644-9d1e-0410-96f1-a4d463321fa5

Ändern Zusammenfassung

Diff

--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -40,8 +40,6 @@ struct hb_handle_s
4040 int work_error;
4141 hb_thread_t * work_thread;
4242
43- int cpu_count;
44-
4543 hb_lock_t * state_lock;
4644 hb_state_t state;
4745
@@ -331,10 +329,6 @@ hb_handle_t * hb_init( int verbose, int update_check )
331329 */
332330 hb_buffer_pool_init();
333331
334- /* CPU count detection */
335- hb_log( "hb_init: checking cpu count" );
336- h->cpu_count = hb_get_cpu_count();
337-
338332 h->list_title = hb_list_init();
339333 h->jobs = hb_list_init();
340334
@@ -435,10 +429,6 @@ hb_handle_t * hb_init_dl( int verbose, int update_check )
435429 }
436430 }
437431
438- /* CPU count detection */
439- hb_log( "hb_init: checking cpu count" );
440- h->cpu_count = hb_get_cpu_count();
441-
442432 h->list_title = hb_list_init();
443433 h->jobs = hb_list_init();
444434 h->current_job = NULL;
@@ -1496,8 +1486,7 @@ void hb_start( hb_handle_t * h )
14961486 h->paused = 0;
14971487
14981488 h->work_die = 0;
1499- h->work_thread = hb_work_init( h->jobs, h->cpu_count,
1500- &h->work_die, &h->work_error, &h->current_job );
1489+ h->work_thread = hb_work_init( h->jobs, &h->work_die, &h->work_error, &h->current_job );
15011490 }
15021491
15031492 /**
--- a/libhb/internal.h
+++ b/libhb/internal.h
@@ -170,7 +170,7 @@ hb_thread_t * hb_scan_init( hb_handle_t *, volatile int * die,
170170 const char * path, int title_index,
171171 hb_list_t * list_title, int preview_count,
172172 int store_previews, uint64_t min_duration );
173-hb_thread_t * hb_work_init( hb_list_t * jobs, int cpu_count,
173+hb_thread_t * hb_work_init( hb_list_t * jobs,
174174 volatile int * die, int * error, hb_job_t ** job );
175175 hb_thread_t * hb_reader_init( hb_job_t * );
176176 hb_work_object_t * hb_muxer_init( hb_job_t * );
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -13,14 +13,13 @@ typedef struct
1313 {
1414 hb_list_t * jobs;
1515 hb_job_t ** current_job;
16- int cpu_count;
1716 int * error;
1817 volatile int * die;
1918
2019 } hb_work_t;
2120
2221 static void work_func();
23-static void do_job( hb_job_t *, int cpu_count );
22+static void do_job( hb_job_t *);
2423 static void work_loop( void * );
2524
2625 #define FIFO_UNBOUNDED 65536
@@ -33,18 +32,15 @@ static void work_loop( void * );
3332 /**
3433 * Allocates work object and launches work thread with work_func.
3534 * @param jobs Handle to hb_list_t.
36- * @param cpu_count Humber of CPUs found in system.
3735 * @param die Handle to user inititated exit indicator.
3836 * @param error Handle to error indicator.
3937 */
40-hb_thread_t * hb_work_init( hb_list_t * jobs, int cpu_count,
41- volatile int * die, int * error, hb_job_t ** job )
38+hb_thread_t * hb_work_init( hb_list_t * jobs, volatile int * die, int * error, hb_job_t ** job )
4239 {
4340 hb_work_t * work = calloc( sizeof( hb_work_t ), 1 );
4441
4542 work->jobs = jobs;
4643 work->current_job = job;
47- work->cpu_count = cpu_count;
4844 work->die = die;
4945 work->error = error;
5046
@@ -86,7 +82,7 @@ static void work_func( void * _work )
8682 job->die = work->die;
8783 *(work->current_job) = job;
8884 InitWorkState( job->h );
89- do_job( job, work->cpu_count );
85+ do_job( job );
9086 *(work->current_job) = NULL;
9187 }
9288
@@ -423,9 +419,8 @@ static int check_ff_audio( hb_list_t *list_audio, hb_audio_t *ff_audio )
423419 * Exits loop when conversion is done and fifos are empty.
424420 * Closes threads and frees fifos.
425421 * @param job Handle work hb_job_t.
426- * @param cpu_count number of CPUs found in system.
427422 */
428-static void do_job( hb_job_t * job, int cpu_count )
423+static void do_job( hb_job_t * job )
429424 {
430425 hb_title_t * title;
431426 int i, j;