[vlc-commits] aout: remove choices list on the device variable

Rémi Denis-Courmont git at videolan.org
Mon Jan 14 18:44:12 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 14 19:41:40 2013 +0200| [547e8b099050a5435bfeacd3c9490e82f24a1afc] | committer: Rémi Denis-Courmont

aout: remove choices list on the device variable

This does not support hot plug and unplug of devices.

Also, it prevented selecting a device not in the choices list due to
checks in the variables subsystem. (At least with ALSA, not all valid
devices are included in the suggestions.)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=547e8b099050a5435bfeacd3c9490e82f24a1afc
---

 src/audio_output/output.c |   23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index a0137f8..a108328 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -113,8 +113,6 @@ audio_output_t *aout_New (vlc_object_t *parent)
     var_Create (aout, "mute", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
     var_AddCallback (aout, "mute", var_Copy, parent);
     var_Create (aout, "device", VLC_VAR_STRING | VLC_VAR_HASCHOICE);
-    text.psz_string = _("Audio Device");
-    var_Change (aout, "device", VLC_VAR_SETTEXT, &text, NULL);
 
     aout->event.volume_report = aout_VolumeNotify;
     aout->event.mute_report = aout_MuteNotify;
@@ -138,27 +136,6 @@ audio_output_t *aout_New (vlc_object_t *parent)
         return NULL;
     }
 
-    if (aout->device_enum != NULL)
-    {   /* Backward compatibility with UIs using GETCHOICES/GETLIST */
-        /* Note: this does NOT support hot-plugged devices. */
-        char **ids, **names;
-        int n = aout->device_enum (aout, &ids, &names);
-
-        for (int i = 0; i < n; i++)
-        {
-            val.psz_string = ids[i];
-            text.psz_string = names[i];
-            var_Change (aout, "device", VLC_VAR_ADDCHOICE, &val, &text);
-            free (names[i]);
-            free (ids[i]);
-        }
-        if (n >= 0)
-        {
-            free (names);
-            free (ids);
-        }
-    }
-
     /*
      * Persistent audio output variables
      */



More information about the vlc-commits mailing list