* display video in window mode.
*
*****************************************************************************/
-
-#include <errno.h> /* ENOMEM */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
"window to open on. For example, \"\\\\.\\DISPLAY1\" or " \
"\"\\\\.\\DISPLAY2\"." )
-#define WALLPAPER_TEXT N_("Enable wallpaper mode ")
-#define WALLPAPER_LONGTEXT N_( \
- "The wallpaper mode allows you to display the video as the desktop " \
- "background. Note that this feature only works in overlay mode and " \
- "the desktop must not already have a wallpaper." )
+#define DX_HELP N_("Recommended video output for Windows XP. " \
+ "Incompatible with Vista's Aero interface" )
static const char *const ppsz_dev[] = { "" };
static const char *const ppsz_dev_text[] = { N_("Default") };
vlc_module_begin ()
set_shortname( "DirectX" )
+ set_description( N_("DirectX (DirectDraw) video output") )
+ set_help(DX_HELP)
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VOUT )
add_bool( "directx-hw-yuv", true, NULL, HW_YUV_TEXT, HW_YUV_LONGTEXT,
change_string_list( ppsz_dev, ppsz_dev_text, FindDevicesCallback )
change_action_add( FindDevicesCallback, N_("Refresh list") )
- add_bool( "directx-wallpaper", false, NULL, WALLPAPER_TEXT, WALLPAPER_LONGTEXT,
- true )
-
- set_description( N_("DirectX (DirectDraw) video output") )
set_capability( "video output", 100 )
add_shortcut( "directx" )
set_callbacks( OpenVideo, CloseVideo )
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
- var_Create( p_vout, "directx-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT );
+ var_Create( p_vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT );
val.psz_string = _("Wallpaper");
- var_Change( p_vout, "directx-wallpaper", VLC_VAR_SETTEXT, &val, NULL );
- var_AddCallback( p_vout, "directx-wallpaper", WallpaperCallback, NULL );
- var_TriggerCallback( p_vout, "directx-wallpaper" );
+ var_Change( p_vout, "video-wallpaper", VLC_VAR_SETTEXT, &val, NULL );
+ var_AddCallback( p_vout, "video-wallpaper", WallpaperCallback, NULL );
+ var_TriggerCallback( p_vout, "video-wallpaper" );
return VLC_SUCCESS;
{
/* If it still didn't work then don't try to use an overlay */
p_vout->output.i_chroma = i_chroma_backup;
- p_vout->p_sys->b_using_overlay = 0;
+ p_vout->p_sys->b_using_overlay = false;
msg_Warn( p_vout, "Could not initialize directx overlay" ) ;
NewPictureVec( p_vout, p_vout->p_picture );
}
else
psz_fallback = VOUT_TITLE " (software RGB DirectX output)";
EventThreadUpdateTitle( p_vout->p_sys->p_event, psz_fallback );
+ EventThreadUseOverlay( p_vout->p_sys->p_event, p_vout->p_sys->b_using_overlay );
return VLC_SUCCESS;
}
vout_thread_t * p_vout = (vout_thread_t *)p_this;
/* Make sure the wallpaper is restored */
- var_DelCallback( p_vout, "directx-wallpaper", WallpaperCallback, NULL );
+ var_DelCallback( p_vout, "video-wallpaper", WallpaperCallback, NULL );
SwitchWallpaperMode( p_vout, false );
CommonClean( p_vout );
module_config_t *p_item = (module_config_t *)p_context;
- p_item->ppsz_list =
- (char **)realloc( p_item->ppsz_list,
+ p_item->ppsz_list = xrealloc( p_item->ppsz_list,
(p_item->i_list+2) * sizeof(char *) );
- p_item->ppsz_list_text =
- (char **)realloc( p_item->ppsz_list_text,
+ p_item->ppsz_list_text = xrealloc( p_item->ppsz_list_text,
(p_item->i_list+2) * sizeof(char *) );
p_item->ppsz_list[p_item->i_list] = strdup( psz_drivername );
{
/* Modify playlist as well because the vout might have to be
* restarted */
- var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL );
- var_Set( p_playlist, "directx-wallpaper", newval );
+ var_Create( p_playlist, "video-wallpaper", VLC_VAR_BOOL );
+ var_Set( p_playlist, "video-wallpaper", newval );
pl_Release( p_vout );
}