[vlc-devel] [PATCH 0/2] Print audio devices and select one

Thomas Guillem thomas at gllm.fr
Wed Mar 22 09:50:24 CET 2017


Add one option to print a list of available audio device, and add one option to
select an audio device. These 2 options that can be useful for developers (or
people that don't want to use the libvlc) .

Example of --list-audio-devices output:

$ ./vlc --list-audio-devices
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-11848-g4c853b5477)

The 'PulseAudio' aout module has 3 audio devices:

device[0]:
  id: [alsa_output.usb-Burr-Brown_from_TI_USB_Audio_DAC-00.analog-stereo]
  name: "USB Audio DAC    Analog Stereo"

device[1]:
  id: [alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2]
  name: "GK106 HDMI Audio Controller Digital Stereo (HDMI 3)"

device[2]:
  id: [alsa_output.pci-0000_00_1b.0.iec958-stereo]
  name: "Built-in Audio Digital Stereo (IEC958)"



Obviously, this can be combined with the aout option:


$ ./vlc --list-audio-devices --aout alsa
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-11848-g4c853b5477)

The 'ALSA' aout module has 56 audio devices:

device[0]:
  id: [default]
  name: "Playback/recording through the PulseAudio sound server"

device[1]:
  id: [null]
  name: "Discard all samples (playback) or generate zero samples (capture)"

device[2]:
  id: [sysdefault:CARD=PCH]
  name: "HDA Intel PCH, ALC892 Analog Default Audio Device"

device[3]:
  id: [front:CARD=PCH,DEV=0]
  name: "HDA Intel PCH, ALC892 Analog Front speakers"
...


Then, you can select an audio device with:


$ ./vlc --audio-device alsa_output.pci-0000_00_1b.0.iec958-stereo

Thomas Guillem (2):
  core: add an option to print the list of audio devices
  core: add an option to select an audio-device

 src/audio_output/output.c  |  4 +++-
 src/config/configuration.h |  1 +
 src/config/help.c          | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 src/libvlc-module.c        | 13 ++++++++++
 src/libvlc.c               |  6 +++++
 src/playlist/engine.c      |  2 +-
 6 files changed, 84 insertions(+), 2 deletions(-)

-- 
2.11.0



More information about the vlc-devel mailing list