[gst-devel] Getting default audio source and sink (devices) in the GNOME-desktop.
Cai Yuanqing
yuanqing.cai at tieto.com
Mon Jan 10 07:16:50 CET 2011
Hi Osmo:
I don't quite clear where do you want to use this functions call and
here are some informations I can give to:
1.You can get default sink and source in pulseaudio by functions:
> pa_sink* pa_namereg_get_default_sink(pa_core *c)
> pa_source* pa_namereg_get_default_source(pa_core *c)
These 2 functions will return you the pointer of default sink or
source,thus you can get name by sink.name or source.name.
You can also check this informations in pacmd:
$ pacmd
<<< list-sinks
<<< list-sources
the first one is the default device in generally.
2.In the Gstreamer said I don't know very well,seems that pulsesink and
pulsesrc have no default device,maybe you need to set them first and the
get these arguments as others by:
> g_object_get(G_OBJECT(pulsesink),"device-name",dev_name,NULL);
Hope this helps :-)
On 01/09/2011 09:36 PM, Osmo Antero Maatta wrote:
> Hello,
>
> How can I read the default values for audio-sink and audio-source in
> Linux/GNOME-desktop.
> These values (device names) are set in the GNOME's gnome-volume-control
> program. Start
> $ gnome-volume-control
> Picture: http://bildr.no/view/796255 showing both [Input] and [Output]
> pages.
>
> The values are stored in user's $HOME/.pulse/ directory.
>
> $ ls ~/.pulse/
> b3b6877727df4f4ae34dba2b00000009-default-sink
> b3b6877727df4f4ae34dba2b00000009-default-source
> ...
>
> $ cat ~/.pulse/b3b6877727df4f4ae34dba2b00000009-default-source
> alsa_output.pci-0000_04_02.0.analog-stereo
>
> $ cat ~/.pulse/b3b6877727df4f4ae34dba2b00000009-default-sink
> alsa_input.pci-0000_00_1b.0.analog-stereo
>
> Is there a function call in GStreamer or Pulseaudio to get these values,
> or should I simply read the files.
>
> Kindly
> Moma Antero
>
>
> ------------------------------------------------------------------------------
> Gaining the trust of online customers is vital for the success of any company
> that requires sensitive data to be transmitted over the Web. Learn how to
> best implement a security strategy that keeps consumers' information secure
> and instills the confidence they need to proceed with transactions.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
--
B.R
Cai Yuanqing
More information about the gstreamer-devel
mailing list