]> git.sesse.net Git - vlc/blobdiff - plugins/win32/intf_win32.cpp
* ALL: new module API. Makes a few things a lot simpler, and we gain
[vlc] / plugins / win32 / intf_win32.cpp
index 41307e4666235ccccfdbda19b056242d16133e26..7f3aa7b95bb1e1f75f30f39d7bf42e2a6860dfb9 100644 (file)
@@ -40,28 +40,17 @@ intf_thread_t *p_intfGlobal;
 /*****************************************************************************\r
  * Local prototypes.\r
  *****************************************************************************/\r
-static int  intf_Open      ( intf_thread_t *p_intf );\r
-static void intf_Close     ( intf_thread_t *p_intf );\r
 static void intf_Run       ( intf_thread_t *p_intf );\r
 \r
 int Win32Manage( void *p_data );\r
 \r
 /*****************************************************************************\r
- * Functions exported as capabilities. They are declared as static so that\r
- * we don't pollute the namespace too much.\r
+ * Open: initialize interface\r
  *****************************************************************************/\r
-void _M( intf_getfunctions )( function_list_t * p_function_list )\r
+int E_(Open)( vlc_object_t *p_this )\r
 {\r
-    p_function_list->functions.intf.pf_open  = intf_Open;\r
-    p_function_list->functions.intf.pf_close = intf_Close;\r
-    p_function_list->functions.intf.pf_run   = intf_Run;\r
-}\r
+    intf_thread_t *p_intf = (intf_thread_t *)p_this;\r
 \r
-/*****************************************************************************\r
- * intf_Open: initialize interface\r
- *****************************************************************************/\r
-static int intf_Open( intf_thread_t *p_intf )\r
-{\r
     /* Allocate instance and initialize some members */\r
     p_intf->p_sys = (intf_sys_s *) malloc( sizeof( intf_sys_t ) );\r
     if( p_intf->p_sys == NULL )\r
@@ -71,6 +60,7 @@ static int intf_Open( intf_thread_t *p_intf )
     };\r
 \r
     p_intfGlobal = p_intf;\r
+    p_intf->pf_run = intf_Run;\r
 \r
     p_intf->p_sys->p_sub = msg_Subscribe( p_intf );\r
 \r
@@ -86,10 +76,12 @@ static int intf_Open( intf_thread_t *p_intf )
 }\r
 \r
 /*****************************************************************************\r
- * intf_Close: destroy interface\r
+ * Close: destroy interface\r
  *****************************************************************************/\r
-static void intf_Close( intf_thread_t *p_intf )\r
+void E_(Close)( vlc_object_t *p_this )\r
 {\r
+    intf_thread_t *p_intf = (intf_thread_t *)p_this;\r
+\r
     if( p_intf->p_sys->p_input )\r
     {\r
         vlc_object_release( p_intf->p_sys->p_input );\r
@@ -223,13 +215,13 @@ int Win32Manage( intf_thread_t *p_intf )
 \r
         vlc_mutex_unlock( &p_input->stream.stream_lock );\r
     }\r
-    else if( p_intf->p_sys->b_playing && !p_intf->p_vlc->b_die )\r
+    else if( p_intf->p_sys->b_playing && !p_intf->b_die )\r
     {\r
         p_intf->p_sys->p_window->ModeManage();\r
         p_intf->p_sys->b_playing = 0;\r
     }\r
 \r
-    if( p_intf->p_vlc->b_die )\r
+    if( p_intf->b_die )\r
     {\r
         vlc_mutex_unlock( &p_intf->change_lock );\r
 \r