static void DestroyVout ( vlc_object_t * );
static int Init ( vout_thread_t * );
static void End ( vout_thread_t * );
-static void Render ( vout_thread_t *p_vout, picture_t *p_pic );
+static int Manage ( vout_thread_t * );
+static void Render ( vout_thread_t *, picture_t * );
static void DisplayVideo ( vout_thread_t *, picture_t * );
-static inline int GetAlignedSize( int i_size );
+static inline int GetAlignedSize( int );
/*****************************************************************************
* Module descriptor
GLuint texture;
int i_effect; //XXX
-
};
/*****************************************************************************
p_sys->p_vout->i_window_width = p_vout->i_window_width;
p_sys->p_vout->i_window_height = p_vout->i_window_height;
p_sys->p_vout->b_fullscreen = p_vout->b_fullscreen;
+ p_sys->p_vout->render.i_width = p_vout->render.i_width;
+ p_sys->p_vout->render.i_height = p_vout->render.i_height;
+ p_sys->p_vout->render.i_aspect = p_vout->render.i_aspect;
+ p_sys->p_vout->i_window_height = p_vout->i_window_height;
p_sys->p_vout->p_module =
module_Need( p_sys->p_vout, "opengl provider", NULL, 0 );
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;
free( p_sys );
}
+/*****************************************************************************
+ * Manage: handle Sys events
+ *****************************************************************************
+ * This function should be called regularly by video output thread. It returns
+ * a non null value if an error occured.
+ *****************************************************************************/
+static int Manage( vout_thread_t *p_vout )
+{
+ vout_sys_t *p_sys = p_vout->p_sys;
+ return p_sys->p_vout->pf_manage( p_sys->p_vout );
+}
+
/*****************************************************************************
* Render: render previously calculated output
*****************************************************************************/
if( !p_display )
{
msg_Err( p_this, "Cannot open display" );
+ XCloseDisplay( p_display );
return VLC_EGENERIC;
}
if( !XQueryExtension( p_display, "GLX", &i_opcode, &i_evt, &i_err ) )
{
msg_Err( p_this, "GLX extension not supported" );
+ XCloseDisplay( p_display );
return VLC_EGENERIC;
}
if( !glXQueryExtension( p_display, &i_err, &i_evt ) )
{
msg_Err( p_this, "glXQueryExtension failed" );
+ XCloseDisplay( p_display );
return VLC_EGENERIC;
}
if (!glXQueryVersion( p_display, &i_maj, &i_min ) )
{
msg_Err( p_this, "glXQueryVersion failed" );
+ XCloseDisplay( p_display );
return VLC_EGENERIC;
}
if( i_maj <= 0 || ((i_maj == 1) && (i_min < 3)) )
msg_Dbg( p_this, "Using GLX 1.3 API" );
}
+ XCloseDisplay( p_display );
return VLC_SUCCESS;
}