The memory usage is already there anyway. However, this increases the
code size a little, especially on 32-bits platforms.
N.B.: helper getter functions are still 32-bits until further change.
So are configuration items.
22 files changed:
bool b_bool;
float f_float;
char * psz_string;
bool b_bool;
float f_float;
char * psz_string;
* \param psz_name The name of the variable
* \param i The new integer value of this variable
*/
* \param psz_name The name of the variable
* \param i The new integer value of this variable
*/
-static inline int var_SetInteger( vlc_object_t *p_obj, const char *psz_name, int i )
+static inline int var_SetInteger( vlc_object_t *p_obj, const char *psz_name,
+ int64_t i )
{
vlc_value_t val;
val.i_int = i;
{
vlc_value_t val;
val.i_int = i;
else if( val.i_int != AOUT_VAR_SPDIF )
{
/* This should not happen ! */
else if( val.i_int != AOUT_VAR_SPDIF )
{
/* This should not happen ! */
- msg_Err( p_aout, "internal: can't find audio-device (%i)", val.i_int );
+ msg_Err( p_aout, "internal: can't find audio-device (%"PRId64")",
+ val.i_int );
free( p_sys );
free( psz_device );
return VLC_EGENERIC;
free( p_sys );
free( psz_device );
return VLC_EGENERIC;
{
aout_instance_t *p_aout = (aout_instance_t *)p_this;
var_Set( p_aout->p_libvlc, "macosx-audio-device", new_val );
{
aout_instance_t *p_aout = (aout_instance_t *)p_this;
var_Set( p_aout->p_libvlc, "macosx-audio-device", new_val );
- msg_Dbg( p_aout, "Set Device: %#x", new_val.i_int );
+ msg_Dbg( p_aout, "Set Device: %#"PRIx64, new_val.i_int );
return aout_ChannelsRestart( p_this, psz_variable, old_val, new_val, param );
}
return aout_ChannelsRestart( p_this, psz_variable, old_val, new_val, param );
}
else
{
/* This should not happen ! */
else
{
/* This should not happen ! */
- msg_Err( p_aout, "internal: can't find audio-device (%i)", val.i_int );
+ msg_Err( p_aout, "internal: can't find audio-device (%"PRId64")",
+ val.i_int );
close( p_sys->i_fd );
free( p_sys );
return VLC_EGENERIC;
close( p_sys->i_fd );
free( p_sys );
return VLC_EGENERIC;
for( i = 0; i < val_list.p_list->i_count; i++ )
{
for( i = 0; i < val_list.p_list->i_count; i++ )
{
mvar_t *itm;
switch( i_type & VLC_VAR_TYPE )
mvar_t *itm;
switch( i_type & VLC_VAR_TYPE )
case VLC_VAR_INTEGER:
itm = mvar_New( name, "set" );
mvar_AppendNewVar( itm, "name", text_list.p_list->p_values[i].psz_string );
case VLC_VAR_INTEGER:
itm = mvar_New( name, "set" );
mvar_AppendNewVar( itm, "name", text_list.p_list->p_values[i].psz_string );
- snprintf( psz_int, sizeof(psz_int), "%d",
+ snprintf( psz_int, sizeof(psz_int), "%"PRId64,
val_list.p_list->p_values[i].i_int );
mvar_AppendNewVar( itm, "id", psz_int );
snprintf( psz_int, sizeof(psz_int), "%d",
val_list.p_list->p_values[i].i_int );
mvar_AppendNewVar( itm, "id", psz_int );
snprintf( psz_int, sizeof(psz_int), "%d",
for ( i = 0; i < val.p_list->i_count; i++ )
{
if ( i_value == val.p_list->p_values[i].i_int )
for ( i = 0; i < val.p_list->i_count; i++ )
{
if ( i_value == val.p_list->p_values[i].i_int )
- msg_rc( "| %i - %s *", val.p_list->p_values[i].i_int,
+ msg_rc( "| %"PRId64" - %s *",
+ val.p_list->p_values[i].i_int,
text.p_list->p_values[i].psz_string );
else
text.p_list->p_values[i].psz_string );
else
- msg_rc( "| %i - %s", val.p_list->p_values[i].i_int,
+ msg_rc( "| %"PRId64" - %s",
+ val.p_list->p_values[i].i_int,
text.p_list->p_values[i].psz_string );
}
var_FreeList( &val, &text );
text.p_list->p_values[i].psz_string );
}
var_FreeList( &val, &text );
for ( i = 0; i < val.p_list->i_count; i++ )
{
if ( i_value == val.p_list->p_values[i].i_int )
for ( i = 0; i < val.p_list->i_count; i++ )
{
if ( i_value == val.p_list->p_values[i].i_int )
- msg_rc( "| %i - %s *", val.p_list->p_values[i].i_int,
+ msg_rc( "| %"PRId64" - %s *", val.p_list->p_values[i].i_int,
text.p_list->p_values[i].psz_string );
else
text.p_list->p_values[i].psz_string );
else
- msg_rc( "| %i - %s", val.p_list->p_values[i].i_int,
+ msg_rc( "| %"PRId64" - %s", val.p_list->p_values[i].i_int,
text.p_list->p_values[i].psz_string );
}
var_FreeList( &val, &text );
text.p_list->p_values[i].psz_string );
}
var_FreeList( &val, &text );
case VLC_VAR_INTEGER:
var_Get( p_object, psz_var, &val );
if( CURTEXT ) menutext = CURTEXT;
case VLC_VAR_INTEGER:
var_Get( p_object, psz_var, &val );
if( CURTEXT ) menutext = CURTEXT;
- else snprintf( menutext, sizeof(string)-1, "%d", CURVAL.i_int );
+ else snprintf( menutext, sizeof(string)-1, "%"PRId64, CURVAL.i_int );
CreateAndConnect( p_intf, submenu, psz_var, menutext, "",
ITEM_RADIO, p_object, CURVAL, i_type,
( CURVAL.i_int == val.i_int )
CreateAndConnect( p_intf, submenu, psz_var, menutext, "",
ITEM_RADIO, p_object, CURVAL, i_type,
( CURVAL.i_int == val.i_int )
o_title = text_list.p_list->p_values[i].psz_string ?
[[VLCMain sharedInstance] localizedString: text_list.p_list->p_values[i].psz_string] :
o_title = text_list.p_list->p_values[i].psz_string ?
[[VLCMain sharedInstance] localizedString: text_list.p_list->p_values[i].psz_string] :
- [NSString stringWithFormat: @"%d",
+ [NSString stringWithFormat: @"%"PRId64,
val_list.p_list->p_values[i].i_int];
o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
val_list.p_list->p_values[i].i_int];
o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
vlc_value_t val;
vout_thread_t *p_vout = (vout_thread_t *)p_this;
vlc_value_t val;
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- msg_Dbg( p_vout, "set %d", new_val.i_int );
+ msg_Dbg( p_vout, "set %"PRId64, new_val.i_int );
var_Create( p_vout->p_libvlc, "video-device", VLC_VAR_INTEGER );
var_Set( p_vout->p_libvlc, "video-device", new_val );
var_Create( p_vout->p_libvlc, "video-device", VLC_VAR_INTEGER );
var_Set( p_vout->p_libvlc, "video-device", new_val );
{
int i_title_count = var_CountChoices( p_input, "title" );
if( i_title_count > 0 )
{
int i_title_count = var_CountChoices( p_input, "title" );
if( i_title_count > 0 )
- mvnprintw( y++, 0, COLS, _(" Title : %d/%d"), val.i_int, i_title_count );
+ mvnprintw( y++, 0, COLS, _(" Title : %"PRId64"/%d"),
+ val.i_int, i_title_count );
{
int i_chapter_count = var_CountChoices( p_input, "chapter" );
if( i_chapter_count > 0 )
{
int i_chapter_count = var_CountChoices( p_input, "chapter" );
if( i_chapter_count > 0 )
- mvnprintw( y++, 0, COLS, _(" Chapter : %d/%d"), val.i_int, i_chapter_count );
+ mvnprintw( y++, 0, COLS, _(" Chapter : %"PRId64"/%d"),
+ val.i_int, i_chapter_count );
else if( lineedit )
{
char str[30];
else if( lineedit )
{
char str[30];
- snprintf( str, sizeof(str), "%06X", val.i_int );
+ snprintf( str, sizeof(str), "%06"PRIX64, val.i_int );
lineedit->setText( str );
}
else if( combobox ) combobox->setCurrentIndex(
lineedit->setText( str );
}
else if( combobox ) combobox->setCurrentIndex(
const char *psz_var = text.p_list->p_values[i].psz_string;
var_Change( p_obj, psz_var, VLC_VAR_GETTEXT, &name, NULL );
const char *psz_label = name.psz_string;
const char *psz_var = text.p_list->p_values[i].psz_string;
var_Change( p_obj, psz_var, VLC_VAR_GETTEXT, &name, NULL );
const char *psz_label = name.psz_string;
- msg_Dbg( p_intf, "v4l2 control \"%x\": %s (%s)",
+ msg_Dbg( p_intf, "v4l2 control \"%"PRIx64"\": %s (%s)",
val.p_list->p_values[i].i_int, psz_var, name.psz_string );
int i_type = var_Type( p_obj, psz_var );
val.p_list->p_values[i].i_int, psz_var, name.psz_string );
int i_type = var_Type( p_obj, psz_var );
if( val.i_int > 0 )
{
emit titleChanged( true );
if( val.i_int > 0 )
{
emit titleChanged( true );
- msg_Dbg( p_intf, "Title %i", val.i_int );
+ msg_Dbg( p_intf, "Title %"PRId64, val.i_int );
/* p_input != NULL since val.i_int != 0 */
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
emit chapterChanged( (val2.i_int > 1) || ( val2.i_int > 0 && val.i_int > 1 ) );
/* p_input != NULL since val.i_int != 0 */
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
emit chapterChanged( (val2.i_int > 1) || ( val2.i_int > 0 && val.i_int > 1 ) );
- msg_Dbg( p_intf, "Chapter: %i", val2.i_int );
+ msg_Dbg( p_intf, "Chapter: %"PRId64, val2.i_int );
}
else
emit titleChanged( false );
}
else
emit titleChanged( false );
var_Get( p_mux, SOUT_CFG_PREFIX "csa-pkt", &pkt_val );
if( pkt_val.i_int < 12 || pkt_val.i_int > 188 )
{
var_Get( p_mux, SOUT_CFG_PREFIX "csa-pkt", &pkt_val );
if( pkt_val.i_int < 12 || pkt_val.i_int > 188 )
{
- msg_Err( p_mux, "wrong packet size %d specified.", pkt_val.i_int );
+ msg_Err( p_mux, "wrong packet size %"PRId64" specified.",
+ pkt_val.i_int );
msg_Warn( p_mux, "using default packet size of 188 bytes" );
p_sys->i_csa_pkt_size = 188;
}
msg_Warn( p_mux, "using default packet size of 188 bytes" );
p_sys->i_csa_pkt_size = 188;
}
- msg_Dbg(p_filter, "apply AtmoSettingsCallback %s (int: %d -> %d)",
+ msg_Dbg(p_filter, "apply AtmoSettingsCallback %s (int: %"PRId64" -> %"PRId64")",
psz_var,
oldval.i_int,
newval.i_int
psz_var,
oldval.i_int,
newval.i_int
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing alpha from %d/255 to %d/255",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing alpha from %d/255 to %d/255",
- p_sys->i_alpha, newval.i_int);
+ p_sys->i_alpha, (int)newval.i_int);
p_sys->i_alpha = __MIN( __MAX( newval.i_int, 0 ), 255 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_alpha = __MIN( __MAX( newval.i_int, 0 ), 255 );
vlc_mutex_unlock( &p_sys->lock );
}
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing height from %dpx to %dpx",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing height from %dpx to %dpx",
- p_sys->i_height, newval.i_int );
+ p_sys->i_height, (int)newval.i_int );
p_sys->i_height = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_height = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing width from %dpx to %dpx",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing width from %dpx to %dpx",
- p_sys->i_width, newval.i_int );
+ p_sys->i_width, (int)newval.i_int );
p_sys->i_width = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
else if( VAR_IS( "xoffset" ) )
{
vlc_mutex_lock( &p_sys->lock );
p_sys->i_width = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
else if( VAR_IS( "xoffset" ) )
{
vlc_mutex_lock( &p_sys->lock );
- msg_Dbg( p_this, "changing x offset from %dpx to %dpx",
- p_sys->i_xoffset, newval.i_int );
+ msg_Dbg( p_this, "changing x offset from %dpx to %px",
+ p_sys->i_xoffset, (int)newval.i_int );
p_sys->i_xoffset = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_xoffset = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing y offset from %dpx to %dpx",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing y offset from %dpx to %dpx",
- p_sys->i_yoffset, newval.i_int );
+ p_sys->i_yoffset, (int)newval.i_int );
p_sys->i_yoffset = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_yoffset = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
while( pi_align_values[i_new] != newval.i_int ) i_new++;
msg_Dbg( p_this, "changing alignment from %d (%s) to %d (%s)",
p_sys->i_align, ppsz_align_descriptions[i_old],
while( pi_align_values[i_new] != newval.i_int ) i_new++;
msg_Dbg( p_this, "changing alignment from %d (%s) to %d (%s)",
p_sys->i_align, ppsz_align_descriptions[i_old],
- newval.i_int, ppsz_align_descriptions[i_new] );
+ (int)newval.i_int, ppsz_align_descriptions[i_new] );
p_sys->i_align = newval.i_int;
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_align = newval.i_int;
vlc_mutex_unlock( &p_sys->lock );
}
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing border width from %dpx to %dpx",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing border width from %dpx to %dpx",
- p_sys->i_borderw, newval.i_int );
+ p_sys->i_borderw, (int)newval.i_int );
p_sys->i_borderw = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_borderw = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing border height from %dpx to %dpx",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing border height from %dpx to %dpx",
- p_sys->i_borderh, newval.i_int );
+ p_sys->i_borderh, (int)newval.i_int );
p_sys->i_borderh = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_borderh = __MAX( newval.i_int, 0 );
vlc_mutex_unlock( &p_sys->lock );
}
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing position method from %d (%s) to %d (%s)",
p_sys->i_position, ppsz_pos_descriptions[p_sys->i_position],
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing position method from %d (%s) to %d (%s)",
p_sys->i_position, ppsz_pos_descriptions[p_sys->i_position],
- newval.i_int, ppsz_pos_descriptions[newval.i_int]);
+ (int)newval.i_int, ppsz_pos_descriptions[newval.i_int]);
p_sys->i_position = newval.i_int;
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_position = newval.i_int;
vlc_mutex_unlock( &p_sys->lock );
}
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing number of rows from %d to %d",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing number of rows from %d to %d",
- p_sys->i_rows, newval.i_int );
+ p_sys->i_rows, (int)newval.i_int );
p_sys->i_rows = __MAX( newval.i_int, 1 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_rows = __MAX( newval.i_int, 1 );
vlc_mutex_unlock( &p_sys->lock );
}
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing number of columns from %d to %d",
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing number of columns from %d to %d",
- p_sys->i_cols, newval.i_int );
+ p_sys->i_cols, (int)newval.i_int );
p_sys->i_cols = __MAX( newval.i_int, 1 );
vlc_mutex_unlock( &p_sys->lock );
}
p_sys->i_cols = __MAX( newval.i_int, 1 );
vlc_mutex_unlock( &p_sys->lock );
}
}
}
else if( !strncmp( psz_var, OSD_CFG"update", 14) )
}
}
else if( !strncmp( psz_var, OSD_CFG"update", 14) )
- p_sys->i_update = (mtime_t)(newval.i_int * 1000);
+ p_sys->i_update = newval.i_int * INT64_C(1000);
else if( !strncmp( psz_var, OSD_CFG"timeout", 15) )
p_sys->i_update = newval.i_int % 1000;
else if( !strncmp( psz_var, OSD_CFG"alpha", 13) )
else if( !strncmp( psz_var, OSD_CFG"timeout", 15) )
p_sys->i_update = newval.i_int % 1000;
else if( !strncmp( psz_var, OSD_CFG"alpha", 13) )
if( !p_sys->b_vnc_key_events )
return VLC_SUCCESS;
if( !p_sys->b_vnc_key_events )
return VLC_SUCCESS;
- msg_Dbg( p_this, "key pressed (%d) ", newval.i_int );
+ msg_Dbg( p_this, "key pressed (%"PRId64") ", newval.i_int );
- msg_Err( p_this, "Received invalid key event %d", newval.i_int );
+ msg_Err( p_this, "Received invalid key event 0" );
{
if( psz_language && *psz_language )
{
{
if( psz_language && *psz_language )
{
- if( asprintf( &text.psz_string, "%s %i - [%s]", _( "Track" ), val.i_int, psz_language ) == -1 )
+ if( asprintf( &text.psz_string, "%s %"PRId64" - [%s]", _( "Track" ), val.i_int, psz_language ) == -1 )
text.psz_string = NULL;
}
else
{
text.psz_string = NULL;
}
else
{
- if( asprintf( &text.psz_string, "%s %i", _( "Track" ), val.i_int ) == -1 )
+ if( asprintf( &text.psz_string, "%s %"PRId64, _( "Track" ), val.i_int ) == -1 )
text.psz_string = NULL;
}
}
text.psz_string = NULL;
}
}
if( bookmark.i_time_offset < 0 && bookmark.i_byte_offset < 0 )
{
if( bookmark.i_time_offset < 0 && bookmark.i_byte_offset < 0 )
{
- msg_Err( p_input, "invalid bookmark %d", val.i_int );
+ msg_Err( p_input, "invalid bookmark %"PRId64, val.i_int );
printf( ": %s", p_var->val.b_bool ? "true" : "false" );
break;
case VLC_VAR_INTEGER:
printf( ": %s", p_var->val.b_bool ? "true" : "false" );
break;
case VLC_VAR_INTEGER:
- printf( ": %d", p_var->val.i_int );
+ printf( ": %"PRId64, p_var->val.i_int );
break;
case VLC_VAR_STRING:
printf( ": \"%s\"", p_var->val.psz_string );
break;
case VLC_VAR_STRING:
printf( ": \"%s\"", p_var->val.psz_string );
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc),
var_InheritInteger(p_osd, p_button->psz_action) );
#if defined(OSD_MENU_DEBUG)
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc),
var_InheritInteger(p_osd, p_button->psz_action) );
#if defined(OSD_MENU_DEBUG)
- msg_Dbg( p_osd, "select (%d, %s)", val.i_int, p_button->psz_action );
+ msg_Dbg( p_osd, "select (%"PRId64", %s)", val.i_int, p_button->psz_action );
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc),
var_InheritInteger(p_osd, p_button->psz_action_down) );
#if defined(OSD_MENU_DEBUG)
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc),
var_InheritInteger(p_osd, p_button->psz_action_down) );
#if defined(OSD_MENU_DEBUG)
- msg_Dbg( p_osd, "select (%d, %s)", val.i_int, p_button->psz_action_down );
+ msg_Dbg( p_osd, "select (%"PRId64", %s)", val.i_int, p_button->psz_action_down );