geoffjay
geoffjay

Reputation: 413

Using GStreamer to connect to a PulseAudio stream

I'm trying to write a program that uses GStreamer to connect to PulseAudio as a source so that I can intercept any audio that's being played. I have no need to play it back so my assumption is that my pipeline only needs a source and demuxer, I'm not sure of the latter though. The hello world example that I'm working off of is here, except that instead of using "filesrc" I'm using "pulsesrc".

Is there a good example that shows this out there already and I haven't found the right combination of terms to make Google give it to me? Do you have to do anything to PulseAudio to make it let you monitor its stream? Should I actually be trying to instead connect to a sink to monitor what's being played?

Upvotes: 2

Views: 1955

Answers (1)

ensonic
ensonic

Reputation: 3440

I think you will need to check the sources with e.g.:

pacmd list-sources | grep -e device.string -e 'name:'

and then connct to the source ending on ".monitor" by using the "device" property of pulsesrc.

Upvotes: 1

Related Questions