diff options
author | Rodeo <[email protected]> | 2013-03-18 18:00:50 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-03-18 18:00:50 +0000 |
commit | fd2a327a0d531e7ca654efa6c387acd6a18d0b8b (patch) | |
tree | cd163326f1a6345db7df2cb01cbd6063f5470c1c | |
parent | b15a531495fdd01eee3135055d2f52d25daf1967 (diff) |
hb_system_sleep: minor cleanup after last commit.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5337 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/common.h | 3 | ||||
-rw-r--r-- | libhb/hb.c | 4 | ||||
-rw-r--r-- | libhb/hb.h | 3 | ||||
-rw-r--r-- | libhb/work.c | 13 |
4 files changed, 9 insertions, 14 deletions
diff --git a/libhb/common.h b/libhb/common.h index c73ac871f..bfd4b9b00 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -1067,7 +1067,4 @@ const char * const * hb_h264_levels(); // x264 option name/synonym helper const char * hb_x264_encopt_name( const char * name ); -void hb_prevent_sleep( hb_handle_t * ); -void hb_allow_sleep( hb_handle_t * ); - #endif diff --git a/libhb/hb.c b/libhb/hb.c index 5c0c66b2b..56df9a9be 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -1570,8 +1570,6 @@ void hb_pause( hb_handle_t * h ) hb_lock( h->state_lock ); h->state.state = HB_STATE_PAUSED; hb_unlock( h->state_lock ); - - hb_allow_sleep( h ); } } @@ -1583,8 +1581,6 @@ void hb_resume( hb_handle_t * h ) { if( h->paused ) { - hb_prevent_sleep( h ); - #define job hb_current_job( h ) if( job->st_pause_date != -1 ) { diff --git a/libhb/hb.h b/libhb/hb.h index e23a0dfd4..07100c946 100644 --- a/libhb/hb.h +++ b/libhb/hb.h @@ -95,6 +95,9 @@ void hb_pause( hb_handle_t * ); void hb_resume( hb_handle_t * ); void hb_stop( hb_handle_t * ); +void hb_prevent_sleep( hb_handle_t * ); +void hb_allow_sleep( hb_handle_t * ); + /* Persistent data between jobs. */ typedef struct hb_interjob_s { diff --git a/libhb/work.c b/libhb/work.c index 6dd111401..689e474ca 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -13,10 +13,9 @@ typedef struct { - hb_handle_t * handle; - hb_list_t * jobs; - hb_job_t ** current_job; - int * error; + hb_list_t * jobs; + hb_job_t ** current_job; + int * error; volatile int * die; } hb_work_t; @@ -45,10 +44,10 @@ hb_thread_t * hb_work_init( hb_list_t * jobs, volatile int * die, int * error, h { hb_work_t * work = calloc( sizeof( hb_work_t ), 1 ); - work->jobs = jobs; + work->jobs = jobs; work->current_job = job; - work->die = die; - work->error = error; + work->die = die; + work->error = error; return hb_thread_init( "work", work_func, work, HB_LOW_PRIORITY ); } |