diff options
author | Rodeo <[email protected]> | 2013-03-18 17:59:24 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-03-18 17:59:24 +0000 |
commit | b15a531495fdd01eee3135055d2f52d25daf1967 (patch) | |
tree | 28bd90d22c91969d12f1df35a561e6326771db98 /macosx/Controller.m | |
parent | 17d69968280460c2c16d2e26e0a5232bde2b2adb (diff) |
hb_system_sleep: allow/prevent sleep from the UI rather than libhb.
The code that sets/unsets the "power assertions" is still in libhb.
Patch by Jérôme Lacube. Thanks!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5336 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r-- | macosx/Controller.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 79ef5da5e..76a30aa51 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -2815,6 +2815,7 @@ fWorkingCount = 0; else { [self writeToActivityLog: "incrementQueueItemDone there are no more pending encodes"]; + hb_allow_sleep( fQueueEncodeLibhb ); /*Since there are no more items to encode, go to queueCompletedAlerts for user specified alerts after queue completed*/ [self queueCompletedAlerts]; } @@ -2863,6 +2864,8 @@ fWorkingCount = 0; /* This assumes that we have re-scanned and loaded up a new queue item to send to libhb as fQueueEncodeLibhb */ - (void) processNewQueueEncode { + hb_prevent_sleep( fQueueEncodeLibhb ); + hb_list_t * list = hb_get_titles( fQueueEncodeLibhb ); hb_title_t * title = (hb_title_t *) hb_list_item( list,0 ); // is always zero since now its a single title scan hb_job_t * job = title->job; |