summaryrefslogtreecommitdiffstats
path: root/test/test.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-03-18 18:02:49 +0000
committerRodeo <[email protected]>2013-03-18 18:02:49 +0000
commitb0aa37a7ff20acafe7a28fe67c69699515d963c5 (patch)
treec416c049549b349568d93695ef0ae7f796556fc7 /test/test.c
parentbb5cba9dfe71aa0e10c924809b31b2f92a8239d9 (diff)
CLI: implement hb_system_sleep support.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5339 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/test/test.c b/test/test.c
index c22cb5eb6..fedff6c3d 100644
--- a/test/test.c
+++ b/test/test.c
@@ -254,7 +254,9 @@ int main( int argc, char ** argv )
titleindex = 0;
}
- hb_scan( h, input, titleindex, preview_count, store_previews, min_title_duration * 90000LL );
+ hb_prevent_sleep(h);
+ hb_scan(h, input, titleindex, preview_count, store_previews,
+ min_title_duration * 90000LL);
/* Wait... */
while( !die )
@@ -269,11 +271,14 @@ int main( int argc, char ** argv )
die = 1;
break;
case 'p':
- fprintf( stdout, "\nEncoding Paused by user command, 'r' to resume\n" );
- hb_pause( h );
+ fprintf(stdout,
+ "\nEncoding Paused by user command, 'r' to resume\n");
+ hb_pause(h);
+ hb_allow_sleep(h);
break;
case 'r':
- hb_resume( h );
+ hb_prevent_sleep(h);
+ hb_resume(h);
break;
case 'h':
ShowCommands();
@@ -317,11 +322,14 @@ int main( int argc, char ** argv )
die = 1;
break;
case 'p':
- fprintf( stdout, "\nEncoding Paused by user command, 'r' to resume\n" );
- hb_pause( h );
+ fprintf(stdout,
+ "\nEncoding Paused by user command, 'r' to resume\n");
+ hb_pause(h);
+ hb_allow_sleep(h);
break;
case 'r':
- hb_resume( h );
+ hb_prevent_sleep(h);
+ hb_resume(h);
break;
case 'h':
ShowCommands();