Getting names and description of the "Source" devices.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am writing a small sound-recording application/applet in c/GTK. It will do approx. the same task as this command liner. $ gst-launch-0.10 pulsesrc device="xxxx" ! queue ! audioconvert ! vorbisenc ! oggmux ! filesink location=test.oga

My platform is GNOME on the Ubuntu-Linux 10.04.

In my GTK app, I would like to fill a listbox with names and description of the "Source" devices; such as
"Audio card X"
"Micro phone 1"
so the user can select the source of the recording. See the devive= parameter in the above command line.

How can I find the device names + description using c and GStreamer libraries?

I have poked the "gstreamer-properties" application and it finds the device names like

PulseAudio Audio Source (pulsesrc):
Device name: alsa_output.pci-0000_04_02.0.analog-stereo.monitor
Description: Unknown

PulseAudio Audio Source (pulsesrc):
Device name: device alsa_input.usb-046d_089d-01-U0x46d0x89d.analog-mono
Description: Unknown

The device name is ok, but the human readable description is empty/"Unknown".

See this picture:
http://www.futuredesktop.com/tmp/audio-recorder/picture1.png
The device description for Source #0 and #1 are set to "Unknown".

However the "pactl list" command shows the description right.
http://www.futuredesktop.com/tmp/audio-recorder/picture2.png
Source #0
 State: RUNNING
 Name: alsa_output.pci-0000_04_02.0.analog-stereo.monitor <-- I WANT THIS
 Description: Monitor of SB0400 Audigy2 Value Analog Stereo <--- AND THIS

Source #1
 State: SUSPENDED
 Name: alsa_input.usb-046d_089d-01-U0x46d0x89d.analog-mono <- I WANT THIS
Description: QuickCam E2500 series Analog Mono (w/ microphone) <--- AND THIS

Test code:
http://www.futuredesktop.com/tmp/audio-recorder/t1.c

Kindly
  GStreamer newbie.
  Moma Antero M (osmo)
www.futuredesktop.org (com)

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux