]> git.sesse.net Git - vlc/blob - plugins/directx/directx.c
* ALL: new module API. Makes a few things a lot simpler, and we gain
[vlc] / plugins / directx / directx.c
1 /*****************************************************************************
2  * directx.c : Windows DirectX plugin for vlc
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: directx.c,v 1.12 2002/07/31 20:56:51 sam Exp $
6  *
7  * Authors: Gildas Bazin <gbazin@netcourrier.com>
8  *      
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #include <stdlib.h>                                      /* malloc(), free() */
28 #include <string.h>
29
30 #include <vlc/vlc.h>
31
32 /*****************************************************************************
33  * External prototypes
34  *****************************************************************************/
35 int  E_(OpenVideo)    ( vlc_object_t * );
36 void E_(CloseVideo)   ( vlc_object_t * );
37
38 int  E_(OpenAudio)    ( vlc_object_t * );
39 void E_(CloseAudio)   ( vlc_object_t * );
40
41 /*****************************************************************************
42  * Module descriptor
43  *****************************************************************************/
44 #define HW_YUV_TEXT N_("use hardware YUV->RGB conversions")
45 #define HW_YUV_LONGTEXT N_( \
46     "Try to use hardware acceleration for YUV->RGB conversions. " \
47     "This option doesn't have any effect when using overlays." )
48 #define SYSMEM_TEXT N_("use video buffers in system memory")
49 #define SYSMEM_LONGTEXT N_( \
50     "Create video buffers in system memory instead of video memory. This " \
51     "isn't recommended as usually using video memory allows to benefit from " \
52     "more hardware acceleration (like rescaling or YUV->RGB conversions). " \
53     "This option doesn't have any effect when using overlays." )
54
55 vlc_module_begin();
56     add_category_hint( N_("Video"), NULL );
57     add_bool( "directx-hw-yuv", 1, NULL, HW_YUV_TEXT, HW_YUV_LONGTEXT );
58     add_bool( "directx-use-sysmem", 0, NULL, SYSMEM_TEXT, SYSMEM_LONGTEXT );
59     set_description( _("DirectX extension module") )
60     add_submodule();
61         set_capability( "video output", 150 );
62         set_callbacks( E_(OpenVideo), E_(CloseVideo) );
63     add_submodule();
64         set_capability( "audio output", 150 );
65         set_callbacks( E_(OpenAudio), E_(CloseAudio) );
66 vlc_module_end();
67
68 #if 0 /* FIXME */
69     /* check if we registered a window class because we need to
70      * unregister it */
71     WNDCLASS wndclass;
72     if( GetClassInfo( GetModuleHandle(NULL), "VLC DirectX", &wndclass ) )
73         UnregisterClass( "VLC DirectX", GetModuleHandle(NULL) );
74 #endif
75