void vout_IntfInit( vout_thread_t *p_vout )
{
vlc_value_t val, text, old_val;
- vlc_bool_t b_force_par = VLC_FALSE;
+ bool b_force_par = false;
char *psz_buf;
int i;
}
/* update triggered every time the vout's crop parameters are changed */
- var_Create( p_vout, "crop-update", VLC_VAR_VOID );
+ var_Create( p_vout, "crop-update", VLC_VAR_VOID );
/* Add custom crop ratios */
psz_buf = config_GetPsz( p_vout, "custom-crop-ratios" );
msg_Dbg( p_vout, "overriding monitor pixel aspect-ratio: %i:%i",
p_vout->i_par_num, p_vout->i_par_den );
- b_force_par = VLC_TRUE;
+ b_force_par = true;
}
free( val.psz_string );
var_Create( p_vout, "mouse-clicked", VLC_VAR_INTEGER );
var_Create( p_vout, "intf-change", VLC_VAR_BOOL );
- var_SetBool( p_vout, "intf-change", VLC_TRUE );
+ var_SetBool( p_vout, "intf-change", true );
}
/*****************************************************************************
#else
/* XXX: This saves in the data directory. Shouldn't we try saving
* to psz_homedir/Desktop or something nicer ? */
- if( !val.psz_string && p_vout->p_libvlc->psz_datadir )
+ if( !val.psz_string && libvlc_priv (p_vout->p_libvlc)->psz_datadir )
{
if( asprintf( &val.psz_string, "%s",
- p_vout->p_libvlc->psz_datadir ) == -1 )
+ libvlc_priv (p_vout->p_libvlc)->psz_datadir ) == -1 )
val.psz_string = NULL;
}
#endif
}
closedir( path );
- if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE )
+ if( var_GetBool( p_vout, "snapshot-sequential" ) == true )
{
int i_num = var_GetInteger( p_vout, "snapshot-num" );
FILE *p_file;
fmt_out.i_width = var_GetInteger( p_vout, "snapshot-width" );
fmt_out.i_height = var_GetInteger( p_vout, "snapshot-height" );
+ fmt_in = p_vout->fmt_in;
+
if( fmt_out.i_width == 0 && fmt_out.i_height > 0 )
{
- float f = (float)p_vout->fmt_in.i_height / fmt_out.i_height;
- fmt_out.i_width = p_vout->fmt_in.i_width / f;
+ fmt_out.i_width = (fmt_in.i_width * fmt_out.i_height) / fmt_in.i_height;
}
else if( fmt_out.i_height == 0 && fmt_out.i_width > 0 )
{
- float f = (float)p_vout->fmt_in.i_width / fmt_out.i_width;
- fmt_out.i_height = p_vout->fmt_in.i_height / f;
+ fmt_out.i_height = (fmt_in.i_height * fmt_out.i_width) / fmt_in.i_width;
+ }
+ else
+ {
+ fmt_out.i_width = fmt_in.i_width;
+ fmt_out.i_height = fmt_in.i_height;
}
/* Save the snapshot */
- fmt_in = p_vout->fmt_in;
fmt_out.i_sar_num = fmt_out.i_sar_den = 1;
i_ret = image_WriteUrl( p_image, p_pic, &fmt_in, &fmt_out, psz_filename );
if( i_ret != VLC_SUCCESS )
p_subpic->i_channel = 0;
p_subpic->i_start = mdate();
p_subpic->i_stop = mdate() + 4000000;
- p_subpic->b_ephemer = VLC_TRUE;
- p_subpic->b_fade = VLC_TRUE;
+ p_subpic->b_ephemer = true;
+ p_subpic->b_fade = true;
p_subpic->i_original_picture_width = p_vout->render.i_width * 4;
p_subpic->i_original_picture_height = p_vout->render.i_height * 4;
*****************************************************************************/
void vout_EnableFilter( vout_thread_t *p_vout, char *psz_name,
- vlc_bool_t b_add, vlc_bool_t b_setconfig )
+ bool b_add, bool b_setconfig )
{
char *psz_parser;
char *psz_string = config_GetPsz( p_vout, "vout-filter" );
break;
case VOUT_SNAPSHOT:
- p_vout->b_snapshot = VLC_TRUE;
+ p_vout->b_snapshot = true;
return VLC_SUCCESS;
break;
var_Set( p_playlist, "fullscreen", newval );
pl_Release( p_playlist );
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
}