/**@}*/
- /** \name Plugin used and shortcuts to access its capabilities */
- /**@{*/
- int ( *pf_init ) ( vout_thread_t * );
- void ( *pf_end ) ( vout_thread_t * );
- int ( *pf_manage ) ( vout_thread_t * );
- void ( *pf_render ) ( vout_thread_t *, picture_t * );
- void ( *pf_display ) ( vout_thread_t *, picture_t * );
- /**@}*/
-
/** \name Video heap and translation tables */
/**@{*/
int i_heap_size; /**< heap size */
int i;
/* Initialize output method, it allocates direct buffers for us */
- if( p_vout->pf_init( p_vout ) )
+ if( vout_InitWrapper( p_vout ) )
return VLC_EGENERIC;
p_vout->p->p_picture_displayed = NULL;
{
msg_Err( p_vout, "plugin was unable to allocate at least "
"one direct buffer" );
- p_vout->pf_end( p_vout );
+ vout_EndWrapper( p_vout );
return VLC_EGENERIC;
}
{
msg_Err( p_vout, "plugin allocated too many direct buffers, "
"our internal buffers must have overflown." );
- p_vout->pf_end( p_vout );
+ vout_EndWrapper( p_vout );
return VLC_EGENERIC;
}
if( ChromaCreate( p_vout ) )
{
- p_vout->pf_end( p_vout );
+ vout_EndWrapper( p_vout );
return VLC_EGENERIC;
}
/*
* Call the plugin-specific rendering method if there is one
*/
- if( p_filtered_picture != NULL && p_directbuffer != NULL && p_vout->pf_render )
+ if( p_filtered_picture != NULL && p_directbuffer != NULL )
{
/* Render the direct buffer returned by vout_RenderPicture */
- p_vout->pf_render( p_vout, p_directbuffer );
+ vout_RenderWrapper( p_vout, p_directbuffer );
}
/*
if( p_filtered_picture != NULL && p_directbuffer != NULL )
{
/* Display the direct buffer returned by vout_RenderPicture */
- if( p_vout->pf_display )
- p_vout->pf_display( p_vout, p_directbuffer );
+ vout_DisplayWrapper( p_vout, p_directbuffer );
/* Tell the vout this was the last picture and that it does not
* need to be forced anymore. */
/*
* Check events and manage thread
*/
- if( p_vout->pf_manage && p_vout->pf_manage( p_vout ) )
+ if( vout_ManageWrapper( p_vout ) )
{
/* A fatal error occurred, and the thread must terminate
* immediately, without displaying anything - setting b_error to 1
vlc_mutex_lock( &p_vout->picture_lock );
- p_vout->pf_end( p_vout );
+ vout_EndWrapper( p_vout );
p_vout->p->p_picture_displayed = NULL;
for( i = 0; i < I_OUTPUTPICTURES; i++ )
I_OUTPUTPICTURES = 0;
- if( p_vout->pf_init( p_vout ) )
+ if( vout_InitWrapper( p_vout ) )
{
msg_Err( p_vout, "cannot resize display" );
/* FIXME: pf_end will be called again in CleanThread()? */
vlc_mutex_lock( &p_vout->picture_lock );
- p_vout->pf_end( p_vout );
+ vout_EndWrapper( p_vout );
I_OUTPUTPICTURES = I_RENDERPICTURES = 0;
/* Destroy translation tables */
if( !p_vout->b_error )
- p_vout->pf_end( p_vout );
+ vout_EndWrapper( p_vout );
}
/*****************************************************************************
/* */
int vout_OpenWrapper (vout_thread_t *, const char *);
void vout_CloseWrapper(vout_thread_t *);
+int vout_InitWrapper(vout_thread_t *);
+void vout_EndWrapper(vout_thread_t *);
+int vout_ManageWrapper(vout_thread_t *);
+void vout_RenderWrapper(vout_thread_t *, picture_t *);
+void vout_DisplayWrapper(vout_thread_t *, picture_t *);
#endif
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-static int Init (vout_thread_t *);
-static void End (vout_thread_t *);
-static int Manage (vout_thread_t *);
-static void Render (vout_thread_t *, picture_t *);
-static void Display(vout_thread_t *, picture_t *);
-
static void VoutGetDisplayCfg(vout_thread_t *,
vout_display_cfg_t *, const char *title);
#ifdef WIN32
#endif
/* */
- vout->pf_init = Init;
- vout->pf_end = End;
- vout->pf_manage = Manage;
- vout->pf_render = Render;
- vout->pf_display = Display;
vout->p_sys = sys;
return VLC_SUCCESS;
/*****************************************************************************
*
*****************************************************************************/
-static int Init(vout_thread_t *vout)
+int vout_InitWrapper(vout_thread_t *vout)
{
vout_sys_t *sys = vout->p_sys;
vout_display_t *vd = sys->vd;
/*****************************************************************************
*
*****************************************************************************/
-static void End(vout_thread_t *vout)
+void vout_EndWrapper(vout_thread_t *vout)
{
vout_sys_t *sys = vout->p_sys;
/*****************************************************************************
*
*****************************************************************************/
-static int Manage(vout_thread_t *vout)
+int vout_ManageWrapper(vout_thread_t *vout)
{
vout_sys_t *sys = vout->p_sys;
vout_display_t *vd = sys->vd;
/*****************************************************************************
* Render
*****************************************************************************/
-static void Render(vout_thread_t *vout, picture_t *picture)
+void vout_RenderWrapper(vout_thread_t *vout, picture_t *picture)
{
vout_sys_t *sys = vout->p_sys;
vout_display_t *vd = sys->vd;
/*****************************************************************************
*
*****************************************************************************/
-static void Display(vout_thread_t *vout, picture_t *picture)
+void vout_DisplayWrapper(vout_thread_t *vout, picture_t *picture)
{
vout_sys_t *sys = vout->p_sys;
vout_display_t *vd = sys->vd;