[vlc-commits] commit: Skins2: remove skins demux ( Jean-Philippe André )

git at videolan.org git at videolan.org
Wed Jun 2 16:20:04 CEST 2010


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Wed Jun  2 00:14:08 2010 +0800| [79d1e54c675092fa12246a7235fdb8dc4a5e6814] | committer: Jean-Philippe André 

Skins2: remove skins demux

As pointed by Rémi, only medias should be "openable" in VLC.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79d1e54c675092fa12246a7235fdb8dc4a5e6814
---

 modules/gui/skins2/src/skin_main.cpp |   91 ----------------------------------
 modules/gui/skins2/src/vlcproc.cpp   |   21 --------
 modules/gui/skins2/src/vlcproc.hpp   |    5 --
 3 files changed, 0 insertions(+), 117 deletions(-)

diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 4d9ea1c..d0e6dd0 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -29,7 +29,6 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_input.h>
-#include <vlc_demux.h>
 #include <vlc_playlist.h>
 #include <vlc_threads.h>
 #include <vlc_vout_window.h>
@@ -67,10 +66,6 @@ static int  Open  ( vlc_object_t * );
 static void Close ( vlc_object_t * );
 static void *Run  ( void * );
 
-static int DemuxOpen( vlc_object_t * );
-static int Demux( demux_t * );
-static int DemuxControl( demux_t *, int, va_list );
-
 //---------------------------------------------------------------------------
 // Prototypes for configuration callbacks
 //---------------------------------------------------------------------------
@@ -122,9 +117,6 @@ static int Open( vlc_object_t *p_this )
     // No theme yet
     p_intf->p_sys->p_theme = NULL;
 
-    // Create a variable to be notified of skins to be loaded
-    var_Create( p_intf, "skin-to-load", VLC_VAR_STRING );
-
     vlc_mutex_init( &p_intf->p_sys->vout_lock );
     vlc_cond_init( &p_intf->p_sys->vout_wait );
 
@@ -377,83 +369,6 @@ static void WindowClose( vlc_object_t *p_this )
     vlc_object_release( pIntf );
 }
 
-//---------------------------------------------------------------------------
-// DemuxOpen: initialize demux
-//---------------------------------------------------------------------------
-static int DemuxOpen( vlc_object_t *p_this )
-{
-    demux_t *p_demux = (demux_t*)p_this;
-    intf_thread_t *p_intf;
-    char *ext;
-
-    // Needed callbacks
-    p_demux->pf_demux   = Demux;
-    p_demux->pf_control = DemuxControl;
-
-    // Test that we have a valid .vlt or .wsz file, based on the extension
-    if( ( ext = strrchr( p_demux->psz_path, '.' ) ) == NULL ||
-        ( strcasecmp( ext, ".vlt" ) && strcasecmp( ext, ".wsz" ) ) )
-    {
-        return VLC_EGENERIC;
-    }
-
-    vlc_mutex_lock( &skin_load.mutex );
-    p_intf = skin_load.intf;
-    if( p_intf )
-        vlc_object_hold( p_intf );
-    vlc_mutex_unlock( &skin_load.mutex );
-
-    if( p_intf != NULL )
-    {
-        playlist_t *p_playlist = pl_Get( p_this );
-
-        PL_LOCK;
-        // Make sure the item is deleted afterwards
-        /// \bug does not always work
-        playlist_CurrentPlayingItem( p_playlist )->i_flags |= PLAYLIST_REMOVE_FLAG;
-        PL_UNLOCK;
-
-        var_SetString( p_intf, "skin-to-load", p_demux->psz_path );
-        vlc_object_release( p_intf );
-    }
-    else
-    {
-        msg_Warn( p_this,
-                  "skin could not be loaded (not using skins2 intf)" );
-    }
-
-    return VLC_SUCCESS;
-}
-
-
-//---------------------------------------------------------------------------
-// Demux: return EOF
-//---------------------------------------------------------------------------
-static int Demux( demux_t *p_demux )
-{
-    return 0;
-}
-
-
-//---------------------------------------------------------------------------
-// DemuxControl
-//---------------------------------------------------------------------------
-static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
-{
-    switch( i_query )
-    {
-    case DEMUX_GET_PTS_DELAY:
-    {
-        int64_t *pi_pts_delay = va_arg( args, int64_t * );
-        *pi_pts_delay = 10;
-        return VLC_SUCCESS;
-    }
-    default:
-        return VLC_EGENERIC;
-    }
-
-}
-
 
 //---------------------------------------------------------------------------
 // Callbacks
@@ -589,10 +504,4 @@ vlc_module_begin ()
 #endif
         set_callbacks( WindowOpen, WindowClose )
 
-    add_submodule ()
-        set_description( N_("Skins loader demux") )
-        set_capability( "access_demux", 5 )
-        set_callbacks( DemuxOpen, NULL )
-        add_shortcut( "skins" )
-
 vlc_module_end ()
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index af82e1f..bdbeb49 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -172,8 +172,6 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
     // Called when a playlist item changed
     var_AddCallback( pIntf->p_sys->p_playlist, "item-change",
                      onItemChange, this );
-    // Called when our skins2 demux wants us to load a new skin
-    var_AddCallback( pIntf, "skin-to-load", onSkinToLoad, this );
 
     // Called when we have an interaction dialog to display
     var_Create( pIntf, "interaction", VLC_VAR_ADDRESS );
@@ -225,7 +223,6 @@ VlcProc::~VlcProc()
                      onInputNew, this );
     var_DelCallback( getIntf()->p_sys->p_playlist, "item-change",
                      onItemChange, this );
-    var_DelCallback( getIntf(), "skin-to-load", onSkinToLoad, this );
     var_DelCallback( getIntf(), "interaction", onInteraction, this );
 }
 
@@ -324,24 +321,6 @@ int VlcProc::onItemDelete( vlc_object_t *pObj, const char *pVariable,
     return VLC_SUCCESS;
 }
 
-
-int VlcProc::onSkinToLoad( vlc_object_t *pObj, const char *pVariable,
-                           vlc_value_t oldVal, vlc_value_t newVal,
-                           void *pParam )
-{
-    VlcProc *pThis = (VlcProc*)pParam;
-
-    // Create a playlist notify command
-    CmdChangeSkin *pCmd =
-        new CmdChangeSkin( pThis->getIntf(), newVal.psz_string );
-
-    // Push the command in the asynchronous command queue
-    AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
-    pQueue->push( CmdGenericPtr( pCmd ) );
-
-    return VLC_SUCCESS;
-}
-
 int VlcProc::onInteraction( vlc_object_t *pObj, const char *pVariable,
                             vlc_value_t oldVal, vlc_value_t newVal,
                             void *pParam )
diff --git a/modules/gui/skins2/src/vlcproc.hpp b/modules/gui/skins2/src/vlcproc.hpp
index 08c1a8b..1a19bcb 100644
--- a/modules/gui/skins2/src/vlcproc.hpp
+++ b/modules/gui/skins2/src/vlcproc.hpp
@@ -204,11 +204,6 @@ private:
                              vlc_value_t oldVal, vlc_value_t newVal,
                              void *pParam );
 
-    /// Callback for skins2-to-load variable
-    static int onSkinToLoad( vlc_object_t *pObj, const char *pVariable,
-                             vlc_value_t oldVal, vlc_value_t newVal,
-                             void *pParam );
-
     static int onInteraction( vlc_object_t *pObj, const char *pVariable,
                               vlc_value_t oldVal, vlc_value_t newVal,
                               void *pParam );



More information about the vlc-commits mailing list