]> granicus.if.org Git - handbrake/commitdiff
hb_system_sleep: minor cleanup after last commit.
authorRodeo <tdskywalker@gmail.com>
Mon, 18 Mar 2013 18:00:50 +0000 (18:00 +0000)
committerRodeo <tdskywalker@gmail.com>
Mon, 18 Mar 2013 18:00:50 +0000 (18:00 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5337 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.h
libhb/hb.c
libhb/hb.h
libhb/work.c

index c73ac871f7bf676841bc1273269cbd43bded5a29..bfd4b9b00a9443ecd865706e42171304f4c4a99d 100644 (file)
@@ -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
index 5c0c66b2bd017a49aa40cbc6628aac89b9c4fa23..56df9a9be13d51170c8e67d310a80a0c88e4958e 100644 (file)
@@ -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 )
         {
index e23a0dfd4b428185b80500b3e9d19faab53f8130..07100c9464350caa69916c42cf9ac1365f4a4528 100644 (file)
@@ -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
 {
index 6dd1114018ed382bd5e6394c823e6224918d434a..689e474caa7241ea9188af042b8f568a6a0e2b31 100644 (file)
 
 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 );
 }