~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to modules/video_output/msw/vout.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * vout.h: Windows video output header file
 
3
 *****************************************************************************
 
4
 * Copyright (C) 2001-2004 the VideoLAN team
 
5
 * $Id: 52bf8169cdb6c3828e1ee088e645ae24628a4220 $
 
6
 *
 
7
 * Authors: Gildas Bazin <gbazin@videolan.org>
 
8
 *          Damien Fouilleul <damienf@videolan.org>
 
9
 *
 
10
 * This program is free software; you can redistribute it and/or modify
 
11
 * it under the terms of the GNU General Public License as published by
 
12
 * the Free Software Foundation; either version 2 of the License, or
 
13
 * (at your option) any later version.
 
14
 *
 
15
 * This program is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 * GNU General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU General Public License
 
21
 * along with this program; if not, write to the Free Software
 
22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
23
 *****************************************************************************/
 
24
 
 
25
/*****************************************************************************
 
26
 * event_thread_t: event thread
 
27
 *****************************************************************************/
 
28
typedef struct event_thread_t
 
29
{
 
30
    VLC_COMMON_MEMBERS
 
31
 
 
32
    vout_thread_t * p_vout;
 
33
 
 
34
} event_thread_t;
 
35
 
 
36
/*****************************************************************************
 
37
 * vout_sys_t: video output method descriptor
 
38
 *****************************************************************************
 
39
 * This structure is part of the video output thread descriptor.
 
40
 * It describes the module specific properties of an output thread.
 
41
 *****************************************************************************/
 
42
struct vout_sys_t
 
43
{
 
44
    HWND                 hwnd;                  /* Handle of the main window */
 
45
    HWND                 hvideownd;        /* Handle of the video sub-window */
 
46
    HWND                 hparent;             /* Handle of the parent window */
 
47
    HWND                 hfswnd;          /* Handle of the fullscreen window */
 
48
    WNDPROC              pf_wndproc;             /* Window handling callback */
 
49
 
 
50
    /* Multi-monitor support */
 
51
    HMONITOR             hmonitor;          /* handle of the current monitor */
 
52
    GUID                 *p_display_driver;
 
53
    HMONITOR             (WINAPI* MonitorFromWindow)( HWND, DWORD );
 
54
    BOOL                 (WINAPI* GetMonitorInfo)( HMONITOR, LPMONITORINFO );
 
55
 
 
56
    /* size of the display */
 
57
    RECT         rect_display;
 
58
    int          i_display_depth;
 
59
 
 
60
    /* size of the overall window (including black bands) */
 
61
    RECT         rect_parent;
 
62
 
 
63
    /* Window position and size */
 
64
    int          i_window_x;
 
65
    int          i_window_y;
 
66
    int          i_window_width;
 
67
    int          i_window_height;
 
68
    int          i_window_style;
 
69
 
 
70
    volatile uint16_t i_changes;        /* changes made to the video display */
 
71
 
 
72
    /* Mouse */
 
73
    volatile bool b_cursor_hidden;
 
74
    volatile mtime_t    i_lastmoved;
 
75
    mtime_t             i_mouse_hide_timeout;
 
76
 
 
77
    /* Misc */
 
78
    bool      b_on_top_change;
 
79
 
 
80
#ifndef UNDER_CE
 
81
 
 
82
    /* screensaver system settings to be restored when vout is closed */
 
83
    UINT i_spi_lowpowertimeout;
 
84
    UINT i_spi_powerofftimeout;
 
85
    UINT i_spi_screensavetimeout;
 
86
 
 
87
#endif
 
88
 
 
89
    /* Coordinates of src and dest images (used when blitting to display) */
 
90
    RECT         rect_src;
 
91
    RECT         rect_src_clipped;
 
92
    RECT         rect_dest;
 
93
    RECT         rect_dest_clipped;
 
94
 
 
95
    bool   b_hw_yuv;    /* Should we use hardware YUV->RGB conversions */
 
96
 
 
97
 
 
98
#ifdef MODULE_NAME_IS_vout_directx
 
99
    /* Overlay alignment restrictions */
 
100
    int          i_align_src_boundary;
 
101
    int          i_align_src_size;
 
102
    int          i_align_dest_boundary;
 
103
    int          i_align_dest_size;
 
104
 
 
105
    bool      b_wallpaper;    /* show as desktop wallpaper ? */
 
106
 
 
107
    bool   b_using_overlay;         /* Are we using an overlay surface */
 
108
    bool   b_use_sysmem;   /* Should we use system memory for surfaces */
 
109
    bool   b_3buf_overlay;   /* Should we use triple buffered overlays */
 
110
 
 
111
    /* DDraw capabilities */
 
112
    int          b_caps_overlay_clipping;
 
113
 
 
114
    int          i_rgb_colorkey;      /* colorkey in RGB used by the overlay */
 
115
    int          i_colorkey;                 /* colorkey used by the overlay */
 
116
 
 
117
    COLORREF        color_bkg;
 
118
    COLORREF        color_bkgtxt;
 
119
 
 
120
    LPDIRECTDRAW2        p_ddobject;                    /* DirectDraw object */
 
121
    LPDIRECTDRAWSURFACE2 p_display;                        /* Display device */
 
122
    LPDIRECTDRAWSURFACE2 p_current_surface;   /* surface currently displayed */
 
123
    LPDIRECTDRAWCLIPPER  p_clipper;             /* clipper used for blitting */
 
124
    HINSTANCE            hddraw_dll;       /* handle of the opened ddraw dll */
 
125
#endif
 
126
 
 
127
#ifdef MODULE_NAME_IS_glwin32
 
128
    HDC hGLDC;
 
129
    HGLRC hGLRC;
 
130
#endif
 
131
 
 
132
#ifdef MODULE_NAME_IS_direct3d
 
133
    // core objects
 
134
    HINSTANCE               hd3d9_dll;       /* handle of the opened d3d9 dll */
 
135
    LPDIRECT3D9             p_d3dobj;
 
136
    LPDIRECT3DDEVICE9       p_d3ddev;
 
137
    D3DFORMAT               bbFormat;
 
138
    // scene objects
 
139
    LPDIRECT3DTEXTURE9      p_d3dtex;
 
140
    LPDIRECT3DVERTEXBUFFER9 p_d3dvtc;
 
141
#endif
 
142
 
 
143
#ifdef MODULE_NAME_IS_wingdi
 
144
 
 
145
    int  i_depth;
 
146
 
 
147
    /* Our offscreen bitmap and its framebuffer */
 
148
    HDC        off_dc;
 
149
    HBITMAP    off_bitmap;
 
150
    uint8_t *  p_pic_buffer;
 
151
    int        i_pic_pitch;
 
152
    int        i_pic_pixel_pitch;
 
153
 
 
154
    BITMAPINFO bitmapinfo;
 
155
    RGBQUAD    red;
 
156
    RGBQUAD    green;
 
157
    RGBQUAD    blue;
 
158
#endif
 
159
 
 
160
#ifdef MODULE_NAME_IS_wingapi
 
161
    int        i_depth;
 
162
    int        render_width;
 
163
    int        render_height;
 
164
 
 
165
    bool b_focus;
 
166
    bool b_parent_focus;
 
167
 
 
168
    HINSTANCE  gapi_dll;                    /* handle of the opened gapi dll */
 
169
 
 
170
    /* GAPI functions */
 
171
    int (*GXOpenDisplay)( HWND hWnd, DWORD dwFlags );
 
172
    int (*GXCloseDisplay)();
 
173
    void *(*GXBeginDraw)();
 
174
    int (*GXEndDraw)();
 
175
    GXDisplayProperties (*GXGetDisplayProperties)();
 
176
    int (*GXSuspend)();
 
177
    int (*GXResume)();
 
178
#endif
 
179
 
 
180
#ifndef UNDER_CE
 
181
    /* suspend display */
 
182
    bool   b_suspend_display;
 
183
#endif
 
184
 
 
185
    event_thread_t *p_event;
 
186
    vlc_mutex_t    lock;
 
187
};
 
188
 
 
189
/*****************************************************************************
 
190
 * Prototypes from directx.c
 
191
 *****************************************************************************/
 
192
int DirectDrawUpdateOverlay( vout_thread_t *p_vout );
 
193
 
 
194
/*****************************************************************************
 
195
 * Prototypes from events.c
 
196
 *****************************************************************************/
 
197
void* EventThread ( vlc_object_t *p_this );
 
198
void UpdateRects ( vout_thread_t *p_vout, bool b_force );
 
199
void Win32ToggleFullscreen ( vout_thread_t *p_vout );
 
200
 
 
201
/*****************************************************************************
 
202
 * Constants
 
203
 *****************************************************************************/
 
204
#define WM_VLC_HIDE_MOUSE WM_APP
 
205
#define WM_VLC_SHOW_MOUSE WM_APP + 1
 
206
#define WM_VLC_CHANGE_TEXT WM_APP + 2
 
207
#define IDM_TOGGLE_ON_TOP WM_USER + 1
 
208
#define DX_POSITION_CHANGE 0x1000
 
209
#define DX_WALLPAPER_CHANGE 0x2000
 
210
 
 
211
/*****************************************************************************
 
212
 * WinCE helpers
 
213
 *****************************************************************************/
 
214
#ifdef UNDER_CE
 
215
 
 
216
#define AdjustWindowRect(a,b,c)
 
217
 
 
218
#ifndef GCL_HBRBACKGROUND
 
219
#   define GCL_HBRBACKGROUND (-10)
 
220
#endif
 
221
 
 
222
#define FindWindowEx(a,b,c,d) 0
 
223
 
 
224
#define GetWindowPlacement(a,b)
 
225
#define SetWindowPlacement(a,b)
 
226
typedef struct _WINDOWPLACEMENT {
 
227
    UINT length;
 
228
    UINT flags;
 
229
    UINT showCmd;
 
230
    POINT ptMinPosition;
 
231
    POINT ptMaxPosition;
 
232
    RECT rcNormalPosition;
 
233
} WINDOWPLACEMENT;
 
234
 
 
235
#ifndef WM_NCMOUSEMOVE
 
236
#   define WM_NCMOUSEMOVE 160
 
237
#endif
 
238
#ifndef CS_OWNDC
 
239
#   define CS_OWNDC 32
 
240
#endif
 
241
#ifndef SC_SCREENSAVE
 
242
#   define SC_SCREENSAVE 0xF140
 
243
#endif
 
244
#ifndef SC_MONITORPOWER
 
245
#   define SC_MONITORPOWER 0xF170
 
246
#endif
 
247
#ifndef WM_NCPAINT
 
248
#   define WM_NCPAINT 133
 
249
#endif
 
250
#ifndef WS_OVERLAPPEDWINDOW
 
251
#   define WS_OVERLAPPEDWINDOW 0xcf0000
 
252
#endif
 
253
#ifndef WS_EX_NOPARENTNOTIFY
 
254
#   define WS_EX_NOPARENTNOTIFY 4
 
255
#endif
 
256
#ifndef WS_EX_APPWINDOW
 
257
#define WS_EX_APPWINDOW 0x40000
 
258
#endif
 
259
 
 
260
#define SetWindowLongPtr SetWindowLong
 
261
#define GetWindowLongPtr GetWindowLong
 
262
#define GWLP_USERDATA GWL_USERDATA
 
263
 
 
264
#endif //UNDER_CE