On Wed 28.07.2004 at 09:23:01PM +0200, Dirk Meyer wrote:
> Matthieu Weber wrote:
> > Besides, if we have two apps running at the same time (e.g. mplayer for
> > the music and the image viewer, or mplayer for video and the menu
> > displaing inside mplayer), both app must have an eventhandler, but
> > only one (the image viewer) has the focus.
> 
> We already have this. There is an event that the audio player
> stops. When you use the image viewer with background music, the viewer
> doesn't care about that event, the background player does.

Wouldn't it be useful to control the image viewer with the remote
control, rather than the music player?

I've never used the detach_audio feature (my freevo is probably too
old), but my guess would be that once it has been detached, you should
not control it anymore, unless you re-attach it again. I mean, it's
probably not user friendly to have the RC control an app, while the user
sees the interface of another app.

Besides, it would be good to be able to browse directories while
listening to music, in order to choose what song you are going to play
next, without having to interrupt the music *before* browsing the dirs.

Anyway, I'll try to have Freevo 1.5 work on my Woody this week-end and
take a look into its bowels again.

> Right now we have a focused app. This app gets the event. If it
> doesn't need it, it will be passed to all plugins until someone does
> use it.  
> 
> > Main loop: waits on filehandlers with the "select" system call. Each
> > plugin dealing with sockets/pipes registers a data handler to the
> > main loop, and when data is available on one of those (e.g. select wakes
> > up), the data handler of the plugin is called in order to process the
> > data. 
> 
> This is the basic idea, but ...
> 
> > This architecture also removes the "sleep" from the main loop, which was
> > much discussed about some time ago.
> 
> ... pygame doesn't give us anything to select. You can't get a
> filehandler for the keyboard or when a redraw needs to be done. The
> latest gui tests and checking about a main loop gives me one solution:
> pygame sucks, replace it.

Well, the main idea of select is to put the current execution thread to
sleep mode until some event (here: data available on a file handler)
wakes it up. But there are other ways to put a thread to sleep mode
(the sleep function does it, and another thread can probably put it to
sleep (suspend it) too).

> > This is a mystery for me: in what case should an event be passed to the
> > parent of an app?
> 
> When you don't register to a specific event, it may be possible that
> your parent may need it. Problem with registering: each directory
> wants to get notified when the directory on disc changes. But only the
> current displayed directory should get that event. 

Why couldn't the "directory change event" be given to all directories
(since they would all have registered for this type of event), but only
the one currently displayed would do something about it (because it
knows that it is displayed, whereas the other are not)?

Matthieu
-- 
 (~._.~)        Matthieu Weber - Université de Jyväskylä         (~._.~)
  ( ? )                email : [EMAIL PROTECTED]                  ( ? ) 
 ()- -()               public key id : 452AE0AD                  ()- -()
 (_)-(_)  "Humor ist, wenn man trotzdem lacht (Germain Muller)"  (_)-(_)


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to