--- Viggo Fredriksen <[EMAIL PROTECTED]> escreveu: 
> 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.

It was gif images or other kind of animation (ie: preview TV, movies,
...) Having TV preview in TV guide and movie preview in movie dirs
would kick ass!
   As for movies... I'll start to look at gstreamer, so it could be
used to feed the animation... but I don't know if performance issues
will arise.


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

Great.
   This could be used to do everything, right? I mean, if I create a
class TvPreview that get frames from /dev/videoX and blit it, it should
work (?)

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

easy so far.
 

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

I can try to help you... many of the 'bloat' in the skin was my part :D
But I also got kinda lost with Dischi's new abstractions... some times
I miss from where things come... from where things go...
 

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

Great!


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

It was my first time with python + UI when I developed the skin
stuff... you can notice it in drawstringframed() (it is much better
now! Check cvs logs for first versions!!!)


> Man, I really suck at explaining stuff :)

Me too... [ it's kinda hard to explain things in foreign languages! And
I don't even master it in my mother language! ]
 
> >>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.

You should evaluate it. Maybe it won't!
What does the hard processing stuff is goom, which is MMX/SSE
optimized... if you code a python wrapper to call it, the overhead you
may get shouldn't be too large. Then it's a matter of blitting the
surface in the desired area.
   And you don't get too much frames with audio visualization... around
12! Just larger views should be a problem.

   And I'll hold on mpav to CVS a bit... maybe I should port goom to
freevo (BaseAnimation). It should give us more control.
   
   I agree calling different programs is ugly and this is a better
approach.


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

int16_t is signed, uint16_t is unsigned... but I never tried to check
if  there are negative values...

Also, it's hard to tell if its CHN0 and 1... I just use nch from
mplayer, if there's more than 2, nch channels will be exported. Maybe
you should look at mplayer docs/code and try to discover if there's a
fixed order ( 0 = Left, 1 = Right, ... )
   You reminded me of a MPAV bug... if there's only one channel... it
will segfault!
 

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

I agree. See above. I would like to cooperate with you here.

Do you have any experience writing python wrappers for C code? I have
none :(
 

> 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

______________________________________________________________________

Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora:
http://br.yahoo.com/info/mail.html


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