-}
-
-/*****************************************************************************
- * RemoveAllVout: destroy all the child video output threads
- *****************************************************************************/
-static void RemoveAllVout( vout_thread_t *p_vout )
-{
- while( p_vout->p_sys->i_vout )
- {
- --p_vout->p_sys->i_vout;
- if( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].b_active )
- {
- DEL_CALLBACKS(
- p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout,
- SendEvents );
- vout_Destroy( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
- }
- }
-}
-
-/*****************************************************************************
- * SendEvents: forward mouse and keyboard events to the parent p_vout
- *****************************************************************************/
-static int SendEvents( vlc_object_t *p_this, char const *psz_var,
- vlc_value_t oldval, vlc_value_t newval, void *_p_vout )
-{
- VLC_UNUSED(oldval);
- vout_thread_t *p_vout = (vout_thread_t *)_p_vout;
- int i_vout;
- vlc_value_t sentval = newval;
-
- /* Find the video output index */
- for( i_vout = 0; i_vout < p_vout->p_sys->i_vout; i_vout++ )
- {
- if( p_this == (vlc_object_t *)p_vout->p_sys->pp_vout[ i_vout ].p_vout )
- {
- break;
- }
- }
-
- if( i_vout == p_vout->p_sys->i_vout )
- {
- return VLC_EGENERIC;
- }
-
- /* Translate the mouse coordinates */
- if( !strcmp( psz_var, "mouse-x" ) )
- {
- sentval.i_int += p_vout->output.i_width
- * (i_vout % p_vout->p_sys->i_col)
- / p_vout->p_sys->i_col;
- }
- else if( !strcmp( psz_var, "mouse-y" ) )
- {
- sentval.i_int += p_vout->output.i_height
- * (i_vout / p_vout->p_sys->i_row)
- / p_vout->p_sys->i_row;
- }
-
- var_Set( p_vout, psz_var, sentval );