[gst-devel] Getting names and description of the "Source" devices.
Osmo Maatta
osmoma at gmail.com
Mon Jul 19 12:13:01 CEST 2010
Re-hello,
This piece of PulseAudio code seems to list the input/output devices;
their names and human readable _descriptions_.
http://pulseaudio.org/wiki/SampleAsyncDeviceList
Should GStreamer be able to do the same?
On 07/19/2010 09:25 AM, Osmo Maatta wrote:
> 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
>
> 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/d585df17/attachment.htm>
More information about the gstreamer-devel
mailing list