mplayer-1.0rc1/mplayer.c: +#ifdef HAVE_MAEMO +#include <libosso.h> + +extern int vo_null_active; + +// display blanking prevention for Nokia 770/N800 +void *maemo_screensaver_heartbeat() +{ + static unsigned int time_last; + static osso_context_t *ossocontext = NULL; + + if (vo_null_active) return; + + unsigned int time = GetTimerMS(); + + if (!ossocontext) { + ossocontext = osso_initialize("mplayer-cli", VERSION, 0, NULL); + time_last = time; + osso_display_state_on(ossocontext); + osso_display_blanking_pause(ossocontext); + } + + if ((time - time_last) > 55000) + { + time_last = time; + osso_display_state_on(ossocontext); + osso_display_blanking_pause(ossocontext); + } else if ((time - time_last) > 50000) { + time_last = time; + osso_display_blanking_pause(ossocontext); + } +} +#endif + +#ifdef HAVE_MAEMO +if (sh_video) { + current_module="stop_maemo_screensaver"; + maemo_screensaver_heartbeat(); + current_module=NULL; +} +#endif + // DVD sub: if(vo_config_count && vo_spudec) {