[gst-devel] Mixer plugin

Wim Taymans wim.taymans at chello.be
Fri Mar 16 19:40:56 CET 2001


On 16 Mar 2001 03:15:36 -0500, Lee Brown wrote:
> On Fri, 16 Mar 2001, Simon Per Soren Kagedal wrote:
> > Hi,
> > 
> > I'm writing a mixer plugin for GStreamer, and I've run into some
> > issues that I would like to ask for ideas about.  
> > 
> > Basic Idea: A filter that takes m input audio streams (sinks) and
> > mixes to n sources, by adding together the data.  For simplicity, I'll
> > assume here that all streams are mono audio/raw data of the same
> > format.  Then, to mix stereo data, one would have to use channel
> > splitters/mergers.  It would be convinient though to let all in/out
> > streams have any number of channels, and probably more efficient.
> > 
> > Problems/Issues:
> > 
> > 1. Setting "Panning" Values
> > 
> > For each sink i=1..m, you should be able to set (and get) how much of
> > it's signal should be sent to each source j=1..n.
> > 
> > So how do I do this?  gtk_object_set/get is the only interface I know
> > of for setting properties of elements in a plugin, and as far as I
> > know, there is no way to access "subproperties" except by registering
> > one argument type for every g_strdup_printf("mix%d%d",i,j).  This idea
> > doesn't appeal to me very much.  I would like both the sinks and the
> > sources to be "hotpluggable", and then you would have to add and
> > remove lots of argument types when streams come and go.
> > 
> > So..  any other ideas or is this the way I have to go?  
> > 
> 
> 
> I think you want:
> 
> //start
> struct audio_level{
>       int sink;
>       int source;
>       float level; // er, whatever
> }
> 
> struct gst_mixer_element {
>       struct gst_element;
>       GList* audio_levels;
>       ....
> }
> 
> void gst_mixer_set_audio_level(
>       gst_mixer_element e, 
>       int sink, 
>       int source, 
>       float level     );
> 
> float gst_mixer_get_audio_level(
>       gst_mixer_element e, 
>       int sink, 
>       int source );
> // end
> 
> Forgive my ignorance, whats wrong with this?

The fact that you have to have the header files of this plugin installed
on your system before you can use the functions. This makes it 
impossible to use the plugin in, let's say, the editor.

> 
> -- 
> Lee Brown Jr.
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> 





More information about the gstreamer-devel mailing list