* Resumes the conversion process. * @param h Handle to hb_handle_t. */
| 2040 | * @param h Handle to hb_handle_t. |
| 2041 | */ |
| 2042 | void hb_resume( hb_handle_t * h ) |
| 2043 | { |
| 2044 | if( h->paused ) |
| 2045 | { |
| 2046 | if (h->pause_date != -1) |
| 2047 | { |
| 2048 | // Calculate paused time for current job sequence |
| 2049 | h->pause_duration += hb_get_date() - h->pause_date; |
| 2050 | |
| 2051 | // Calculate paused time for current job pass |
| 2052 | // Required to calculate accurate ETA for pass |
| 2053 | h->current_job->st_paused += hb_get_date() - h->pause_date; |
| 2054 | h->pause_date = -1; |
| 2055 | h->state.param.working.paused = h->pause_duration; |
| 2056 | } |
| 2057 | |
| 2058 | hb_unlock( h->pause_lock ); |
| 2059 | h->paused = 0; |
| 2060 | } |
| 2061 | } |
| 2062 | |
| 2063 | /** |
| 2064 | * Stops the conversion process. |