multiple custom bins being dynamically reconfigured

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

multiple custom bins being dynamically reconfigured

cleojones
This post was updated on .
I am streaming FROM an icecast server (and also sometimes playing local files) using playbin2, with a custom [audioconvert ! levels ! autoaudiosink] bin as the audio-sink.

Meanwhile, I am (in a separate pipeline right now) broadcasting microphone input TO the icecast server using a [autoaudiosrc ! audioconvert ! levels ! lame ! shout2send] pipeline.

I would like to allow the user to switch between broadcasting microphone, and broadcasting the audio coming out of playbin2, but I am not sure what the right approach is.

Currently, I've set audio-sink of playbin2 to be a 'tee' element, and have created 2 custom bins:
 [queue2 ! audioconvert ! levels ! autoaudiosink]   this is the outbin (for hearing audio)
 [queue2 ! autoaudiosrc ! audioconvert ! levels ! lame ! shout2send]  this is the broadcastbin (for broadcasting)
Each bin already has a created ghost pad "sink" ready to connect to the tee.

My question is, do I need to add playbin2, outbin and broadcast bin to another top-level bin and run as single pipeline? Or can I keep them all separate and set each one to PLAY, NULL, etc?

This is just the first step to test using the tee. Eventually, what I would like is that broadcastbin is always running, but dynamically switches from having its sink connected to playbin2, or to autoaudiosrc (microphone), without dropping the connection to the server (so the stream should be continuous even when the input changes). Is this possible?

Does this seem like the right approach, and can anyone help with the details of how to dynamically reconfigure the connections between all of these streams? Any advice much appreciated!

EDIT: eventually I can remove the 'levels' element from the outbin since it already exists in the broadcastbin which will always be running
Reply | Threaded
Open this post in threaded view
|

Re: multiple custom bins being dynamically reconfigured

Marco Ballesio
Hi,

On Tue, Sep 13, 2011 at 8:39 PM, cleojones <[hidden email]> wrote:

> I am streaming FROM an icecast server (and also sometimes playing local
> files) using playbin2, with a custom [audioconvert ! levels ! autoaudiosink]
> bin as the audio-sink.
>
> Meanwhile, I am (in a separate pipeline right now) broadcasting microphone
> input TO the icecast server using a [autoaudiosrc ! audioconvert ! levels !
> lame ! shout2send] pipeline.
>
> I would like to allow the user to switch between broadcasting microphone,
> and broadcasting the audio coming out of playbin2, but I am not sure what
> the right approach is.
>
> Currently, I've set audio-sink of playbin2 to be a 'tee' element, and have
> created 2 custom bins:
>  [queue2 ! audioconvert ! levels ! autoaudiosink]   this is the outbin (for
> hearing audio)
>  [queue2 ! autoaudiosrc ! audioconvert ! levels ! lame ! shout2send]  this
> is the broadcastbin (for broadcasting)
> Each bin already has a created ghost pad "sink" ready to connect to the tee.
>
> My question is, do I need to add playbin2, outbin and broadcast bin to
> another top-level bin and run as single pipeline? Or can I keep them all
> separate and set each one to PLAY, NULL, etc?

Just an idea.. in sake of "divide et impera" I'd keep the pipelines
separated and loop the output from playbin2 to the input of the
streaming pipeline through some pulseaudio witchcraft (e.g. you might
want to use its null sink's monitor source).

Regards

>
> This is just the first step to test using the tee. Eventually, what I would
> like is that broadcastbin is always running, but dynamically switches from
> having its sink connected to playbin2, or to autoaudiosrc (microphone),
> without dropping the connection to the server (so the stream should be
> continuous even when the input changes). Is this possible?
>
> Does this seem like the right approach, and can anyone help with the details
> of how to dynamically reconfigure the connections between all of these
> streams? Any advice much appreciated!
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/multiple-custom-bins-being-dynamically-reconfigured-tp3810833p3810833.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel