]> git.sesse.net Git - vlc/blob - plugins/directx/vout_directx.h
* ALL: the first libvlc commit.
[vlc] / plugins / directx / vout_directx.h
1 /*****************************************************************************
2  * vout_directx.h: Windows DirectX video output header file
3  *****************************************************************************
4  * Copyright (C) 1998, 1999, 2000 VideoLAN
5  * $Id: vout_directx.h,v 1.7 2002/06/01 12:31:58 sam Exp $
6  *
7  * Authors: Gildas Bazin <gbazin@netcourrier.com>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * vout_sys_t: video output DirectX method descriptor
26  *****************************************************************************
27  * This structure is part of the video output thread descriptor.
28  * It describes the DirectX specific properties of an output thread.
29  *****************************************************************************/
30 struct vout_sys_s
31 {
32
33     LPDIRECTDRAW2        p_ddobject;                    /* DirectDraw object */
34     LPDIRECTDRAWSURFACE3 p_display;                        /* Display device */
35     LPDIRECTDRAWSURFACE3 p_current_surface;   /* surface currently displayed */
36     LPDIRECTDRAWCLIPPER  p_clipper;             /* clipper used for blitting */
37     HINSTANCE            hddraw_dll;       /* handle of the opened ddraw dll */
38     HBRUSH               hbrush;           /* window backgound brush (color) */
39     HWND                 hwnd;                  /* Handle of the main window */
40
41     vlc_bool_t   b_using_overlay;         /* Are we using an overlay surface */
42     vlc_bool_t   b_use_sysmem;   /* Should we use system memory for surfaces */
43     vlc_bool_t   b_hw_yuv;    /* Should we use hardware YUV->RGB conversions */
44
45     /* size of the display */
46     RECT         rect_display;
47     int          i_display_depth;
48
49     /* Window position and size */
50     int          i_window_x;
51     int          i_window_y;
52     int          i_window_width;
53     int          i_window_height;
54
55     /* Coordinates of src and dest images (used when blitting to display) */
56     RECT         rect_src;
57     RECT         rect_src_clipped;
58     RECT         rect_dest;
59     RECT         rect_dest_clipped;
60
61     /* DDraw capabilities */
62     int          b_caps_overlay_clipping;
63
64     int          i_rgb_colorkey;      /* colorkey in RGB used by the overlay */
65     int          i_colorkey;                 /* colorkey used by the overlay */
66  
67     volatile u16 i_changes;             /* changes made to the video display */
68
69     /* Mouse */
70     volatile vlc_bool_t b_cursor_hidden;
71     volatile mtime_t    i_lastmoved;
72
73     vlc_thread_t event_thread_id;                            /* event thread */
74     vlc_mutex_t  event_thread_lock;             /* lock for the event thread */
75     vlc_cond_t   event_thread_wait;
76
77     volatile int i_event_thread_status;         /* DirectXEventThread status */
78     volatile vlc_bool_t b_event_thread_die; /* flag to kill the event thread */
79 };
80
81 /*****************************************************************************
82  * picture_sys_t: direct buffer method descriptor
83  *****************************************************************************
84  * This structure is part of the picture descriptor, it describes the
85  * DirectX specific properties of a direct buffer.
86  *****************************************************************************/
87 struct picture_sys_s
88 {
89     LPDIRECTDRAWSURFACE3 p_surface;
90     DDSURFACEDESC        ddsd;
91     LPDIRECTDRAWSURFACE3 p_front_surface;
92 };
93
94 /*****************************************************************************
95  * Prototypes from vout_directx.c
96  *****************************************************************************/
97
98 /*****************************************************************************
99  * Prototypes from vout_events.c
100  *****************************************************************************/
101 void DirectXEventThread ( vout_thread_t *p_vout );
102 void DirectXUpdateOverlay( vout_thread_t *p_vout );
103
104 /*****************************************************************************
105  * Constants
106  *****************************************************************************/
107 #define WM_VLC_HIDE_MOUSE WM_APP