1 /*****************************************************************************
2 * common.h: Windows video output header file
3 *****************************************************************************
4 * Copyright (C) 2001-2009 VLC authors and VideoLAN
7 * Authors: Gildas Bazin <gbazin@videolan.org>
8 * Damien Fouilleul <damienf@videolan.org>
9 * Martell Malone <martellmalone@gmail.com>
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation; either version 2.1 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
26 /*****************************************************************************
27 * event_thread_t: event thread
28 *****************************************************************************/
31 /*****************************************************************************
32 * vout_sys_t: video output method descriptor
33 *****************************************************************************
34 * This structure is part of the video output thread descriptor.
35 * It describes the module specific properties of an output thread.
36 *****************************************************************************/
37 typedef struct vout_display_sys_win32_t
40 event_thread_t
*event
;
43 HWND hwnd
; /* Handle of the main window */
44 HWND hvideownd
; /* Handle of the video sub-window */
45 struct vout_window_t
*parent_window
; /* Parent window VLC object */
46 HWND hparent
; /* Handle of the parent window */
47 HWND hfswnd
; /* Handle of the fullscreen window */
49 /* size of the display */
52 /* size of the overall window (including black bands) */
55 # if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
56 HINSTANCE dxgidebug_dll
;
59 unsigned changes
; /* changes made to the video display */
62 bool is_first_display
;
65 /* Coordinates of src and dest images (used when blitting to display) */
67 RECT rect_src_clipped
;
69 RECT rect_dest_clipped
;
73 bool use_desktop
; /* show video on desktop window ? */
75 bool use_overlay
; /* Are we using an overlay surface */
76 /* Overlay alignment restrictions */
77 int i_align_src_boundary
;
79 int i_align_dest_boundary
;
80 int i_align_dest_size
;
82 bool (*pf_GetRect
)(const struct vout_display_sys_win32_t
*p_sys
, RECT
*out
);
83 } vout_display_sys_win32_t
;
86 /*****************************************************************************
87 * Prototypes from common.c
88 *****************************************************************************/
89 int CommonInit(vout_display_t
*);
90 void CommonClean(vout_display_t
*);
91 void CommonManage(vout_display_t
*);
92 int CommonControl(vout_display_t
*, int , va_list );
93 void CommonDisplay(vout_display_t
*);
94 int CommonUpdatePicture(picture_t
*, picture_t
**fallback
, uint8_t *plane
, unsigned pitch
);
96 void UpdateRects (vout_display_t
*,
97 const vout_display_cfg_t
*,
99 void AlignRect(RECT
*, int align_boundary
, int align_size
);
101 picture_pool_t
*CommonPool(vout_display_t
*, unsigned);
103 /*****************************************************************************
105 *****************************************************************************/
106 #define IDM_TOGGLE_ON_TOP WM_USER + 1
107 #define DX_POSITION_CHANGE 0x1000