Obtaining spectrum's data downstream

Narzuk pabloarubi at gmail.com
Wed Aug 28 08:17:38 PDT 2013


Hi,

I've been thrown into a project that involves modifying an existing plugin
(goom). So far so good, I've been able to use goom's internal variables to
change the final sound visualization. However, it think it would be nice to
have some other information about the sound. Looking into the plugin list,
I've found that spectrum provides a nice amount of information that I could
use.

Looking through spectrum's documentation, I've found this " Example
application
<http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-spectrum.html> 
". From what I understand, that's the way to access spectrum's processing
information. In that example, it appears to be possible to see spectrum's
processed data doing something like this:

-----
static gboolean
message_handler (GstBus * bus, GstMessage * message, gpointer data) { 
  // use processed data
 }
...
int main() {
bin = gst_pipeline_new ("bin");
...
bus = gst_element_get_bus (bin);
gst_bus_add_watch (bus, message_handler, NULL);
...
}
-----

My problem is, since my project's output is a .dll, I don't have a main()
function, and my pipeline is already created. My plugin is being called
doing something like this:
> gst-launch filesrc ... ! audioconvert ! queue ! spectrum ! mygoom ! ... .

Any ideas as of how to use spectrum's information inside of mygoom? Is there
a way to access the GstPipeline object to call gst_bus_add_watch in my
plugin's init?
Ideas I've thought so far are:
 - Modify spectrum to -somehow, I got no idea how to do this- communicate
with mygoom.
 - Copy spectrum's code into mygoom's code, and use what I need. (Problem is
that spectrum is made of 700 lines of spaghetti code, I don't really like to
go through that if there's another option).

Thanks in advance!



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Obtaining-spectrum-s-data-downstream-tp4661765.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list