[vlc-devel] commit: Vout: autoscaling support for windows (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:46:47 2009 +0100| [48c3f24d72bb7e9b52cf1a83a61ca1ed94b29297] | committer: Jean-Baptiste Kempf
Vout: autoscaling support for windows
Modifications by /me
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48c3f24d72bb7e9b52cf1a83a61ca1ed94b29297
---
modules/video_output/msw/direct3d.c | 22 ++++++++++++++++++++++
modules/video_output/msw/directx.c | 22 ++++++++++++++++++++++
modules/video_output/msw/glwin32.c | 22 ++++++++++++++++++++++
modules/video_output/msw/wingdi.c | 22 ++++++++++++++++++++++
4 files changed, 88 insertions(+), 0 deletions(-)
diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index 5797927..1b15c01 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -456,6 +456,28 @@ static int Manage( vout_thread_t *p_vout )
p_vout->p_sys->i_changes &= ~DX_POSITION_CHANGE;
}
+ /* autoscale toggle */
+ if( p_vout->i_changes & VOUT_SCALE_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_SCALE_CHANGE;
+
+ p_vout->b_autoscale = var_GetBool( p_vout, "autoscale" );
+ p_vout->i_zoom = (int) ZOOM_FP_FACTOR;
+
+ UpdateRects( p_vout, true );
+ }
+
+ /* scaling factor */
+ if( p_vout->i_changes & VOUT_ZOOM_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_ZOOM_CHANGE;
+
+ p_vout->b_autoscale = false;
+ p_vout->i_zoom =
+ (int)( ZOOM_FP_FACTOR * var_GetFloat( p_vout, "scale" ) );
+ UpdateRects( p_vout, true );
+ }
+
/* Check for cropping / aspect changes */
if( p_vout->i_changes & VOUT_CROP_CHANGE ||
p_vout->i_changes & VOUT_ASPECT_CHANGE )
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index a588ad4..737074c 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -602,6 +602,28 @@ static int Manage( vout_thread_t *p_vout )
}
}
+ /* autoscale toggle */
+ if( p_vout->i_changes & VOUT_SCALE_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_SCALE_CHANGE;
+
+ p_vout->b_autoscale = var_GetBool( p_vout, "autoscale" );
+ p_vout->i_zoom = (int) ZOOM_FP_FACTOR;
+
+ UpdateRects( p_vout, true );
+ }
+
+ /* scaling factor */
+ if( p_vout->i_changes & VOUT_ZOOM_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_ZOOM_CHANGE;
+
+ p_vout->b_autoscale = false;
+ p_vout->i_zoom =
+ (int)( ZOOM_FP_FACTOR * var_GetFloat( p_vout, "scale" ) );
+ UpdateRects( p_vout, true );
+ }
+
/* Check for cropping / aspect changes */
if( p_vout->i_changes & VOUT_CROP_CHANGE ||
p_vout->i_changes & VOUT_ASPECT_CHANGE )
diff --git a/modules/video_output/msw/glwin32.c b/modules/video_output/msw/glwin32.c
index 10f6bd8..5248e99 100644
--- a/modules/video_output/msw/glwin32.c
+++ b/modules/video_output/msw/glwin32.c
@@ -305,6 +305,28 @@ static int Manage( vout_thread_t *p_vout )
vlc_mutex_unlock( &p_vout->p_sys->lock );
}
+ /* autoscale toggle */
+ if( p_vout->i_changes & VOUT_SCALE_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_SCALE_CHANGE;
+
+ p_vout->b_autoscale = var_GetBool( p_vout, "autoscale" );
+ p_vout->i_zoom = (int) ZOOM_FP_FACTOR;
+
+ UpdateRects( p_vout, true );
+ }
+
+ /* scaling factor */
+ if( p_vout->i_changes & VOUT_ZOOM_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_ZOOM_CHANGE;
+
+ p_vout->b_autoscale = false;
+ p_vout->i_zoom =
+ (int)( ZOOM_FP_FACTOR * var_GetFloat( p_vout, "scale" ) );
+ UpdateRects( p_vout, true );
+ }
+
/* Check for cropping / aspect changes */
if( p_vout->i_changes & VOUT_CROP_CHANGE ||
p_vout->i_changes & VOUT_ASPECT_CHANGE )
diff --git a/modules/video_output/msw/wingdi.c b/modules/video_output/msw/wingdi.c
index ef41f3f..af58156 100644
--- a/modules/video_output/msw/wingdi.c
+++ b/modules/video_output/msw/wingdi.c
@@ -522,6 +522,28 @@ static int Manage( vout_thread_t *p_vout )
vlc_mutex_unlock( &p_vout->p_sys->lock );
}
+ /* autoscale toggle */
+ if( p_vout->i_changes & VOUT_SCALE_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_SCALE_CHANGE;
+
+ p_vout->b_autoscale = var_GetBool( p_vout, "autoscale" );
+ p_vout->i_zoom = (int) ZOOM_FP_FACTOR;
+
+ UpdateRects( p_vout, true );
+ }
+
+ /* scaling factor */
+ if( p_vout->i_changes & VOUT_ZOOM_CHANGE )
+ {
+ p_vout->i_changes &= ~VOUT_ZOOM_CHANGE;
+
+ p_vout->b_autoscale = false;
+ p_vout->i_zoom =
+ (int)( ZOOM_FP_FACTOR * var_GetFloat( p_vout, "scale" ) );
+ UpdateRects( p_vout, true );
+ }
+
/* Check for cropping / aspect changes */
if( p_vout->i_changes & VOUT_CROP_CHANGE ||
p_vout->i_changes & VOUT_ASPECT_CHANGE )
More information about the vlc-devel
mailing list