[gst-devel] Getting names and description of the "Source" devices.
Osmo Maatta
osmoma at gmail.com
Mon Jul 19 09:25:03 CEST 2010
Hello,
I am writing a small sound-recording application/applet in C. It will do
approx. the same task as this command line.
$ gst-launch-0.10 pulsesrc device="xxxx" ! queue ! audioconvert !
vorbisenc ! oggmux ! filesink location=test.oga
My platform is GNOME on 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 <--- AND THIS
Test code:
http://www.futuredesktop.com/tmp/audio-recorder/t1.c
<http://www.futuredesktop.com/tmp/audio-recorder/>
Kindly
Gstreamer newbie.
Moma Antero M (osmo)
www.futuredesktop.org (com)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100719/0a793dcc/attachment.htm>
More information about the gstreamer-devel
mailing list