]> git.sesse.net Git - vlc/blob - plugins/beos/beos.cpp
Maintenant le vlc fonctionne correctement sous BeOS (� part la synchro).
[vlc] / plugins / beos / beos.cpp
1 /*****************************************************************************
2  * beos.cpp : BeOS plugin for vlc
3  *****************************************************************************
4  * Copyright (C) 2000 VideoLAN
5  *
6  * Authors:
7  *
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.
12  * 
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.
17  *
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  *****************************************************************************/
22
23 /*****************************************************************************
24  * Preamble
25  *****************************************************************************/
26 #include "defs.h"
27
28 #include <stdlib.h>                                      /* malloc(), free() */
29
30 extern "C"
31 {
32 #include "config.h"
33 #include "common.h"                                     /* boolean_t, byte_t */
34 #include "threads.h"
35 #include "mtime.h"
36 #include "plugins.h"
37
38 #include "interface.h"
39 #include "audio_output.h"
40 #include "video.h"
41 #include "video_output.h"
42
43 #include "plugins_export.h"
44
45 /*****************************************************************************
46  * Exported prototypes
47  *****************************************************************************/
48 void aout_GetPlugin( p_aout_thread_t p_aout );
49 void vout_GetPlugin( p_vout_thread_t p_vout );
50 void intf_GetPlugin( p_intf_thread_t p_intf );
51
52 /*****************************************************************************
53  * GetConfig: get the plugin structure and configuration
54  *****************************************************************************/
55 plugin_info_t * GetConfig( void )
56 {
57     plugin_info_t * p_info = (plugin_info_t *) malloc( sizeof(plugin_info_t) );
58
59     p_info->psz_name    = "BeOS";
60     p_info->psz_version = VERSION;
61     p_info->psz_author  = "the VideoLAN team <vlc@videolan.org>";
62
63     p_info->aout_GetPlugin = aout_GetPlugin;
64     p_info->vout_GetPlugin = vout_GetPlugin;
65     p_info->intf_GetPlugin = intf_GetPlugin;
66     p_info->yuv_GetPlugin = NULL;
67
68     return( p_info );
69 }
70
71 /*****************************************************************************
72  * Test: tests if the plugin can be launched
73  *****************************************************************************/
74 int Test( void )
75 {
76     /* the BeOS plugin always works under BeOS :) */
77     return( 1 );
78 }
79
80 /*****************************************************************************
81  * Following functions are only called through the p_info structure
82  *****************************************************************************/
83
84 void aout_GetPlugin( p_aout_thread_t p_aout )
85 {
86     p_aout->p_sys_open        = aout_SysOpen;
87     p_aout->p_sys_reset       = aout_SysReset;
88     p_aout->p_sys_setformat   = aout_SysSetFormat;
89     p_aout->p_sys_setchannels = aout_SysSetChannels;
90     p_aout->p_sys_setrate     = aout_SysSetRate;
91     p_aout->p_sys_getbufinfo  = aout_SysGetBufInfo;
92     p_aout->p_sys_playsamples = aout_SysPlaySamples;
93     p_aout->p_sys_close       = aout_SysClose;
94 }
95
96 void vout_GetPlugin( p_vout_thread_t p_vout )
97 {
98     p_vout->p_sys_create  = vout_SysCreate;
99     p_vout->p_sys_init    = vout_SysInit;
100     p_vout->p_sys_end     = vout_SysEnd;
101     p_vout->p_sys_destroy = vout_SysDestroy;
102     p_vout->p_sys_manage  = vout_SysManage;
103     p_vout->p_sys_display = vout_SysDisplay;
104 }
105
106 void intf_GetPlugin( p_intf_thread_t p_intf )
107 {
108     p_intf->p_sys_create  = intf_SysCreate;
109     p_intf->p_sys_destroy = intf_SysDestroy;
110     p_intf->p_sys_manage  = intf_SysManage;
111 }
112
113 } /* extern "C" */