Is it possible to connect to an existing stream using pulse audio?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks David,

 

        Sorry if I had framed my question in the wrong sense. I had tried to
explain what I am trying to do in an elaborate way.

 

1)      I am currently working on an Audio Manager project.

2)      There are two applications ( for example:- VLC player and TOTEM
media player) that are using pulse audio and playing music.

3)      When player 1 is playing, and player 2 is started, player 1 should
pause and restart after player 2 is finished.. This functionality needs to
be implemented using AUDIO MANAGER.

 

I have been trying to look at the cork functionality "pa_stream_cork
"provided in pulse audio in the Audio Manager. The signature of the
"pa_stream_cork" needs the pa_stream* stream  as a input.. But since VLC AND
TOTEM player application (client) directly contact pulse audio and create
audio streams (clients and sink input streams are listed using PAMAN), the
Audio Manager doesn't have the knowledge of the streams. Nor does it have a
pa_stream object.

 

What I was looking for is a function using which I can connect to an
previous existing audio stream and pause that stream.. But the examples I
have seen on the internet invariably start with "pa_stream_new" function and
create a pa_stream* stream. 

 

         I have been searching the pulse audio forums. I got a very similar
question posted in 2009. The link to the post is given below.

http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/2632 .

 

      I am pretty sure there had been much changes in pulse audio after
that.

 

    Thanks for the help in advance,

    Sathish

 

On 11/07/2013 07:18 AM, sathishkumar sivagurunathan wrote:

> Hello,

> 

> My aim is as follows.

> 

> 1)  I have a audio player like Vlc running. I have checked with PAMAN

> command that VLC as a client and a stream with stream name is created.

> 

> My intention is to connect to this pretty existing stream.

 

Aha, you want to record the audio from another client. There was a patch

to pacat that does this, and that was added recently (so it's not yet in

a released version of PulseAudio). But you can either recompile pacat

yourself, or use the patch as inspiration for your own program.

 

Here's the patch I'm talking about:

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/utils/pacat.c?i
d=49f93eb2b09f3a20733dbb80c6448ee69b0c89ec

 

 

 

-- 

David Henningsson, Canonical Ltd.

https://launchpad.net/~diwic

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20131107/55d696c6/attachment.html>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux