]> git.sesse.net Git - vlc/commitdiff
skins2: add a --[no]-skinned-video parameter (enabled by default)
authorErwan Tulou <erwan10@videolan.org>
Tue, 3 Nov 2009 20:22:08 +0000 (21:22 +0100)
committerErwan Tulou <erwan10@videolan.org>
Tue, 3 Nov 2009 21:01:53 +0000 (22:01 +0100)
This parameter is intended to give old skins a chance to play back video even
though no video tag is provided in the theme.xml file.

modules/gui/skins2/src/skin_main.cpp

index 6aa0e4782d891849bfe3081b6d1352eb4f8529e4..42840b6372b73641d6192d923da2082dc6d98edd 100644 (file)
@@ -366,7 +366,6 @@ static vlc_mutex_t serializer = VLC_STATIC_MUTEX;
 // Callbacks for vout requests
 static int WindowOpen( vlc_object_t *p_this )
 {
-    int i_ret;
     vout_window_t *pWnd = (vout_window_t *)p_this;
 
     vlc_mutex_lock( &skin_load.mutex );
@@ -378,6 +377,12 @@ static int WindowOpen( vlc_object_t *p_this )
     if( pIntf == NULL )
         return VLC_EGENERIC;
 
+    if( !config_GetInt( pIntf, "skinned-video") )
+    {
+        vlc_object_release( pIntf );
+        return VLC_EGENERIC;
+    }
+
     vlc_mutex_lock( &serializer );
 
     pWnd->handle.hwnd = VoutManager::getWindow( pIntf, pWnd );
@@ -566,6 +571,10 @@ static int onTaskBarChange( vlc_object_t *pObj, const char *pVariable,
     " correctly.")
 #define SKINS2_PLAYLIST N_("Use a skinned playlist")
 #define SKINS2_PLAYLIST_LONG N_("Use a skinned playlist")
+#define SKINS2_VIDEO N_("Display video in a skinned window if any")
+#define SKINS2_VIDEO_LONG N_( \
+    "When set to 'no', this parameter is intended to give old skins a chance" \
+    " to play back video even though no video tag is implemented")
 
 vlc_module_begin ()
     set_category( CAT_INTERFACE )
@@ -588,6 +597,8 @@ vlc_module_begin ()
 
     add_bool( "skinned-playlist", true, NULL, SKINS2_PLAYLIST,
               SKINS2_PLAYLIST_LONG, false );
+    add_bool( "skinned-video", true, NULL, SKINS2_VIDEO,
+              SKINS2_VIDEO_LONG, false );
     set_shortname( N_("Skins"))
     set_description( N_("Skinnable Interface") )
     set_capability( "interface", 30 )