[gst-devel] spectrum element and seeking

maxi maxi at hg.homeunix.org
Tue Aug 10 01:10:22 CEST 2010


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
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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 286 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100810/f443298f/attachment.pgp>


More information about the gstreamer-devel mailing list