static void FilterAllocationClean( filter_t * );
/* */
-static int FullscreenEventUp( vlc_object_t *, char const *,
- vlc_value_t, vlc_value_t, void * );
static int FullscreenEventDown( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int SplitterPictureNew( video_splitter_t *, picture_t *pp_picture[] );
es_format_Init( &fmt, VIDEO_ES, p_vout->render.i_chroma );
video_format_Setup( &fmt.video, p_vout->render.i_chroma,
p_vout->render.i_width, p_vout->render.i_height,
- p_vout->render.i_aspect );
- if( fmt.video.i_sar_num <= 0 || fmt.video.i_sar_den <= 0 )
- {
- fmt.video.i_sar_num = fmt.video.i_aspect * fmt.video.i_visible_height;
- fmt.video.i_sar_den = VOUT_ASPECT_FACTOR * fmt.video.i_visible_width;
- }
+ p_vout->render.i_aspect * p_vout->render.i_height,
+ VOUT_ASPECT_FACTOR * p_vout->render.i_width );
/* Try to open our real module */
filter_chain_t *p_chain = NULL;
}
}
- /* Attach once pp_vout is completly field to avoid race conditions */
+ /* Attach once pp_vout is completly filed to avoid race conditions */
for( int i = 0; i < p_splitter->i_output; i++ )
vout_filter_SetupChild( p_vout, p_sys->pp_vout[i],
MouseEvent,
- FullscreenEventUp, FullscreenEventDown, true );
+ FullscreenEventDown, true );
/* Restore settings */
var_SetInteger( p_vout, "align", i_org_align );
var_SetInteger( p_vout, "video-x", i_org_x );
else
vout_filter_SetupChild( p_vout, p_sys->pp_vout[i],
MouseEvent,
- FullscreenEventUp, FullscreenEventDown, false );
+ FullscreenEventDown, false );
}
for( int i = 0; i < i_count; i++ )
vlc_mouse_t m;
vlc_mouse_Init( &m );
- m.i_x = var_GetInteger( p_vout_src, "mouse-x" );
- m.i_y = var_GetInteger( p_vout_src, "mouse-y" );
+ var_GetCoords( p_vout_src, "mouse-moved", &m.i_x, &m.i_y );
m.i_pressed = var_GetInteger( p_vout_src, "mouse-button-down" );
vlc_mutex_lock( &p_sys->lock );
if( vlc_mouse_HasMoved( &omouse, &nmouse ) )
{
- var_SetInteger( p_vout, "mouse-x", nmouse.i_x );
- var_SetInteger( p_vout, "mouse-y", nmouse.i_y );
- var_SetBool( p_vout, "mouse-moved", true );
+ var_SetCoords( p_vout, "mouse-moved", nmouse.i_x, nmouse.i_y );
}
if( vlc_mouse_HasButton( &omouse, &nmouse ) )
{
var_SetInteger( p_vout, "mouse-button-down", nmouse.i_pressed );
if( vlc_mouse_HasPressed( &omouse, &nmouse, MOUSE_BUTTON_LEFT ) )
- var_SetBool( p_vout, "mouse-clicked", true );
+ var_SetCoords( p_vout, "mouse-clicked", nmouse.i_x, nmouse.i_y );
}
if( m.b_double_click )
{
{
VLC_UNUSED( p_data );
- p_filter->pf_vout_buffer_new = VideoBufferNew;
- p_filter->pf_vout_buffer_del = VideoBufferDelete;
+ p_filter->pf_video_buffer_new = VideoBufferNew;
+ p_filter->pf_video_buffer_del = VideoBufferDelete;
p_filter->p_owner = p_data;
return VLC_SUCCESS;
}
static void FilterAllocationClean( filter_t *p_filter )
{
- p_filter->pf_vout_buffer_new = NULL;
- p_filter->pf_vout_buffer_del = NULL;
+ p_filter->pf_video_buffer_new = NULL;
+ p_filter->pf_video_buffer_del = NULL;
}
/* -- Splitter callbacks -- */
-/**
- * Forward fullscreen event to/from the childrens.
- *
- * FIXME probably unsafe (pp_vout[] content)
- */
-static bool IsFullscreenActive( vout_thread_t *p_vout )
-{
- vout_sys_t *p_sys = p_vout->p_sys;
- for( int i = 0; i < p_sys->i_vout; i++ )
- {
- if( var_GetBool( p_sys->pp_vout[i], "fullscreen" ) )
- return true;
- }
- return false;
-}
-static int FullscreenEventUp( vlc_object_t *p_this, char const *psz_var,
- vlc_value_t oldval, vlc_value_t newval, void *p_data )
-{
- vout_thread_t *p_vout = p_data;
- VLC_UNUSED(oldval); VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(newval);
-
- const bool b_fullscreen = IsFullscreenActive( p_vout );
- if( !var_GetBool( p_vout, "fullscreen" ) != !b_fullscreen )
- return var_SetBool( p_vout, "fullscreen", b_fullscreen );
- return VLC_SUCCESS;
-}
static int FullscreenEventDown( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
vout_sys_t *p_sys = p_vout->p_sys;
VLC_UNUSED(oldval); VLC_UNUSED(p_data); VLC_UNUSED(psz_var);
- const bool b_fullscreen = IsFullscreenActive( p_vout );
- if( !b_fullscreen != !newval.b_bool )
+ for( int i = 0; i < p_sys->i_vout; i++ )
{
- for( int i = 0; i < p_sys->i_vout; i++ )
- {
- vout_thread_t *p_child = p_sys->pp_vout[i];
- if( !var_GetBool( p_child, "fullscreen" ) != !newval.b_bool )
- {
- var_SetBool( p_child, "fullscreen", newval.b_bool );
- if( newval.b_bool )
- return VLC_SUCCESS;
- }
- }
+ vout_thread_t *p_child = p_sys->pp_vout[i];
+ var_SetBool( p_child, "fullscreen", newval.b_bool );
}
return VLC_SUCCESS;
}