[gst-devel] Audio visualizations
Matteo Landi
landimatte at gmail.com
Fri Jul 30 18:13:41 CEST 2010
Just a few news about the topic.
On Tue, Jul 27, 2010 at 5:53 PM, Matteo Landi <landimatte at gmail.com> wrote:
> 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.
>
> 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
Could this be due to the allocation of gtk/cairo resources inside side
threads different from the mainloop one? Maybe should I have to
protect them with threads_enter/leave?
> ...
> 2 - Synchronization between audio and video: the two sources are not
> synchronized.. maybe is it something related to the queues elements?
I noticed that the synchronization problem was due to the fakesink
element which try to run as fast as possible. I solve that by setting
the sync property to true (why is it not present inside the fakesink
documentation? is it a general property of sink objects?)
> Have you got any advices regarding the chosen implementation, and how
> to solve the listed problems?
>
> Thanks in advance for the attention.
>
>
> --
> Matteo Landi
> http://www.matteolandi.net/
>
--
Matteo Landi
http://www.matteolandi.net/
More information about the gstreamer-devel
mailing list