Gustavo Sverzut Barbieri wrote:

Just anxious to check it out!
What are you using to achieve this? I mean, one will be able to use
animated images or just animated effects? And how to use animated
effects? Using the skin?
   I have few ideas about that...

Basicly, everything that can be a pygame.Surface can be animated (eg. _everything_ in Freevo). I'm not quite sure what you mean by animated images, if you're thinking of stuff like animated gifs - then no.

I have an old sequence diagram displaying approx. how it's done:
http://www.matrise.net/~viggo/freevo/ellipses/act,jpg.JPG
(nice filename, heh).

I've made a BaseAnimation class which provides the basis for animations. This includes stuff like:
- starting
- pausing
- removing #
- take damage from screen # these two are the harder parts
- provide a basic surface
with optional background from screen
- rectangle describing it's location on the screen
- etc.


The marquee uses this as it's basis, and all it needs to do is to draw
the string onto it's surface, and blit it to the baseanimation surface.
(I think the marquee is about 40-50 lines of code).

To use the animations, all one has to do is to create an instance of
the wanted class and call obj.start(). The instance then must be added
to the render singleton (which takes care of drawing the object at the
right intervals). To remove, call obj.remove() or render.kill(obj)

And now comes the tricky part - use it with the skin. What I did was
to modify skin.main.listing_area to start and stop the marquee when
a new item is selected. The problem with this is when I start the
audio.player, it will still remain on the screen. All I can say is
- I get lost in the skin code :). But I think when the time comes,
others can help out with this part.

Performancewise the animations do pretty well. As an enhancement I'm
also thinking of adding some filters for pygame surfaces so one could
add something like an animated blur effect (ex for the image viewer).

It's been pretty easy so far, but it's still very early in development
and it has flaws (hell, this is my first time developing ui stuff).
When freevo goes back into experimental mode, I'll make some patches.

Man, I really suck at explaining stuff :)

Well, anywhoo, the reason I post is the fact that I am also working
on
visualization using the af_export from MPlayer. I have the needed
data
and animations in place, now I only need to learn Fast Fourier
Transformations to get some decent output. (dang, now I wish I
studied
math harder while I still had the time :).


Don't you want to join me in MPAV? It's plugin based (dl), so other
visualization methods would be real simple to add! You don't need to
write the events or slave mode, they're there... just write a function
that process a 512 x 2  int16_t samples and it's done!

The thing I'm working on is integrated with freevo, and uses the animation stuff described above to display it. What worries me is performance, I'm afraid it won't be able to do advanced stuff like goom.

Btw, is int16_t signed short? I haven't looked to closely in af_export.c, but is the data organized as HEADER CHN0(512) CHN1(512)?
This is what I'm currently assuming.


I don't like (aka know very well) FFTs, so I used GOOM (a library)...
you can start with that (it uses ffts internally) or even port some
XMMS plugins to MPAV!

I would love to use MPAV instead of writing my own (it's proven to be harder than I first thought). The thing is that I use dfbmga, and switching displays is a pain even when watching a movie, even more so when listening to music.

Also I would like it to be closer integrated into the freevo UI, so one
could show a small spectrum analyzer or oscilloscope in the player area.
What remains to see is wether I manage to pull this off (I'm a very
impatient coder).


Gustavo




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to