Web lists-archives.com

[MPlayer-dev-eng] [PATCH] Enable energy saving option and screensaver mode when the video is paused.




Hi,

Currently, by default, energy saving and the screensaver is disabled
when mplayer starts and is re-enabled on exit.

This re-enables them when the video is paused. Fixes bug #2112

This is my first patch submission, so any feedback is appreciated.


Regards,
sisco311.

diff -aur mplayer.c mplayer.c.new
--- mplayer.c	2014-11-25 17:03:13.862563063 +0200
+++ mplayer.c.new	2014-11-25 19:19:50.081873126 +0200
@@ -2554,8 +2554,10 @@
         gui(GUI_SET_STATE, (void *)GUI_PAUSE);
 #endif
     if (mpctx->video_out && mpctx->sh_video && vo_config_count)
+    {
         mpctx->video_out->control(VOCTRL_PAUSE, NULL);
-
+        saver_on(mDisplay);
+    }
     if (mpctx->audio_out && mpctx->sh_audio)
         mpctx->audio_out->pause();  // pause audio, keep data if possible
 
@@ -2610,7 +2612,10 @@
             mpctx->audio_out->resume();  // resume audio
     }
     if (mpctx->video_out && mpctx->sh_video && vo_config_count)
+    {
         mpctx->video_out->control(VOCTRL_RESUME, NULL);  // resume video
+        saver_off(mDisplay);
+    }
     (void)GetRelativeTime(); // ignore time that passed during pause
 #ifdef CONFIG_GUI
     if (use_gui) {

_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng