Commit 92993d58 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/video_output.c, modules/video_output/directx/*, modules/video_output/x11/xcommon.c: fullscreen state is now attached to the input, so it will be remembered even if the vout is restarted (switching filters, dvd menus, etc...).
* modules/video_filter/deinterlace/deinterlace.c: small change.
parent 52e60413
......@@ -2,7 +2,7 @@
* deinterlace.c : deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
* $Id: deinterlace.c,v 1.13 2003/05/24 23:40:11 gbazin Exp $
* $Id: deinterlace.c,v 1.14 2003/05/25 11:31:54 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -137,8 +137,7 @@ static int Create( vlc_object_t *p_this )
/* Look what method was requested */
var_Create( p_vout, "deinterlace-mode", VLC_VAR_STRING );
var_Change( p_vout, "deinterlace-mode", VLC_VAR_INHERITVALUE, NULL, NULL );
var_Get( p_vout, "deinterlace-mode", &val );
var_Change( p_vout, "deinterlace-mode", VLC_VAR_INHERITVALUE, &val, NULL );
if( val.psz_string == NULL )
{
......
......@@ -2,7 +2,7 @@
* vout.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: directx.c,v 1.20 2003/05/21 13:27:25 gbazin Exp $
* $Id: directx.c,v 1.21 2003/05/25 11:31:54 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -458,12 +458,12 @@ static int Manage( vout_thread_t *p_vout )
SetWindowPlacement( p_vout->p_sys->hwnd, &window_placement );
/* Update the object variable and trigger callback */
val.b_bool = p_vout->b_fullscreen;
var_Set( p_vout, "fullscreen", val );
p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
p_vout->p_sys->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
/* Update the object variable without triggering a callback */
val.b_bool = p_vout->b_fullscreen;
var_Change( p_vout, "fullscreen", VLC_VAR_SETVALUE, &val, NULL );
}
/*
......
......@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.15 2003/05/05 16:09:38 gbazin Exp $
* $Id: xcommon.c,v 1.16 2003/05/25 11:31:54 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -774,6 +774,12 @@ static int ManageVideo( vout_thread_t *p_vout )
*/
if ( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
{
vlc_value_t val;
/* Update the object variable and trigger callback */
val.b_bool = !p_vout->b_fullscreen;
var_Set( p_vout, "fullscreen", val );
ToggleFullScreen( p_vout );
p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
}
......
......@@ -2,7 +2,7 @@
* variables.c: routines for object variables handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: variables.c,v 1.25 2003/05/24 23:40:11 gbazin Exp $
* $Id: variables.c,v 1.26 2003/05/25 11:31:54 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -567,6 +567,12 @@ int __var_Change( vlc_object_t *p_this, const char *psz_name,
/* Free data if needed */
p_var->pf_free( &oldval );
}
if( p_val )
{
*p_val = p_var->val;
p_var->pf_dup( p_val );
}
}
break;
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.224 2003/05/24 23:40:11 gbazin Exp $
* $Id: video_output.c,v 1.225 2003/05/25 11:31:54 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -354,12 +354,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent,
var_Create( p_vout, "mouse-clicked", VLC_VAR_INTEGER );
var_Create( p_vout, "key-pressed", VLC_VAR_STRING );
/* user requested fullscreen? */
if( config_GetInt( p_vout, "fullscreen" ) )
{
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
}
/* Initialize the dimensions of the video window */
InitWindowSize( p_vout, &p_vout->i_window_width,
&p_vout->i_window_height );
......@@ -389,6 +383,12 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent,
var_Create( p_vout, "fullscreen", VLC_VAR_BOOL );
text.psz_string = _("Fullscreen");
var_Change( p_vout, "fullscreen", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "fullscreen", VLC_VAR_INHERITVALUE, &val, NULL );
if( val.b_bool )
{
/* user requested fullscreen */
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
}
var_AddCallback( p_vout, "fullscreen", FullscreenCallback, NULL );
var_Create( p_vout, "deinterlace", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
......@@ -1191,8 +1191,22 @@ static int FullscreenCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
input_thread_t *p_input;
vlc_value_t val;
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT,
FIND_PARENT );
if( p_input )
{
/* Modify input as well because the vout might have to be restarted */
var_Create( p_input, "fullscreen", VLC_VAR_BOOL );
var_Set( p_input, "fullscreen", newval );
vlc_object_release( p_input );
}
val.b_bool = VLC_TRUE;
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment