NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 20 21 22 23 24 … 93 Next »
Standby/hibernate

 
  • 0 Vote(s) - 0 Average
Standby/hibernate
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#1
2010-05-01, 07:12 PM
Is there anything special that a plugin has to do to prevent a PC from going into a powersaving mode?
http://forums.gbpvr.com//showthread.php?...post374502 I could understand on the PC because I am not using DirectShow, but to the NMT I use VLC to create a temp file that GBPVR plays like any audio file.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2010-05-01, 07:25 PM
To prevent standby during recording, I regularly call this Windows API:

SetThreadExecutionState(ES_SYSTEM_REQUIRED);
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#3
2010-05-01, 08:19 PM
Thanks, I will see if this helps.

Martin
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#4
2010-05-01, 10:48 PM (This post was last modified: 2010-05-01, 11:05 PM by pBS.)
if you add a 'ES_continuous' it'll stay that way till you issue a ES_CONTINUOUS without any xxx_REQUIRED..
a complete explanation:
ES_DISPLAY_REQUIRED = 0x00000002; use this to zero the display's idle timer
ES_SYSTEM_REQUIRED = 0x00000001; use this to zero the system's idle timer
ES_CONTINUOUS = 0x80000000; add this to the other flag(s) to keep the display or system on until another call to SetThreadExecutionState with $ES_CONTINUOUS without the other flag(s)

so calling it with 0x80000001 [ES_SYSTEM_REQUIRED + ES_CONTINUOUS] will keep it on till calling app exits, or a 0x80000000 is called...
just calling it once just resets timers once...[you could also just call it at an interval less than sleep timer interval]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#5
2010-05-01, 11:21 PM
I preferred calling it myself every minute or so when needed, rather than risk scenarios where it might not be unset, and have people complain their PC wasnt going to sleep.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#6
2010-05-01, 11:52 PM
I probably will use pBS's method. I don't have control of needsRendering() when the screen saver comes up and I didn't want to add a timer.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#7
2010-05-02, 03:47 AM
I decided I wouldn't implement this, I think it should be a function of the web server to keep the PC alive when it's streaming. I also confused the problem with WebRadio, this is just Music playback to the NMT/MVP and it probably is not a common problem or we'd have heard about it more often.

Martin
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2010-05-03, 12:33 PM (This post was last modified: 2010-05-03, 12:55 PM by pBS.)
well, i thought it may be possible to make pvrx2 be the last thing to startup when coming back from suspend using this..but it doesn't seem to affect order as it just all comes back at once..

http://msdn.microsoft.com/en-us/library/...85%29.aspx
even tho it's for shutdown order, i believe it also dictates startup order coming back from suspend..[tho it may be backwards]
either shutdown order = resume order or vice versa...

just thought it may help solve the d3d renderer problems coming back from suspend..
then again, a simple delay of rendering after resume event received would do the trick too..Smile
i use it to make my app intercept power events before any other apps are closed when suspends start..works great..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Prevent hibernate? bgowland 5 2,248 2006-10-26, 09:18 PM
Last Post: Mister Slimm

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode