[gst-devel] spectrum element and seeking

Stefan Kost ensonic at hora-obscura.de
Wed Aug 11 23:02:54 CEST 2010


Am 10.08.2010 02:10, schrieb maxi:
> Hello,
> 
> I'm trying to use the spectrum element for displaying the spectrum in an
> GTK application that uses seeking. Normally, when I connect to the bus
> and listen for the spectrum messages, I get a message once every 100ms.
> Now if I seek and set the pipeline to PLAYING, I get the messages for a
> few seconds in advance all at once, then for some time no messages. This
> only happens the second time I seek.
> I programmed a minimal application that shows this behavior:
> http://pastebin.org/463182

Lol. I was reworking the spectrum analyer in buzztard and also stumbled over
some issues with seeking and the spectrum element. The first buffer after
seeking is marked as discont and then the spectrum analyzer needs a few more
samples before it can run a fft again. But that does not explain the behaviour
you see here.

Stefan


> It plays one second of a song, beginning from 2.0, using a spectrum
> element, and printing the stream time for each spectrum message. Then it
> repeats this procedure, and this is what I get:
> 
> 2000000000
> [100ms of music]
> 2100000000
> [100ms of music]
> 2200000000
> [100ms of music]
> 2300000000
> [100ms of music]
> 2400000000
> [100ms of music]
> 2500000000
> [100ms of music]
> 2600000000
> [100ms of music]
> 2700000000
> [100ms of music]
> 2800000000
> [100ms of music]
> 2900000000
> [100ms of music]
> [some idle time until the timeout callback is called for second playback]
> 2000000000
> 2100000000
> 2200000000
> 2300000000
> 2400000000
> 2500000000
> 2600000000
> 2700000000
> 2800000000
> 2900000000
> [1s of music]
> 
> Can anyone explain this behavior? Perhaps I made something fundamentally
> wrong, but how then do I program a graphical spectrum analyzer that
> supports seeking? Am I doing something wrong with the seeking part of
> the program?
> 
> Thank you very much in advance,
> Maxi
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by 
> 
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list