1 /*****************************************************************************
2 * intf_dummy.c: dummy interface plugin
3 *****************************************************************************
4 * Copyright (C) 2000 VideoLAN
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
21 *****************************************************************************/
23 /*****************************************************************************
25 *****************************************************************************/
28 #include <stdlib.h> /* malloc(), free() */
29 #include <sys/types.h> /* on BSD, uio.h needs types.h */
30 #include <sys/uio.h> /* "input.h" */
40 #include "video_output.h"
43 #include "interface.h"
47 /*****************************************************************************
48 * intf_sys_t: description and status of FB interface
49 *****************************************************************************/
50 typedef struct intf_sys_s
55 /*****************************************************************************
56 * intf_SysCreate: initialize dummy interface
57 *****************************************************************************/
58 int intf_SysCreate( intf_thread_t *p_intf )
60 /* Allocate instance and initialize some members */
61 p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
62 if( p_intf->p_sys == NULL )
67 /* Spawn video output thread */
70 p_intf->p_vout = vout_CreateThread( NULL, 0, 0, 0, NULL, 0, NULL );
71 if( p_intf->p_vout == NULL ) /* error */
73 intf_ErrMsg("intf error: can't create output thread\n" );
80 /*****************************************************************************
81 * intf_SysDestroy: destroy dummy interface
82 *****************************************************************************/
83 void intf_SysDestroy( intf_thread_t *p_intf )
85 /* Close input thread, if any (blocking) */
88 input_DestroyThread( p_intf->p_input, NULL );
91 /* Close video output thread, if any (blocking) */
94 vout_DestroyThread( p_intf->p_vout, NULL );
97 /* Destroy structure */
98 free( p_intf->p_sys );
102 /*****************************************************************************
103 * intf_SysManage: event loop
104 *****************************************************************************/
105 void intf_SysManage( intf_thread_t *p_intf )