[gst-devel] Autoplugging with multiple sinks

Wim Taymans wim.taymans at chello.be
Sun Sep 10 16:41:51 CEST 2000


Richard Boulton wrote:
> 
> Just a quick question.  I've been playing with the autoplugging example,
> helloworld2: adding different sinks and playing around to see how it works.
> Is there any easy way to have two separate sinks for the data to come out
> of?  Currently, I can't see how to do this at all with autoplugging - I

No, not possible yet. I think you even get an error if you place more than
one sink in the pipeline.

> need to have an element which simply passes the data through, which has
> the appropriate type for autoplugging, and into which I can then plug each
> of my sinks.  Is there such an element?

A GstTee can do that. You can sink data to it and request as many src pads
as you want. 

> 
> Concrete example: make an audio player which plays the sound with an
> audiosink and also displays the sound with a smoothwave plugin.

You can do that, but not with autoplugging, yet. 

The best way to do that right now is to use:

  gst_type_get_sink_to_src(guint sinkid, guint srcid);

you will get a list of elements that can convert the src mime type to
the sink mime type. You can then add them to the bin.

This function is exactly what is used by the autopluging. You need to
manually connect the pads though or setup a connect function if the
pads are created at runtime.

> 
> It would be nice if the autoplugging supported multiple sinks.  It could
> then work out the best path to produce the output desired by each of the

Yes, just loop over the different sinks and compute the elements needed for
it. The only difficulty will be to decide when to add a tee element.

> sinks.  A similar thing for multiple sources might be nice, though I can't
> see how that would work.

Same as the sink case. Again difficuties in finding out when to add a mixer
element or somesuch if different sources output video and you only have
one videosink.

Before this can be possible I would like to change the API first so that you
explicitly say gst_pipeline_add_sink and gst_pipeline_add_src.

> 
> Or am I approaching all this from the wrong direction? :-)

No, autoplugging is in its infancy right now :-)


Wim
> 
> --
> Richard
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/gstreamer-devel

-- 
The way some people find fault, you'd think there was some kind of reward.



More information about the gstreamer-devel mailing list