Commit c006da05 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

variables: remove useless VLC_VAR_CHOICESCOUNT parameter

parent c35617c5
......@@ -667,7 +667,7 @@ VLC_USED
static inline int var_CountChoices( vlc_object_t *p_obj, const char *psz_name )
{
vlc_value_t count;
if( var_Change( p_obj, psz_name, VLC_VAR_CHOICESCOUNT, &count, NULL ) )
if( var_Change( p_obj, psz_name, VLC_VAR_CHOICESCOUNT, &count ) )
return 0;
return count.i_int;
}
......
......@@ -1403,7 +1403,7 @@ int libvlc_media_player_get_chapter_count( libvlc_media_player_t *p_mi )
if( !p_input_thread )
return -1;
int i_ret = var_Change( p_input_thread, "chapter", VLC_VAR_CHOICESCOUNT, &val, NULL );
int i_ret = var_Change( p_input_thread, "chapter", VLC_VAR_CHOICESCOUNT, &val );
vlc_object_release( p_input_thread );
return i_ret == VLC_SUCCESS ? val.i_int : -1;
......@@ -1422,7 +1422,7 @@ int libvlc_media_player_get_chapter_count_for_title(
char psz_name[sizeof ("title ") + 3 * sizeof (int)];
sprintf( psz_name, "title %2u", i_title );
int i_ret = var_Change( p_input_thread, psz_name, VLC_VAR_CHOICESCOUNT, &val, NULL );
int i_ret = var_Change( p_input_thread, psz_name, VLC_VAR_CHOICESCOUNT, &val );
vlc_object_release( p_input_thread );
return i_ret == VLC_SUCCESS ? val.i_int : -1;
......@@ -1471,7 +1471,7 @@ int libvlc_media_player_get_title_count( libvlc_media_player_t *p_mi )
if( !p_input_thread )
return -1;
int i_ret = var_Change( p_input_thread, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
int i_ret = var_Change( p_input_thread, "title", VLC_VAR_CHOICESCOUNT, &val );
vlc_object_release( p_input_thread );
return i_ret == VLC_SUCCESS ? val.i_int : -1;
......
......@@ -1471,7 +1471,7 @@
/* Make sure we want to display the variable */
if (i_type & VLC_VAR_HASCHOICE) {
var_Change(p_object, psz_variable, VLC_VAR_CHOICESCOUNT, &val, NULL);
var_Change(p_object, psz_variable, VLC_VAR_CHOICESCOUNT, &val);
if (val.i_int == 0 || val.i_int == 1)
return;
}
......
......@@ -441,7 +441,7 @@ void InputManager::UpdateNavigation()
vlc_value_t val; val.i_int = 0;
vlc_value_t val2; val2.i_int = 0;
var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val );
if( val.i_int > 0 )
{
......@@ -463,7 +463,7 @@ void InputManager::UpdateNavigation()
}
/* p_input != NULL since val.i_int != 0 */
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2 );
emit titleChanged( b_menu );
emit chapterChanged( val2.i_int > 1 );
......@@ -553,7 +553,7 @@ bool InputManager::hasAudio()
if( hasInput() )
{
vlc_value_t val;
var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val );
return val.i_int > 0;
}
return false;
......
......@@ -1240,7 +1240,7 @@ static bool IsMenuEmpty( const char *psz_var, vlc_object_t *p_object )
return false;
vlc_value_t val;
var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val );
return val.i_int == 0 || val.i_int == 1;
}
......
......@@ -484,8 +484,7 @@ void VlcProc::on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
// Do we have audio
vlc_value_t audio_es;
var_Change( pInput, "audio-es", VLC_VAR_CHOICESCOUNT,
&audio_es, NULL );
var_Change( pInput, "audio-es", VLC_VAR_CHOICESCOUNT, &audio_es );
SET_BOOL( m_cVarHasAudio, audio_es.i_int > 0 );
break;
}
......@@ -521,7 +520,7 @@ void VlcProc::on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
vlc_value_t chapters_count;
var_Change( pInput, "chapter", VLC_VAR_CHOICESCOUNT,
&chapters_count, NULL );
&chapters_count );
SET_BOOL( m_cVarDvdActive, chapters_count.i_int > 0 );
break;
}
......
......@@ -949,7 +949,7 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id,
else
psz_var = "spu-es";
var_Change( p_input, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
var_Change( p_input, psz_var, VLC_VAR_CHOICESCOUNT, &val );
if( val.i_int == 0 )
{
vlc_value_t val2;
......
......@@ -3225,7 +3225,7 @@ static int input_SlaveSourceAdd( input_thread_t *p_input,
}
if( b_forced )
var_Change( p_input, psz_es, VLC_VAR_CHOICESCOUNT, &count, NULL );
var_Change( p_input, psz_es, VLC_VAR_CHOICESCOUNT, &count );
msg_Dbg( p_input, "loading %s slave: %s (forced: %d)", psz_es, psz_uri,
b_forced );
......
......@@ -665,7 +665,7 @@ static int TitleCallback( vlc_object_t *p_this, char const *psz_cmd,
input_ControlPush( p_input, INPUT_CONTROL_SET_TITLE_NEXT, NULL );
val.i_int = var_GetInteger( p_input, "title" ) + 1;
var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &count, NULL );
var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &count );
if( val.i_int < count.i_int )
var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
}
......@@ -706,7 +706,7 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
input_ControlPush( p_input, INPUT_CONTROL_SET_SEEKPOINT_NEXT, NULL );
val.i_int = var_GetInteger( p_input, "chapter" ) + 1;
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &count, NULL );
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &count );
if( val.i_int < count.i_int )
var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val, NULL );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment