-/*****************************************************************************
- * vout_sys_t: GLX video output method descriptor
- *****************************************************************************
- * This structure is part of the video output thread descriptor.
- * It describes the GLX specific properties of an output thread.
- *****************************************************************************/
-struct vout_sys_t
-{
- uint8_t *p_buffer;
- int i_index;
- int i_tex_width;
- int i_tex_height;
- GLuint texture;
- int i_effect; //XXX
-
- glx_t glx;
-};
-
-struct opengl_sys_t
-{
- glx_t glx;
-};
-
-
-#define MWM_HINTS_DECORATIONS (1L << 1)
-#define PROP_MWM_HINTS_ELEMENTS 5
-typedef struct mwmhints_t
-{
- uint32_t flags;
- uint32_t functions;
- uint32_t decorations;
- int32_t input_mode;
- uint32_t status;
-} mwmhints_t;
-
-
-/*****************************************************************************
- * CreateVout: allocates GLX video thread output method
- *****************************************************************************
- * This function allocates and initializes a GLX vout method.
- *****************************************************************************/
-static int CreateVout( vlc_object_t *p_this )
-{
- vout_thread_t *p_vout = (vout_thread_t *)p_this;
-
- /* Allocate structure */
- p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
- if( p_vout->p_sys == NULL )
- {
- msg_Err( p_vout, "out of memory" );
- return( 1 );
- }
-
- //XXX set to 0 to disable the cube effect
- p_vout->p_sys->i_effect = 1;
-
- p_vout->p_sys->glx.i_width = p_vout->i_window_width;
- p_vout->p_sys->glx.i_height = p_vout->i_window_height;
- p_vout->p_sys->glx.b_fullscreen = 0;
-
- /* A texture must have a size aligned on a power of 2 */
- p_vout->p_sys->i_tex_width = GetAlignedSize( p_vout->render.i_width );
- p_vout->p_sys->i_tex_height = GetAlignedSize( p_vout->render.i_height );
-
- msg_Dbg( p_vout, "Texture size: %dx%d", p_vout->p_sys->i_tex_width,
- p_vout->p_sys->i_tex_height );
-
- /* Open and initialize device */
- if( OpenDisplay( p_this, &p_vout->p_sys->glx ) )
- {
- msg_Err( p_vout, "cannot open display" );
- free( p_vout->p_sys );
- return( 1 );
- }
-
- p_vout->pf_init = Init;
- p_vout->pf_end = End;
- p_vout->pf_manage = Manage;
- p_vout->pf_render = Render;
- p_vout->pf_display = DisplayVideo;
-
- return( 0 );
-}
-
-/*****************************************************************************
- * Init: initialize GLX video thread output method
- *****************************************************************************/
-static int Init( vout_thread_t *p_vout )
-{
- int i_pixel_pitch;
-
- /* No YUV textures :( */
-
-#if VLCGL_RGB_FORMAT == GL_RGB
-# if VLCGL_RGB_TYPE == GL_UNSIGNED_BYTE
- p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
- p_vout->output.i_rmask = 0x000000ff;
- p_vout->output.i_gmask = 0x0000ff00;
- p_vout->output.i_bmask = 0x00ff0000;
- i_pixel_pitch = 3;
-# else
- p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
- p_vout->output.i_rmask = 0xf800;
- p_vout->output.i_gmask = 0x07e0;
- p_vout->output.i_bmask = 0x001f;
- i_pixel_pitch = 2;
-# endif
-#else
- p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
- p_vout->output.i_rmask = 0x000000ff;
- p_vout->output.i_gmask = 0x0000ff00;
- p_vout->output.i_bmask = 0x00ff0000;
- i_pixel_pitch = 4;
+ add_string( "glx-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
+ add_integer( "glx-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, VLC_TRUE );
+ add_bool( "glx-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, VLC_TRUE );
+#ifdef HAVE_XINERAMA
+ add_integer ( "glx-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, VLC_TRUE );