[gst-devel] Audio visualizations
Stefan Kost
ensonic at hora-obscura.de
Thu Aug 5 23:29:46 CEST 2010
Am 27.07.2010 18:53, schrieb Matteo Landi:
> Hi guys,
> these days I was wondering how to use gstreamer in order to create
> some audio visualizations like an oscilloscope or a spectrum analyzer.
>
> The application consist of a window with a drawing area used to
> display the visualizations.
> Regarding the pipeline, I thought about something like
>
> filesrc !
> decodebin !
> audioconvert !
> audio/x-raw-int, channels=1, rate=44100, width=16, depth=16, endianness=1234 !
> tee name=t !
> queue !
> fakesink name=fakesink signal-handoffs=true t. !
> queue !
> autoaudiosink
>
> with the handoff callback linked to a method which spawn a new thread,
> process the signal, and queue a redraw of the window.
Have a look at gst-plugins-good/test/examples/spectrum/
Anyway, don't draw to gtk-windows from a custom thread. Rather do processing in
a gst element and post the data via GstBus to the main thread and draw there.
Stefan
>
> I got few problems with the implementation:
> 1 - I often get core dumped, and I cannot understand why: all the
> drawing actions are done inside the main thread, so it should be ok
> ...
> 2 - Synchronization between audio and video: the two sources are not
> synchronized.. maybe is it something related to the queues elements?
>
> Have you got any advices regarding the chosen implementation, and how
> to solve the listed problems?
>
> Thanks in advance for the attention.
>
>
More information about the gstreamer-devel
mailing list