[x265] [PATCH] cli: prevent Windows from falling into standby

Steve Borho steve at borho.org
Mon Mar 30 17:50:04 CEST 2015


On 03/30, Xinyue Lu wrote:
> It will set the execution state flags on start and clear the flags on exit.
> 
> # HG changeset patch
> # User Xinyue Lu <i at 7086.in>
> # Date 1427715767 25200
> #      Mon Mar 30 04:42:47 2015 -0700
> # Branch Yuuki
> # Node ID 3581791c9128bb47bab1b98e04cdc0061896fc03
> # Parent  7c31ea0490e2700a3d32a618a3e6d5e81807eb3f
> cli: prevent Windows from falling into standby

queued

> diff -r 7c31ea0490e2 -r 3581791c9128 source/x265.cpp
> --- a/source/x265.cpp Mon Mar 30 04:12:50 2015 -0700
> +++ b/source/x265.cpp Mon Mar 30 04:42:47 2015 -0700
> @@ -54,6 +54,7 @@
>  #else
>  #define GetConsoleTitle(t, n)
>  #define SetConsoleTitle(t)
> +#define SetThreadExecutionState(es)
>  #endif
> 
>  using namespace x265;
> @@ -467,6 +468,7 @@
>      THREAD_NAME("API", 0);
> 
>      GetConsoleTitle(orgConsoleTitle, CONSOLE_TITLE_SIZE);
> +    SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED |
> ES_AWAYMODE_REQUIRED);

your MTA is line-wrapping patches. It is better to use the Mercurial
patchbomb extension (or thg email tool) to send patches; it prevents
white-space mangling.

The short-comments at the top of the email belong in the commit message
itself.

>      x265_param *param = x265_param_alloc();
>      CLIOptions cliopt;
> @@ -640,6 +642,7 @@
>      X265_FREE(errorBuf);
> 
>      SetConsoleTitle(orgConsoleTitle);
> +    SetThreadExecutionState(ES_CONTINUOUS);
> 
>  #if HAVE_VLD
>      assert(VLDReportLeaks() == 0);
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-- 
Steve Borho


More information about the x265-devel mailing list