[vlc-commits] variables: remove VLC_VAR_GETLIST (same as VLC_VAR_GETCHOICES)
Rémi Denis-Courmont
git at videolan.org
Thu Oct 23 20:33:05 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 23 21:32:01 2014 +0300| [3380f9db6eb2ee7392f783c15b23a6d3c17ba830] | committer: Rémi Denis-Courmont
variables: remove VLC_VAR_GETLIST (same as VLC_VAR_GETCHOICES)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3380f9db6eb2ee7392f783c15b23a6d3c17ba830
---
include/vlc_variables.h | 2 +-
lib/media_player.c | 2 +-
lib/video.c | 2 +-
modules/control/hotkeys.c | 6 +++---
modules/control/rc.c | 6 +++---
modules/gui/macosx/MainMenu.m | 2 +-
modules/gui/ncurses.c | 2 +-
modules/gui/qt4/components/controller_widget.cpp | 2 +-
modules/gui/qt4/input_manager.cpp | 4 ++--
modules/gui/qt4/menus.cpp | 4 ++--
modules/lua/libs/variables.c | 2 +-
src/input/input.c | 2 +-
src/misc/variables.c | 1 -
13 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 8dba51b..533b97e 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -121,7 +121,7 @@
#define VLC_VAR_CLEARCHOICES 0x0022
#define VLC_VAR_SETDEFAULT 0x0023
#define VLC_VAR_GETCHOICES 0x0024
-#define VLC_VAR_GETLIST 0x0025
+
#define VLC_VAR_CHOICESCOUNT 0x0026
/**@}*/
diff --git a/lib/media_player.c b/lib/media_player.c
index 857d9b4..0f2aa98 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1466,7 +1466,7 @@ libvlc_track_description_t *
return NULL;
vlc_value_t val_list, text_list;
- int i_ret = var_Change( p_input, psz_variable, VLC_VAR_GETLIST, &val_list, &text_list );
+ int i_ret = var_Change( p_input, psz_variable, VLC_VAR_GETCHOICES, &val_list, &text_list );
if( i_ret != VLC_SUCCESS )
return NULL;
diff --git a/lib/video.c b/lib/video.c
index 6c09ee8..4abe36e 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -495,7 +495,7 @@ void libvlc_toggle_teletext( libvlc_media_player_t *p_mi )
else
{
vlc_value_t list;
- if( !var_Change( p_input_thread, "teletext-es", VLC_VAR_GETLIST, &list, NULL ) )
+ if( !var_Change( p_input_thread, "teletext-es", VLC_VAR_GETCHOICES, &list, NULL ) )
{
if( list.p_list->i_count > 0 )
var_SetInteger( p_input_thread, "spu-es", list.p_list->p_values[0].i_int );
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index e530fac..a2164cf 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -805,7 +805,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
{
vlc_value_t val={0}, val_list, text_list;
var_Get( p_vout, "aspect-ratio", &val );
- if( var_Change( p_vout, "aspect-ratio", VLC_VAR_GETLIST,
+ if( var_Change( p_vout, "aspect-ratio", VLC_VAR_GETCHOICES,
&val_list, &text_list ) >= 0 )
{
int i;
@@ -835,7 +835,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
{
vlc_value_t val={0}, val_list, text_list;
var_Get( p_vout, "crop", &val );
- if( var_Change( p_vout, "crop", VLC_VAR_GETLIST,
+ if( var_Change( p_vout, "crop", VLC_VAR_GETCHOICES,
&val_list, &text_list ) >= 0 )
{
int i;
@@ -957,7 +957,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
{
vlc_value_t val={0}, val_list, text_list;
var_Get( p_vout, "zoom", &val );
- if( var_Change( p_vout, "zoom", VLC_VAR_GETLIST,
+ if( var_Change( p_vout, "zoom", VLC_VAR_GETCHOICES,
&val_list, &text_list ) >= 0 )
{
int i;
diff --git a/modules/control/rc.c b/modules/control/rc.c
index 54a23c1..2733870 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -1127,7 +1127,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
i_value = val.i_int;
if ( var_Change( p_input, psz_variable,
- VLC_VAR_GETLIST, &val, &text ) < 0 )
+ VLC_VAR_GETCHOICES, &val, &text ) < 0 )
goto out;
msg_rc( "+----[ %s ]", val_name.psz_string );
@@ -1584,7 +1584,7 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd,
}
if ( var_Change( p_vout, psz_variable,
- VLC_VAR_GETLIST, &val, &text ) < 0 )
+ VLC_VAR_GETCHOICES, &val, &text ) < 0 )
{
vlc_object_release( p_vout );
free( psz_value );
@@ -1689,7 +1689,7 @@ static int AudioChannel( vlc_object_t *obj, char const *cmd,
/* Retrieve all registered ***. */
vlc_value_t val, text;
if ( var_Change( p_aout, "stereo-mode",
- VLC_VAR_GETLIST, &val, &text ) < 0 )
+ VLC_VAR_GETCHOICES, &val, &text ) < 0 )
{
ret = VLC_ENOVAR;
goto out;
diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 5f84d17..2fda43e 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -1430,7 +1430,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
return;
}
- if (var_Change(p_object, psz_variable, VLC_VAR_GETLIST,
+ if (var_Change(p_object, psz_variable, VLC_VAR_GETCHOICES,
&val_list, &text_list) < 0) {
if ((i_type & VLC_VAR_TYPE) == VLC_VAR_STRING) free(val.psz_string);
return;
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 7a4e175..daaa323 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1567,7 +1567,7 @@ static void CycleESTrack(intf_sys_t *sys, const char *var)
return;
vlc_value_t val;
- if (var_Change(input, var, VLC_VAR_GETLIST, &val, NULL) < 0)
+ if (var_Change(input, var, VLC_VAR_GETCHOICES, &val, NULL) < 0)
return;
vlc_list_t *list = val.p_list;
diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp
index db27f3b..67ddd95 100644
--- a/modules/gui/qt4/components/controller_widget.cpp
+++ b/modules/gui/qt4/components/controller_widget.cpp
@@ -270,7 +270,7 @@ void AspectRatioComboBox::updateRatios()
return;
}
- var_Change( p_vout, "aspect-ratio", VLC_VAR_GETLIST, &val_list, &text_list );
+ var_Change( p_vout, "aspect-ratio", VLC_VAR_GETCHOICES, &val_list, &text_list );
for( int i = 0; i < val_list.p_list->i_count; i++ )
addItem( qfu( text_list.p_list->p_values[i].psz_string ),
QString( val_list.p_list->p_values[i].psz_string ) );
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 1a04f51..27cc997 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -828,7 +828,7 @@ void InputManager::sectionMenu()
{
vlc_value_t val, text;
- if( var_Change( p_input, "title 0", VLC_VAR_GETLIST, &val, &text ) < 0 )
+ if( var_Change( p_input, "title 0", VLC_VAR_GETCHOICES, &val, &text ) < 0 )
return;
/* XXX is it "Root" or "Title" we want here ?" (set 0 by default) */
@@ -877,7 +877,7 @@ void InputManager::activateTeletext( bool b_enable )
{
vlc_value_t list;
vlc_value_t text;
- if( hasInput() && !var_Change( p_input, "teletext-es", VLC_VAR_GETLIST, &list, &text ) )
+ if( hasInput() && !var_Change( p_input, "teletext-es", VLC_VAR_GETCHOICES, &list, &text ) )
{
if( list.p_list->i_count > 0 )
{
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 4bd45b3..5e92a98 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1243,7 +1243,7 @@ static bool IsMenuEmpty( const char *psz_var,
}
/* Check children variables in case of VLC_VAR_VARIABLE */
- if( var_Change( p_object, psz_var, VLC_VAR_GETLIST, &val_list, NULL ) < 0 )
+ if( var_Change( p_object, psz_var, VLC_VAR_GETCHOICES, &val_list, NULL ) < 0 )
{
return true;
}
@@ -1428,7 +1428,7 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
return VLC_EGENERIC;
}
- if( var_Change( p_object, psz_var, VLC_VAR_GETLIST,
+ if( var_Change( p_object, psz_var, VLC_VAR_GETCHOICES,
&val_list, &text_list ) < 0 )
{
return VLC_EGENERIC;
diff --git a/modules/lua/libs/variables.c b/modules/lua/libs/variables.c
index 5ac9537..c77de34 100644
--- a/modules/lua/libs/variables.c
+++ b/modules/lua/libs/variables.c
@@ -218,7 +218,7 @@ static int vlclua_var_get_list( lua_State *L )
vlc_object_t **pp_obj = luaL_checkudata( L, 1, "vlc_object" );
const char *psz_var = luaL_checkstring( L, 2 );
- int i_ret = var_Change( *pp_obj, psz_var, VLC_VAR_GETLIST, &val, &text );
+ int i_ret = var_Change( *pp_obj, psz_var, VLC_VAR_GETCHOICES, &val, &text );
if( i_ret < 0 )
return vlclua_push_ret( L, i_ret );
diff --git a/src/input/input.c b/src/input/input.c
index 01a8123..8b96803 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3014,7 +3014,7 @@ static void input_SubtitleAdd( input_thread_t *p_input,
/* Select the ES */
vlc_value_t list;
- if( var_Change( p_input, "spu-es", VLC_VAR_GETLIST, &list, NULL ) )
+ if( var_Change( p_input, "spu-es", VLC_VAR_GETCHOICES, &list, NULL ) )
return;
if( count.i_int == 0 )
count.i_int++;
diff --git a/src/misc/variables.c b/src/misc/variables.c
index cea07ed..4ad38b7 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -531,7 +531,6 @@ int var_Change( vlc_object_t *p_this, const char *psz_name,
p_var->ops->pf_free( &oldval );
break;
case VLC_VAR_GETCHOICES:
- case VLC_VAR_GETLIST:
p_val->p_list = xmalloc( sizeof(vlc_list_t) );
p_val->p_list->p_values =
xmalloc( p_var->choices.i_count * sizeof(vlc_value_t) );
More information about the vlc-commits
mailing list