How to use channel-layout caps?

marcin at saepia.net marcin at saepia.net
Fri May 13 05:33:45 PDT 2011


Hi,

I am developing an application that uses pulseaudio & gstreamer.

It has to fetch the data from multichannel soundcard via pulseaudio,
so I use pulsesrc element. By default it connects to first two
channels of my soundcard but I want to specify different channel map.

I had looked into pulsesrc source code and I found:

  s = gst_caps_get_structure (caps, 0);
  if (!gst_structure_has_field (s, "channel-layout") ||
      !gst_pulse_gst_to_channel_map (&channel_map, &spec)) {
    if (spec.channels == 1)
      pa_channel_map_init_mono (&channel_map);
    else if (spec.channels == 2)
      pa_channel_map_init_stereo (&channel_map);
    else
      need_channel_layout = TRUE;
  }


Seems that could be configured by setting "channel-layout" caps.
Sounds nice, but I can't find any example how to use that, especially
with gst-launch.

Could you provide one?

Thank you in advance,

-- 
Marcin Lewandowski


More information about the gstreamer-devel mailing list