]> git.sesse.net Git - vlc/blobdiff - plugins/beos/beos.cpp
* ALL: new module API. Makes a few things a lot simpler, and we gain
[vlc] / plugins / beos / beos.cpp
index f983b30ae54076c4f8b405743420728f92ca31a6..af0387d80785aeb2a777440fcf873b0593c7fa1f 100644 (file)
@@ -2,7 +2,7 @@
  * beos.cpp : BeOS plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: beos.cpp,v 1.19 2002/06/01 12:31:58 sam Exp $
+ * $Id: beos.cpp,v 1.20 2002/07/31 20:56:50 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 
 #include <vlc/vlc.h>
 
-extern "C"
-{
 /*****************************************************************************
- * Capabilities defined in the other files.
+ * External prototypes
  *****************************************************************************/
-void _M( aout_getfunctions )( function_list_t * p_function_list );
-void _M( vout_getfunctions )( function_list_t * p_function_list );
-void _M( intf_getfunctions )( function_list_t * p_function_list );
+int  E_(OpenIntf)     ( vlc_object_t * );
+void E_(CloseIntf)    ( vlc_object_t * );
 
-/*****************************************************************************
- * Build configuration tree.
- *****************************************************************************/
-MODULE_CONFIG_START
-MODULE_CONFIG_STOP
-
-MODULE_INIT_START
-    SET_DESCRIPTION( _("BeOS standard API module") )
-    ADD_CAPABILITY( INTF, 100 )
-    ADD_CAPABILITY( VOUT, 100 )
-    ADD_CAPABILITY( AOUT, 100 )
-MODULE_INIT_STOP
+int  E_(OpenAudio)    ( vlc_object_t * );
+void E_(CloseAudio)   ( vlc_object_t * );
 
-MODULE_ACTIVATE_START
-    _M( aout_getfunctions )( &p_module->p_functions->aout );
-    _M( vout_getfunctions )( &p_module->p_functions->vout );
-    _M( intf_getfunctions )( &p_module->p_functions->intf );
-MODULE_ACTIVATE_STOP
+int  E_(OpenVideo)    ( vlc_object_t * );
+void E_(CloseVideo)   ( vlc_object_t * );
 
-MODULE_DEACTIVATE_START
-MODULE_DEACTIVATE_STOP
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+    set_description( _("BeOS standard API module") );
+    add_submodule();
+        set_capability( "interface", 100 );
+        set_callbacks( E_(OpenIntf), E_(CloseIntf) );
+    add_submodule();                                     
+        set_capability( "video output", 100 );
+        set_callbacks( E_(OpenVideo), E_(CloseVideo) );
+    add_submodule();
+        set_capability( "audio output", 100 );
+        set_callbacks( E_(OpenAudio), E_(CloseAudio) );
+vlc_module_end();
 
-} /* extern "C" */