[vlc-devel] commit: OpengGL support for the auto-scaling (Joseph Tulou )
git version control
git at videolan.org
Mon Feb 2 03:50:31 CET 2009
vlc | branch: master | Joseph Tulou <brezhoneg1 at yahoo.fr> | Fri Jan 30 17:30:29 2009 +0100| [f04686fc573553671fa0d1c342087dcf1fb5a3d6] | committer: Jean-Baptiste Kempf
OpengGL support for the auto-scaling
Modifications by /me
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f04686fc573553671fa0d1c342087dcf1fb5a3d6
---
modules/video_output/opengl.c | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 101a0de..c8a1cc0 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -225,12 +225,18 @@ static int CreateVout( vlc_object_t *p_this )
var_Create( p_sys->p_vout, "mouse-button-down", VLC_VAR_INTEGER );
var_Create( p_sys->p_vout, "video-on-top",
VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
+ var_Create( p_sys->p_vout, "autoscale",
+ VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
+ var_Create( p_sys->p_vout, "scale",
+ VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
var_AddCallback( p_sys->p_vout, "mouse-x", SendEvents, p_vout );
var_AddCallback( p_sys->p_vout, "mouse-y", SendEvents, p_vout );
var_AddCallback( p_sys->p_vout, "mouse-moved", SendEvents, p_vout );
var_AddCallback( p_sys->p_vout, "mouse-clicked", SendEvents, p_vout );
var_AddCallback( p_sys->p_vout, "mouse-button-down", SendEvents, p_vout );
+ var_AddCallback( p_vout, "autoscale", SendEvents, p_sys->p_vout );
+ var_AddCallback( p_vout, "scale", SendEvents, p_sys->p_vout );
return VLC_SUCCESS;
}
@@ -455,9 +461,27 @@ static int Manage( vout_thread_t *p_vout )
// to align in real time in OPENGL
if (p_sys->p_vout->i_alignment != p_vout->i_alignment)
{
- p_vout->i_changes = VOUT_CROP_CHANGE; //to force change
+ p_vout->i_changes |= VOUT_CROP_CHANGE; //to force change
p_sys->p_vout->i_alignment = p_vout->i_alignment;
}
+
+ /* forward signal that autoscale toggle has changed */
+ if (p_vout->i_changes & VOUT_SCALE_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_SCALE_CHANGE;
+
+ p_sys->p_vout->i_changes |= VOUT_SCALE_CHANGE;
+ }
+
+ /* forward signal that scale has changed */
+ if (p_vout->i_changes & VOUT_ZOOM_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_ZOOM_CHANGE;
+
+ p_sys->p_vout->i_changes |= VOUT_ZOOM_CHANGE;
+ }
+
+
return i_ret;
}
More information about the vlc-devel
mailing list