Two pipelines playing at once

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Two pipelines playing at once

Sam Thursfield
Hi
I'm trying to implement replaygain using rganalysis that can run in
the background while a song is playing. Basically, if there is no rg
data about a song, I start the following two pipelines:

playbin sink=<rgvolume ! directsoundsink or gconfsink>
playbin sink=<rganalysis ! fakesink>

The two don't play well together however. Even if I start the second
one after the first playbin posts going into the playing state, no
audio comes out until the rganalysis pipeline has finished. Leave the
rganalysis pipeline in paused and the first pipeline plays fine.

I would guess the problem is due to the second thread running as fast
as it can stream and leaving no CPU for the first one to play.
However, I don't know of a way to set priorities for pipelines or
anything of the sort. Any help on how to solve this would be much
appriecated.
Thank
Sam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Two pipelines playing at once

René Stadler
Sam Thursfield wrote:

> Hi
> I'm trying to implement replaygain using rganalysis that can run in
> the background while a song is playing. Basically, if there is no rg
> data about a song, I start the following two pipelines:
>
> playbin sink=<rgvolume ! directsoundsink or gconfsink>
> playbin sink=<rganalysis ! fakesink>
>
> The two don't play well together however. Even if I start the second
> one after the first playbin posts going into the playing state, no
> audio comes out until the rganalysis pipeline has finished. Leave the
> rganalysis pipeline in paused and the first pipeline plays fine.
>
> I would guess the problem is due to the second thread running as fast
> as it can stream and leaving no CPU for the first one to play.
> However, I don't know of a way to set priorities for pipelines or
> anything of the sort. Any help on how to solve this would be much
> appriecated.
> Thank
> Sam

I cannot reproduce this, though I'm just having access to a dual core
machine right now.  What hardware and OS are you trying this with?  In
theory it should work just fine, a process consuming 100% CPU should not
disrupt audio playback even with just one core/CPU.

Could you try running an rganalysis in another process to ensure that
it's not a problem with your system?  If that works without disrupting
playback it might be a problem with gstreamer or the application...

--
Regards,
   René Stadler

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel