/*****************************************************************************
* wingdi.c : Win32 / WinCE GDI video output plugin for vlc
*****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
+ * Copyright (C) 2002-2009 the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
#include <vlc_playlist.h>
#include <vlc_vout.h>
+#include <windows.h>
+#include <tchar.h>
#include <commctrl.h>
/*#ifdef MODULE_NAME_IS_wingapi
# define kfDirect444 0x200
# define kfDirectInverted 0x400
# endif
-#endif /* MODULE_NAME_IS_wingapi */
+#endif */ /* MODULE_NAME_IS_wingapi */
#include "vout.h"
static int OpenVideo ( vlc_object_t *p_this )
{
vout_thread_t * p_vout = (vout_thread_t *)p_this;
- vlc_value_t val;
- p_vout->p_sys = (vout_sys_t *)malloc( sizeof(vout_sys_t) );
+ p_vout->p_sys = (vout_sys_t *)calloc( 1, sizeof(vout_sys_t) );
if( !p_vout->p_sys ) return VLC_ENOMEM;
- memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) );
#ifdef MODULE_NAME_IS_wingapi
/* Load GAPI */
#ifndef UNDER_CE
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
- var_Get( p_vout, "video-on-top", &val );
- var_Set( p_vout, "video-on-top", val );
+ var_TriggerCallback( p_vout, "video-on-top" );
/* disable screensaver by temporarily changing system settings */
p_vout->p_sys->i_spi_lowpowertimeout = 0;
p_vout->p_sys->i_spi_powerofftimeout = 0;
p_vout->p_sys->i_spi_screensavetimeout = 0;
- var_Get( p_vout, "disable-screensaver", &val);
- if( val.b_bool ) {
+ if( var_GetBool( p_vout, "disable-screensaver" ) ) {
msg_Dbg(p_vout, "disabling screen saver");
SystemParametersInfo(SPI_GETLOWPOWERTIMEOUT,
0, &(p_vout->p_sys->i_spi_lowpowertimeout), 0);
switch( p_vout->p_sys->i_depth )
{
case 8:
- p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+ p_vout->output.i_chroma = VLC_CODEC_RGB8;
p_vout->output.pf_setpalette = SetPalette;
break;
case 15:
- p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5');
+ p_vout->output.i_chroma = VLC_CODEC_RGB15;
p_vout->output.i_rmask = 0x7c00;
p_vout->output.i_gmask = 0x03e0;
p_vout->output.i_bmask = 0x001f;
break;
case 16:
- p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+ p_vout->output.i_chroma = VLC_CODEC_RGB16;
p_vout->output.i_rmask = 0xf800;
p_vout->output.i_gmask = 0x07e0;
p_vout->output.i_bmask = 0x001f;
break;
case 24:
- p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+ p_vout->output.i_chroma = VLC_CODEC_RGB24;
p_vout->output.i_rmask = 0x00ff0000;
p_vout->output.i_gmask = 0x0000ff00;
p_vout->output.i_bmask = 0x000000ff;
break;
case 32:
- p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+ p_vout->output.i_chroma = VLC_CODEC_RGB32;
p_vout->output.i_rmask = 0x00ff0000;
p_vout->output.i_gmask = 0x0000ff00;
p_vout->output.i_bmask = 0x000000ff;