1 /*****************************************************************************
2 * mga.c : Matrox Graphic Array plugin for vlc
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() */
31 #include "common.h" /* boolean_t, byte_t */
36 #include "interface.h"
37 #include "audio_output.h"
39 #include "video_output.h"
41 /*****************************************************************************
43 *****************************************************************************/
44 static void vout_GetPlugin( p_vout_thread_t p_vout );
45 static void intf_GetPlugin( p_intf_thread_t p_intf );
48 int vout_MGACreate ( vout_thread_t *p_vout, char *psz_display,
49 int i_root_window, void *p_data );
50 int vout_MGAInit ( p_vout_thread_t p_vout );
51 void vout_MGAEnd ( p_vout_thread_t p_vout );
52 void vout_MGADestroy ( p_vout_thread_t p_vout );
53 int vout_MGAManage ( p_vout_thread_t p_vout );
54 void vout_MGADisplay ( p_vout_thread_t p_vout );
55 void vout_SetPalette ( p_vout_thread_t p_vout,
56 u16 *red, u16 *green, u16 *blue, u16 *transp );
59 int intf_MGACreate ( p_intf_thread_t p_intf );
60 void intf_MGADestroy ( p_intf_thread_t p_intf );
61 void intf_MGAManage ( p_intf_thread_t p_intf );
63 /*****************************************************************************
64 * GetConfig: get the plugin structure and configuration
65 *****************************************************************************/
66 plugin_info_t * GetConfig( void )
68 plugin_info_t * p_info = (plugin_info_t *) malloc( sizeof(plugin_info_t) );
70 p_info->psz_name = "Matrox Acceleration";
71 p_info->psz_version = VERSION;
72 p_info->psz_author = "the VideoLAN team <vlc@videolan.org>";
74 p_info->aout_GetPlugin = NULL;
75 p_info->vout_GetPlugin = vout_GetPlugin;
76 p_info->intf_GetPlugin = intf_GetPlugin;
77 p_info->yuv_GetPlugin = NULL;
79 /* The MGA module does not work yet */
80 p_info->i_score = 0x0;
85 /*****************************************************************************
86 * Following functions are only called through the p_info structure
87 *****************************************************************************/
89 static void vout_GetPlugin( p_vout_thread_t p_vout )
91 p_vout->p_sys_create = vout_MGACreate;
92 p_vout->p_sys_init = vout_MGAInit;
93 p_vout->p_sys_end = vout_MGAEnd;
94 p_vout->p_sys_destroy = vout_MGADestroy;
95 p_vout->p_sys_manage = vout_MGAManage;
96 p_vout->p_sys_display = vout_MGADisplay;
99 static void intf_GetPlugin( p_intf_thread_t p_intf )
101 p_intf->p_sys_create = intf_MGACreate;
102 p_intf->p_sys_destroy = intf_MGADestroy;
103 p_intf->p_sys_manage = intf_MGAManage;