* intf_dummy.c: dummy interface plugin
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: intf_dummy.c,v 1.21 2002/07/20 18:01:42 sam Exp $
+ * $Id: intf_dummy.c,v 1.22 2002/07/31 20:56:51 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include <vlc/vlc.h>
#include <vlc/intf.h>
-/*****************************************************************************
- * intf_sys_t: description and status of FB interface
- *****************************************************************************/
-struct intf_sys_t
-{
- /* Prevent malloc(0) */
- int i_dummy;
-};
-
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
-static int intf_Open ( intf_thread_t *p_intf );
-static void intf_Close ( intf_thread_t *p_intf );
-static void intf_Run ( intf_thread_t *p_intf );
-
-/*****************************************************************************
- * Functions exported as capabilities. They are declared as static so that
- * we don't pollute the namespace too much.
- *****************************************************************************/
-void _M( intf_getfunctions )( function_list_t * p_function_list )
-{
- p_function_list->functions.intf.pf_open = intf_Open;
- p_function_list->functions.intf.pf_close = intf_Close;
- p_function_list->functions.intf.pf_run = intf_Run;
-}
+static void Run ( intf_thread_t * );
/*****************************************************************************
- * intf_Open: initialize dummy interface
+ * Open: initialize dummy interface
*****************************************************************************/
-static int intf_Open( intf_thread_t *p_intf )
+int E_(OpenIntf) ( vlc_object_t *p_this )
{
- /* Allocate instance and initialize some members */
- p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
- if( p_intf->p_sys == NULL )
- {
- return( 1 );
- };
-
+ intf_thread_t *p_intf = (intf_thread_t*) p_this;
#ifdef WIN32
AllocConsole();
freopen( "CONOUT$", "w", stdout );
msg_Info( p_intf, _("\nUsing the dummy interface plugin...") );
#endif
- return( 0 );
-}
+ p_intf->pf_run = Run;
-/*****************************************************************************
- * intf_Close: destroy dummy interface
- *****************************************************************************/
-static void intf_Close( intf_thread_t *p_intf )
-{
- /* Destroy structure */
- free( p_intf->p_sys );
+ return VLC_SUCCESS;
}
-
/*****************************************************************************
- * intf_Run: main loop
+ * Run: main loop
*****************************************************************************/
-static void intf_Run( intf_thread_t *p_intf )
+static void Run( intf_thread_t *p_intf )
{
while( !p_intf->b_die )
{