anything else than zoom=1.0 in Preferences.
Reworked it to always go through InitWindowsize()
enum output_query_e
{
- VOUT_SET_ZOOM, /* arg1= double res= */
+ VOUT_SET_ZOOM,
VOUT_SET_STAY_ON_TOP, /* arg1= vlc_bool_t res= */
VOUT_REPARENT,
VOUT_SNAPSHOT,
{
case VOUT_SET_ZOOM:
{
- double fArg = va_arg( args, double );
-
if( pThis->m_pVout )
{
- // Compute requested vout dimensions
- int width = (int)( pThis->m_pVout->i_window_width * fArg );
- int height = (int)( pThis->m_pVout->i_window_height * fArg );
-
// Post a resize vout command
CmdResizeVout *pCmd =
new CmdResizeVout( pThis->getIntf(), pWindow,
- width, height );
+ pThis->m_pVout->i_window_width,
+ pThis->m_pVout->i_window_height );
AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
pQueue->remove( "resize vout" );
pQueue->push( CmdGenericPtr( pCmd ) );
{
if( !b_auto_size ) break;
- double f_arg = va_arg( args, double );
-
/* Update dimensions */
- wxSizeEvent event( wxSize((int)(p_vout->i_window_width * f_arg),
- (int)(p_vout->i_window_height * f_arg)),
+ wxSizeEvent event( wxSize( p_vout->i_window_width,
+ p_vout->i_window_height ),
UpdateSize_Event );
return vout_ControlWindow( p_vout,
(void *)p_vout->p_sys->hparent, i_query, args );
- f_arg = va_arg( args, double );
-
/* Update dimensions */
rect_window.top = rect_window.left = 0;
- rect_window.right = p_vout->i_window_width * f_arg;
- rect_window.bottom = p_vout->i_window_height * f_arg;
+ rect_window.right = p_vout->i_window_width;
+ rect_window.bottom = p_vout->i_window_height;
AdjustWindowRect( &rect_window, p_vout->p_sys->i_window_style, 0 );
SetWindowPos( p_vout->p_sys->hwnd, 0, 0, 0,
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VOUT );
#ifdef MODULE_NAME_IS_wingapi
- set_shortname( "Windows GAPI" );
+ set_shortname( _("Windows GAPI") );
set_description( _("Windows GAPI video output") );
set_capability( "video output", 20 );
#else
- set_shortname( "Windows GDI" );
+ set_shortname( _("Windows GDI") );
set_description( _("Windows GDI video output") );
set_capability( "video output", 10 );
#endif
return vout_ControlWindow( p_vout,
(void *)p_vout->p_sys->hparent, i_query, args );
- f_arg = va_arg( args, double );
-
/* Update dimensions */
rect_window.top = rect_window.left = 0;
- rect_window.right = p_vout->i_window_width * f_arg;
- rect_window.bottom = p_vout->i_window_height * f_arg;
+ rect_window.right = p_vout->i_window_width;
+ rect_window.bottom = p_vout->i_window_height;
AdjustWindowRect( &rect_window, p_vout->p_sys->i_window_style, 0 );
SetWindowPos( p_vout->p_sys->hwnd, 0, 0, 0,
return vout_ControlWindow( p_vout,
(void *)p_vout->p_sys->p_win->owner_window, i_query, args);
- f_arg = va_arg( args, double );
-
vlc_mutex_lock( &p_vout->p_sys->lock );
/* Update dimensions */
- /* FIXME: export InitWindowSize() from vout core */
XResizeWindow( p_vout->p_sys->p_display,
p_vout->p_sys->p_win->base_window,
- p_vout->i_window_width * f_arg,
- p_vout->i_window_height * f_arg );
+ p_vout->i_window_width,
+ p_vout->i_window_height );
vlc_mutex_unlock( &p_vout->p_sys->lock );
return VLC_SUCCESS;
var_Change( p_vout, "crop", VLC_VAR_DELCHOICE, &val, 0 );
val.psz_string = ""; text.psz_string = _("Default");
var_Change( p_vout, "crop", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = "001:1"; text.psz_string = "1:1";
+ val.psz_string = "001:1"; text.psz_string = _("1:1");
var_Change( p_vout, "crop", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = "004:3"; text.psz_string = "4:3";
+ val.psz_string = "004:3"; text.psz_string = _("4:3");
var_Change( p_vout, "crop", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = "16:9"; text.psz_string = "16:9";
+ val.psz_string = "16:9"; text.psz_string = _("16:9");
var_Change( p_vout, "crop", VLC_VAR_ADDCHOICE, &val, &text );
- val.psz_string = "221:100"; text.psz_string = "221:100";
+ val.psz_string = "221:100"; text.psz_string = _("221:100");
var_Change( p_vout, "crop", VLC_VAR_ADDCHOICE, &val, &text );
var_AddCallback( p_vout, "crop", CropCallback, NULL );
/* Initialize the dimensions of the video window */
InitWindowSize( p_vout, &p_vout->i_window_width,
&p_vout->i_window_height );
- msg_Dbg( p_vout, "window size: %dx%d", p_vout->i_window_width,
- p_vout->i_window_height );
/* Add a variable to indicate if the window should be on top of others */
var_Create( p_vout, "video-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
{
*pi_width = (int)( i_width * ll_zoom / FP_FACTOR );
*pi_height = (int)( i_height * ll_zoom / FP_FACTOR );
- return;
+ goto initwsize_end;
}
else if( i_width > 0 )
{
*pi_height = (int)( p_vout->fmt_in.i_visible_height * ll_zoom *
p_vout->fmt_in.i_sar_den * i_width / p_vout->fmt_in.i_sar_num /
FP_FACTOR / p_vout->fmt_in.i_visible_width );
- return;
+ goto initwsize_end;
}
else if( i_height > 0 )
{
*pi_width = (int)( p_vout->fmt_in.i_visible_width * ll_zoom *
p_vout->fmt_in.i_sar_num * i_height / p_vout->fmt_in.i_sar_den /
FP_FACTOR / p_vout->fmt_in.i_visible_height );
- return;
+ goto initwsize_end;
}
if( p_vout->fmt_in.i_sar_num >= p_vout->fmt_in.i_sar_den )
p_vout->fmt_in.i_sar_den / p_vout->fmt_in.i_sar_num / FP_FACTOR );
}
+initwsize_end:
+ msg_Dbg( p_vout, "window size: %dx%d", p_vout->i_window_width,
+ p_vout->i_window_height );
+
#undef FP_FACTOR
}
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- vout_Control( p_vout, VOUT_SET_ZOOM, newval.f_float );
+ InitWindowSize( p_vout, &p_vout->i_window_width,
+ &p_vout->i_window_height );
+ vout_Control( p_vout, VOUT_SET_ZOOM );
return VLC_SUCCESS;
}