[vlc-commits] Remove pf_run

Rémi Denis-Courmont git at videolan.org
Tue Nov 27 19:24:50 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 27 20:21:37 2012 +0200| [08223d48e9cce98e19910782c8ed1319e18461f6] | committer: Rémi Denis-Courmont

Remove pf_run

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

 include/vlc_interface.h       |    3 ---
 modules/control/dbus/dbus.c   |    1 -
 modules/control/dummy.c       |    2 --
 modules/control/hotkeys.c     |    1 -
 modules/control/lirc.c        |    2 --
 modules/control/motion.c      |    1 -
 modules/control/netsync.c     |    1 -
 modules/control/ntservice.c   |    1 -
 modules/control/rc.c          |    2 --
 modules/gui/ncurses.c         |    1 -
 modules/misc/audioscrobbler.c |    2 --
 src/interface/interface.c     |   27 ---------------------------
 12 files changed, 44 deletions(-)

diff --git a/include/vlc_interface.h b/include/vlc_interface.h
index 9aabb1d..fd8cf8c 100644
--- a/include/vlc_interface.h
+++ b/include/vlc_interface.h
@@ -52,15 +52,12 @@ typedef struct intf_thread_t
     VLC_COMMON_MEMBERS
 
     struct intf_thread_t *p_next; /** LibVLC interfaces book keeping */
-    vlc_thread_t thread; /** LibVLC thread */
-    /* Thread properties and locks */
 
     /* Specific interfaces */
     intf_sys_t *        p_sys;                          /** system interface */
 
     /** Interface module */
     module_t *   p_module;
-    void      ( *pf_run )    ( struct intf_thread_t * ); /** Run function */
 
     /** Specific for dialogs providers */
     void ( *pf_show_dialog ) ( struct intf_thread_t *, int, int,
diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 735975e..a52bb74 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -231,7 +231,6 @@ static int Open( vlc_object_t *p_this )
 
     dbus_connection_flush( p_conn );
 
-    p_intf->pf_run = NULL;
     p_intf->p_sys = p_sys;
     p_sys->p_conn = p_conn;
     p_sys->p_events = vlc_array_new();
diff --git a/modules/control/dummy.c b/modules/control/dummy.c
index 7311414..6e0a364 100644
--- a/modules/control/dummy.c
+++ b/modules/control/dummy.c
@@ -70,7 +70,5 @@ static int Open( vlc_object_t *p_this )
 
     msg_Info( p_intf, "using the dummy interface module..." );
 
-    p_intf->pf_run = NULL;
-
     return VLC_SUCCESS;
 }
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 2a9d44a..107318b 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -123,7 +123,6 @@ static int Open( vlc_object_t *p_this )
         return VLC_ENOMEM;
 
     p_intf->p_sys = p_sys;
-    p_intf->pf_run = NULL;
 
     p_sys->p_last_vout = NULL;
     p_intf->p_sys->i_mousewheel_mode =
diff --git a/modules/control/lirc.c b/modules/control/lirc.c
index 615f97c..1c314e1 100644
--- a/modules/control/lirc.c
+++ b/modules/control/lirc.c
@@ -97,8 +97,6 @@ static int Open( vlc_object_t *p_this )
     if( p_sys == NULL )
         return VLC_ENOMEM;
 
-    p_intf->pf_run = NULL;
-
     p_sys->i_fd = lirc_init( "vlc", 1 );
     if( p_sys->i_fd == -1 )
     {
diff --git a/modules/control/motion.c b/modules/control/motion.c
index 6e5b7fb..5f58aae 100644
--- a/modules/control/motion.c
+++ b/modules/control/motion.c
@@ -93,7 +93,6 @@ error:
         return VLC_EGENERIC;
     }
 
-    p_intf->pf_run = NULL;
     p_intf->p_sys = p_sys;
 
     if( vlc_clone( &p_sys->thread, RunIntf, p_intf, VLC_THREAD_PRIORITY_LOW ) )
diff --git a/modules/control/netsync.c b/modules/control/netsync.c
index b68266d..7466025 100644
--- a/modules/control/netsync.c
+++ b/modules/control/netsync.c
@@ -127,7 +127,6 @@ static int Open(vlc_object_t *object)
         return VLC_EGENERIC;
     }
 
-    intf->pf_run = NULL;
     intf->p_sys = sys = malloc(sizeof(*sys));
     if (!sys) {
         net_Close(fd);
diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c
index 6807d84..8d3a94c 100644
--- a/modules/control/ntservice.c
+++ b/modules/control/ntservice.c
@@ -111,7 +111,6 @@ static int Activate( vlc_object_t *p_this )
     if( unlikely(p_sys == NULL) )
         return VLC_ENOMEM;
 
-    p_intf->pf_run = NULL;
     p_intf->p_sys = p_sys;
 
     if( vlc_clone( &p_sys->thread, Run, p_intf, VLC_THREAD_PRIORITY_LOW ) )
diff --git a/modules/control/rc.c b/modules/control/rc.c
index 12bdb1a..cfffc80 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -330,8 +330,6 @@ static int Activate( vlc_object_t *p_this )
     /* Non-buffered stdout */
     setvbuf( stdout, (char *)NULL, _IOLBF, 0 );
 
-    p_intf->pf_run = NULL;
-
 #ifdef WIN32
     p_intf->p_sys->b_quiet = var_InheritBool( p_intf, "rc-quiet" );
     if( !p_intf->p_sys->b_quiet )
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 4b44119..5a93766 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1827,7 +1827,6 @@ static int Open(vlc_object_t *p_this)
     if (vlc_clone(&sys->thread, Run, intf, VLC_THREAD_PRIORITY_LOW))
         abort(); /* TODO */
 
-    intf->pf_run = NULL;
     return VLC_SUCCESS;
 }
 
diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index 95ffd69..4799a9e 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -430,8 +430,6 @@ static int Open(vlc_object_t *p_this)
 
     var_AddCallback(pl_Get(p_intf), "activity", ItemChange, p_intf);
 
-    p_intf->pf_run = NULL;
-
     return VLC_SUCCESS;
 }
 
diff --git a/src/interface/interface.c b/src/interface/interface.c
index 095de2d..9840777 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -127,15 +127,6 @@ int intf_Create( vlc_object_t *p_this, const char *chain )
         goto error;
     }
 
-    /* Run the interface in a separate thread */
-    if( p_intf->pf_run
-     && vlc_clone( &p_intf->thread,
-                   RunInterface, p_intf, VLC_THREAD_PRIORITY_LOW ) )
-    {
-        msg_Err( p_intf, "cannot spawn interface thread" );
-        goto error;
-    }
-
     vlc_mutex_lock( &lock );
     p_intf->p_next = libvlc_priv( p_libvlc )->p_intf;
     libvlc_priv( p_libvlc )->p_intf = p_intf;
@@ -176,11 +167,6 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
     {
         intf_thread_t *p_next = p_intf->p_next;
 
-        if( p_intf->pf_run )
-        {
-            vlc_cancel( p_intf->thread );
-            vlc_join( p_intf->thread, NULL );
-        }
         module_unneed( p_intf, p_intf->p_module );
         config_ChainDestroy( p_intf->p_cfg );
         vlc_object_release( p_intf );
@@ -191,19 +177,6 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
 
 /* Following functions are local */
 
-/**
- * RunInterface: setups necessary data and give control to the interface
- *
- * @param p_this: interface object
- */
-static void* RunInterface( void *p_this )
-{
-    intf_thread_t *p_intf = p_this;
-
-    p_intf->pf_run( p_intf );
-    return NULL;
-}
-
 static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd,
                          vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {



More information about the vlc-commits mailing list