/*****************************************************************************
- * common.c:
+ * common.c: Windows video output common code
*****************************************************************************
* Copyright (C) 2001-2009 VLC authors and VideoLAN
* $Id$
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-
/*****************************************************************************
- * Preamble: This file contains the functions related to the creation of
- * a window and the handling of its messages (events).
+ * Preamble: This file contains the functions related to the init of the vout
+ * structure, the common display code, the screensaver, but not the
+ * events and the Window Creation (events.c)
*****************************************************************************/
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_windows_interfaces.h>
static void CommonChangeThumbnailClip(vout_display_t *, bool show);
-static int CommonControlSetFullscreen(vout_display_t *, bool is_fullscreen);
+static int CommonControlSetFullscreen(vout_display_t *, bool is_fullscreen);
static void DisableScreensaver(vout_display_t *);
static void RestoreScreensaver(vout_display_t *);
sys->is_on_top = false;
var_Create(vd, "video-deco", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
+ var_Create(vd, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
/* */
sys->event = EventThreadCreate(vd);
#ifdef MODULE_NAME_IS_directdraw
cfg.use_overlay = sys->use_overlay;
#endif
- cfg.win.type = VOUT_WINDOW_TYPE_HWND;
- cfg.win.x = var_InheritInteger(vd, "video-x");
- cfg.win.y = var_InheritInteger(vd, "video-y");
- cfg.win.width = vd->cfg->display.width;
- cfg.win.height = vd->cfg->display.height;
+ cfg.x = var_InheritInteger(vd, "video-x");
+ cfg.y = var_InheritInteger(vd, "video-y");
+ cfg.width = vd->cfg->display.width;
+ cfg.height = vd->cfg->display.height;
event_hwnd_t hwnd;
if (EventThreadStart(sys->event, &hwnd, &cfg))
vout_display_SendEventFullscreen(vd, false);
}
- /* Why not with glwin32 */
- var_Create(vd, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
DisableScreensaver (vd);
return VLC_SUCCESS;
/* fill in buffer info in first plane */
picture->p->p_pixels = data;
picture->p->i_pitch = pitch;
- picture->p->i_lines = picture->format.i_height;
+ picture->p->i_lines = picture->format.i_visible_height;
/* Fill chroma planes for planar YUV */
if (picture->format.i_chroma == VLC_CODEC_I420 ||
p->p_pixels = o->p_pixels + o->i_lines * o->i_pitch;
p->i_pitch = pitch / 2;
- p->i_lines = picture->format.i_height / 2;
+ p->i_lines = picture->format.i_visible_height / 2;
}
/* The dx/d3d buffer is always allocated as YV12 */
if (vlc_fourcc_AreUVPlanesSwapped(picture->format.i_chroma, VLC_CODEC_YV12)) {
point.x, point.y,
rect.right, rect.bottom);
if (is_resized)
- vout_display_SendEventDisplaySize(vd, rect.right, rect.bottom, cfg->is_fullscreen);
- if (!is_forced && !has_moved && !is_resized )
+ vout_display_SendEventDisplaySize(vd, rect.right, rect.bottom);
+ if (!is_forced && !has_moved && !is_resized)
return;
/* Update the window position and size */
/* src image dimensions */
rect_src.left = 0;
rect_src.top = 0;
- rect_src.right = source->i_width;
- rect_src.bottom = source->i_height;
+ rect_src.right = vd->fmt.i_visible_width;
+ rect_src.bottom = vd->fmt.i_visible_height;
/* Clip the source image */
rect_src_clipped.left = source->i_x_offset +
rect_window.right - rect_window.left,
rect_window.bottom - rect_window.top, SWP_NOMOVE);
}
+ return VLC_EGENERIC;
}
UpdateRects(vd, cfg, source, is_forced);
return VLC_SUCCESS;