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 $
7 * Authors: Gildas Bazin <gbazin@netcourrier.com>
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.
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.
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 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
27 #include <stdlib.h> /* malloc(), free() */
32 /*****************************************************************************
34 *****************************************************************************/
35 int E_(OpenVideo) ( vlc_object_t * );
36 void E_(CloseVideo) ( vlc_object_t * );
38 int E_(OpenAudio) ( vlc_object_t * );
39 void E_(CloseAudio) ( vlc_object_t * );
41 /*****************************************************************************
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." )
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") )
61 set_capability( "video output", 150 );
62 set_callbacks( E_(OpenVideo), E_(CloseVideo) );
64 set_capability( "audio output", 150 );
65 set_callbacks( E_(OpenAudio), E_(CloseAudio) );
69 /* check if we registered a window class because we need to
72 if( GetClassInfo( GetModuleHandle(NULL), "VLC DirectX", &wndclass ) )
73 UnregisterClass( "VLC DirectX", GetModuleHandle(NULL) );