1 /*******************************************************************************
2 * video_x11.h: X11 video output display method
4 *******************************************************************************
5 * The X11 method for video output thread. The functions declared here should
6 * not be needed by any other module than video_output.c.
7 *******************************************************************************
12 * <X11/extensions/XShm.h>
18 *******************************************************************************/
20 /*******************************************************************************
21 * vout_x11_t: video output X11 method descriptor
22 *******************************************************************************
23 * This structure is part of the video output thread descriptor.
24 * It describes the X11 specific properties of an output thread. X11 video
25 * output is performed through regular resizable windows. Windows can be
26 * dynamically resized to adapt to the size of the streams.
27 *******************************************************************************/
28 typedef struct vout_x11_s
31 boolean_t b_shm_ext; /* shared memory extension flag */
33 /* Thread configuration - these properties are copied from a video_cfg_t
34 * structure to be used in second step of initialization */
35 char * psz_display; /* display name */
36 char * psz_title; /* window title */
38 /* Internal settings and properties */
39 Display * p_display; /* display pointer */
40 int i_screen; /* screen number */
41 Window window; /* window instance handler */
42 GC gc; /* graphic context instance handler */
44 /* Window manager hints and atoms */
45 Atom wm_protocols; /* WM_PROTOCOLS atom */
46 Atom wm_delete_window; /* WM_DELETE_WINDOW atom */
48 /* Color maps and translation tables - some of those tables are shifted,
49 * see x11.c for more informations. */
50 u8 * trans_16bpp_red; /* red (16 bpp) (SHIFTED !) */
51 u8 * trans_16bpp_green; /* green (16 bpp) (SHIFTED !) */
52 u8 * trans_16bpp_blue; /* blue (16 bpp) (SHIFTED !) */
55 boolean_t b_private_colormap; /* private color map flag */
56 Colormap private_colormap; /* private color map */
58 /* Display buffers and shared memory information */
59 int i_buffer_index; /* buffer index */
60 XImage * p_ximage[2]; /* XImage pointer */
61 XShmSegmentInfo shm_info[2]; /* shared memory zone information */
63 int i_completion_type; /* ?? */
66 /*******************************************************************************
68 *******************************************************************************/
69 int vout_X11AllocOutputMethod ( vout_thread_t *p_vout, video_cfg_t *p_cfg );
70 void vout_X11FreeOutputMethod ( vout_thread_t *p_vout );
71 int vout_X11CreateOutputMethod ( vout_thread_t *p_vout );
72 void vout_X11DestroyOutputMethod ( vout_thread_t *p_vout );
73 int vout_X11ManageOutputMethod ( vout_thread_t *p_vout );
74 void vout_X11DisplayOutput ( vout_thread_t *p_vout );