Linux System call on playing video
#1
A little background:

I'm running Raspbmc on my Pi. Due to the low power requirements, I'm leaving it on permanently. All my media is on a fileserver that is off/suspended when not in use.

Is it possible to perform a system call to wake the server only when attempting playback of a video? Even if it doesn't wake quickly enough to play the file first time, I can simply try again. Ideally it would only send the WOL packet if the video is on NFS share and not iPlayer/youtube etc.

Is this feasible? Or should I simply do it manually via a shortcut in favourites?

Thanks.
Reply
#2
Sure, this is a job for a service addon. Just subclass xbmc.Player() and in your onPlaybackStarted() function, execute the whatever code you need to wake your NFS (such as building and sending the WOL magic packet).

You should also be able to use advancedsettings.xml to crank up the curl timeout long enough that your NFS should be awake before it gives up on the first request
Reply
#3
note that there already is a pull-request which adds native wol features to XBMC. might be ready for merge in upcoming merge window
Reply
#4
there also is an advanced WOL addon
Reply

Logout Mark Read Team Forum Stats Members Help
System call on playing video0