Changeset 1995f882d45bf8f9bd167f9ba549ca7d1efb664e

Show
Ignore:
Timestamp:
10/21/07 01:47:34 (10 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1192924054 +0000
git-parent:

[794eece829a9840339be996a8cd44a9153916877]

git-author:
Rafaël Carré <funman@videolan.org> 1192924054 +0000
Message:

New inhibit module to prevent the power management daemon (usually gnome-power-manager) to suspend/hibernate the laptop while VLC is active.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    r6dd8082 r1995f88  
    900900          VLC_ADD_LIBS([telepathy],[$DBUS_LIBS]) 
    901901          VLC_ADD_CFLAGS([telepathy],[$DBUS_CFLAGS]) 
    902         fi], 
    903  
     902        fi 
     903        dnl Power Management Inhibiter 
     904        VLC_ADD_PLUGINS([inhibit]) 
     905        VLC_ADD_LIBS([inhibit],[$DBUS_LIBS]) 
     906        VLC_ADD_CFLAGS([inhibit],[$DBUS_CFLAGS]) 
     907        ], 
    904908    if ${PKG_CONFIG} --exists dbus-1 
    905909    then 
  • modules/misc/Modules.am

    r57237c5 r1995f88  
    1414SOURCES_profile_parser = profile_parser.c 
    1515SOURCES_audioscrobbler = audioscrobbler.c 
     16SOURCES_inhibit = inhibit.c 
  • src/libvlc-common.c

    r346c7c5 r1995f88  
    855855    if( config_GetInt( p_libvlc, "one-instance" ) ) 
    856856        VLC_AddIntf( 0, "dbus,none", VLC_FALSE, VLC_FALSE ); 
     857 
     858    /* Prevents the power management daemon to suspend the computer 
     859     * when VLC is active */ 
     860    if( config_GetInt( p_libvlc, "inhibit" ) ) 
     861        VLC_AddIntf( 0, "inhibit,none", VLC_FALSE, VLC_FALSE ); 
    857862#endif 
    858863 
  • src/libvlc-module.c

    rc8e00c0 r1995f88  
    403403#define SS_TEXT N_("Disable screensaver") 
    404404#define SS_LONGTEXT N_("Disable the screensaver during video playback." ) 
     405 
     406#define INHIBIT_TEXT N_("Inhibits the power management daemon during playback.") 
     407#define INHIBIT_LONGTEXT N_("Inhibits the power management daemon during any" \ 
     408    "playback, to avoid the computer being suspended because of inactivity.") 
    405409 
    406410#define VIDEO_DECO_TEXT N_("Window decorations") 
     
    17881792              PLAYLISTENQUEUE_LONGTEXT, VLC_TRUE ); 
    17891793        change_unsaveable(); 
     1794 
     1795    add_bool( "inhibit", 1, NULL, INHIBIT_TEXT, 
     1796              INHIBIT_LONGTEXT, VLC_TRUE ); 
    17901797#endif 
    17911798