Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vout.h

00001 /*****************************************************************************
00002  * vout.h: Windows DirectX video output header file
00003  *****************************************************************************
00004  * Copyright (C) 2001-2004 the VideoLAN team
00005  * $Id: vout.h 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Gildas Bazin <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 /*****************************************************************************
00025  * event_thread_t: DirectX event thread
00026  *****************************************************************************/
00027 typedef struct event_thread_t
00028 {
00029     VLC_COMMON_MEMBERS
00030 
00031     vout_thread_t * p_vout;
00032 
00033 } event_thread_t;
00034 
00035 /*****************************************************************************
00036  * vout_sys_t: video output DirectX method descriptor
00037  *****************************************************************************
00038  * This structure is part of the video output thread descriptor.
00039  * It describes the DirectX specific properties of an output thread.
00040  *****************************************************************************/
00041 struct vout_sys_t
00042 {
00043     LPDIRECTDRAW2        p_ddobject;                    /* DirectDraw object */
00044     LPDIRECTDRAWSURFACE2 p_display;                        /* Display device */
00045     LPDIRECTDRAWSURFACE2 p_current_surface;   /* surface currently displayed */
00046     LPDIRECTDRAWCLIPPER  p_clipper;             /* clipper used for blitting */
00047     HINSTANCE            hddraw_dll;       /* handle of the opened ddraw dll */
00048 
00049     HWND                 hwnd;                  /* Handle of the main window */
00050     HWND                 hvideownd;        /* Handle of the video sub-window */
00051     HWND                 hparent;             /* Handle of the parent window */
00052     HWND                 hfswnd;          /* Handle of the fullscreen window */
00053     WNDPROC              pf_wndproc;             /* Window handling callback */
00054 
00055     /* Multi-monitor support */
00056     HMONITOR             hmonitor;          /* handle of the current monitor */
00057     GUID                 *p_display_driver;
00058     HMONITOR             (WINAPI* MonitorFromWindow)( HWND, DWORD );
00059     BOOL                 (WINAPI* GetMonitorInfo)( HMONITOR, LPMONITORINFO );
00060 
00061     vlc_bool_t   b_using_overlay;         /* Are we using an overlay surface */
00062     vlc_bool_t   b_use_sysmem;   /* Should we use system memory for surfaces */
00063     vlc_bool_t   b_hw_yuv;    /* Should we use hardware YUV->RGB conversions */
00064     vlc_bool_t   b_3buf_overlay;   /* Should we use triple buffered overlays */
00065 
00066     /* size of the display */
00067     RECT         rect_display;
00068     int          i_display_depth;
00069 
00070     /* Window position and size */
00071     int          i_window_x;
00072     int          i_window_y;
00073     int          i_window_width;
00074     int          i_window_height;
00075     int          i_window_style;
00076 
00077     /* Coordinates of src and dest images (used when blitting to display) */
00078     RECT         rect_src;
00079     RECT         rect_src_clipped;
00080     RECT         rect_dest;
00081     RECT         rect_dest_clipped;
00082     RECT         rect_parent;
00083 
00084     /* Overlay alignment restrictions */
00085     int          i_align_src_boundary;
00086     int          i_align_src_size;
00087     int          i_align_dest_boundary;
00088     int          i_align_dest_size;
00089 
00090     /* DDraw capabilities */
00091     int          b_caps_overlay_clipping;
00092 
00093     int          i_rgb_colorkey;      /* colorkey in RGB used by the overlay */
00094     int          i_colorkey;                 /* colorkey used by the overlay */
00095 
00096     volatile uint16_t i_changes;        /* changes made to the video display */
00097 
00098     /* Mouse */
00099     volatile vlc_bool_t b_cursor_hidden;
00100     volatile mtime_t    i_lastmoved;
00101 
00102     /* Misc */
00103     vlc_bool_t      b_on_top_change;
00104 
00105     vlc_bool_t      b_wallpaper;
00106     COLORREF        color_bkg;
00107     COLORREF        color_bkgtxt;
00108 
00109 #ifdef MODULE_NAME_IS_glwin32
00110     HDC hGLDC;
00111     HGLRC hGLRC;
00112 #endif
00113 
00114     event_thread_t *p_event;
00115     vlc_mutex_t    lock;
00116 };
00117 
00118 /*****************************************************************************
00119  * picture_sys_t: direct buffer method descriptor
00120  *****************************************************************************
00121  * This structure is part of the picture descriptor, it describes the
00122  * DirectX specific properties of a direct buffer.
00123  *****************************************************************************/
00124 struct picture_sys_t
00125 {
00126     LPDIRECTDRAWSURFACE2 p_surface;
00127     DDSURFACEDESC        ddsd;
00128     LPDIRECTDRAWSURFACE2 p_front_surface;
00129 };
00130 
00131 /*****************************************************************************
00132  * Prototypes from vout.c
00133  *****************************************************************************/
00134 int E_(DirectXUpdateOverlay)( vout_thread_t *p_vout );
00135 
00136 /*****************************************************************************
00137  * Prototypes from events.c
00138  *****************************************************************************/
00139 void E_(DirectXEventThread) ( event_thread_t *p_event );
00140 void E_(DirectXUpdateRects) ( vout_thread_t *p_vout, vlc_bool_t b_force );
00141 
00142 /*****************************************************************************
00143  * Constants
00144  *****************************************************************************/
00145 #define WM_VLC_HIDE_MOUSE WM_APP
00146 #define WM_VLC_SHOW_MOUSE WM_APP + 1
00147 #define WM_VLC_CREATE_VIDEO_WIN WM_APP + 2
00148 #define WM_VLC_CHANGE_TEXT WM_APP + 3
00149 #define IDM_TOGGLE_ON_TOP WM_USER + 1
00150 #define DX_POSITION_CHANGE 0x1000
00151 #define DX_WALLPAPER_CHANGE 0x2000
00152 
00153 /*****************************************************************************
00154  * WinCE helpers
00155  *****************************************************************************/
00156 #ifdef UNDER_CE
00157 
00158 #define AdjustWindowRect(a,b,c)
00159 
00160 #ifndef GCL_HBRBACKGROUND
00161 #   define GCL_HBRBACKGROUND (-10)
00162 #endif
00163 
00164 #define FindWindowEx(a,b,c,d) 0
00165 
00166 #define GetWindowPlacement(a,b)
00167 #define SetWindowPlacement(a,b)
00168 typedef struct _WINDOWPLACEMENT {
00169     UINT length;
00170     UINT flags;
00171     UINT showCmd;
00172     POINT ptMinPosition;
00173     POINT ptMaxPosition;
00174     RECT rcNormalPosition;
00175 } WINDOWPLACEMENT;
00176 
00177 #ifndef WM_NCMOUSEMOVE
00178 #   define WM_NCMOUSEMOVE 160
00179 #endif
00180 #ifndef CS_OWNDC
00181 #   define CS_OWNDC 32
00182 #endif
00183 #ifndef SC_SCREENSAVE
00184 #   define SC_SCREENSAVE 0xF140
00185 #endif
00186 #ifndef SC_MONITORPOWER
00187 #   define SC_MONITORPOWER 0xF170
00188 #endif
00189 #ifndef WM_NCPAINT
00190 #   define WM_NCPAINT 133
00191 #endif
00192 #ifndef WS_OVERLAPPEDWINDOW
00193 #   define WS_OVERLAPPEDWINDOW 0xcf0000
00194 #endif
00195 #ifndef WS_EX_NOPARENTNOTIFY
00196 #   define WS_EX_NOPARENTNOTIFY 4
00197 #endif
00198 #ifndef WS_EX_APPWINDOW
00199 #define WS_EX_APPWINDOW 0x40000
00200 #endif
00201 
00202 #define SetWindowLongPtr SetWindowLong
00203 #define GetWindowLongPtr GetWindowLong
00204 #define GWLP_USERDATA GWL_USERDATA
00205 
00206 #endif //UNDER_CE

Generated on Tue Dec 20 10:14:19 2005 for vlc-0.8.4a by  doxygen 1.4.2