Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-03 Thread Dirk Meyer
Mathias Weber wrote: > ok I think we could have an additional method: > > def suspend_all(self, blocked, callback): > TODO > > this one would suspend all blocked elements from the blocked dictionary > and when it is finished call the callback method. So not every one has > to write this cod

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Mathias Weber
Mathias Weber wrote: > Dirk Meyer wrote: >> Dirk Meyer wrote: >>> kaa.popcorn is no Application, the video and audio player _have_ a >>> popcorn instance but do not inherit from it. So application resume is >>> only needed for ressource handling. So I vote for suspend and resume >>> without prefix.

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Mathias Weber
Dirk Meyer wrote: > Dirk Meyer wrote: >> kaa.popcorn is no Application, the video and audio player _have_ a >> popcorn instance but do not inherit from it. So application resume is >> only needed for ressource handling. So I vote for suspend and resume >> without prefix. But we need an extra functi

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Dirk Meyer
Dirk Meyer wrote: > kaa.popcorn is no Application, the video and audio player _have_ a > popcorn instance but do not inherit from it. So application resume is > only needed for ressource handling. So I vote for suspend and resume > without prefix. But we need an extra function can_suspend to check

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Dirk Meyer
Mathias Weber wrote: > Dirk Meyer wrote: >> Mathias Weber wrote: >>> I think suspend would be good for pause the plugin/application but >>> resume is still to generic. And i can't think of something better then >>> resume i looked trough dict.leo but i haven't found something that fits >>> for m

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Mathias Weber
Dirk Meyer wrote: > Mathias Weber wrote: >> I think suspend would be good for pause the plugin/application but >> resume is still to generic. And i can't think of something better then >> resume i looked trough dict.leo but i haven't found something that fits >> for me. >> What would you think o

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Mathias Weber
Dirk Meyer wrote: > Mathias Weber wrote: >> list = self.get_resources('audio') >> >> answer = list[0][0].resource_suspend() > > get_resources should be atomic. So you should try to get all > ressources you need and get a dict as return with the once that failed > without reserving any ressources.

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Dirk Meyer
Mathias Weber wrote: > I think suspend would be good for pause the plugin/application but > resume is still to generic. And i can't think of something better then > resume i looked trough dict.leo but i haven't found something that fits > for me. > What would you think of detach and reattach? S

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Dirk Meyer
Mathias Weber wrote: > list = self.get_resources('audio') > > answer = list[0][0].resource_suspend() get_resources should be atomic. So you should try to get all ressources you need and get a dict as return with the once that failed without reserving any ressources. This is like it is now and I do

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Mathias Weber
Hans Meine wrote: > Am Montag, 02. April 2007 17:59:03 schrieb Dirk Meyer: >> Right, that is why I used plugin_pause and plugin_resume. But you >> could not call this functions on applications. So suspend could be an >> idea for a name, but what about resume? Is it pause/resume for >> playback or s

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Hans Meine
Am Montag, 02. April 2007 17:59:03 schrieb Dirk Meyer: > Right, that is why I used plugin_pause and plugin_resume. But you > could not call this functions on applications. So suspend could be an > idea for a name, but what about resume? Is it pause/resume for > playback or suspend/resume for ressou

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Mathias Weber
Dirk Meyer wrote: > Hans Meine wrote: >> Am Montag, 02. April 2007 17:49:27 schrieb Mathias Weber: >>> I see that you already do start the functions with the names. but >>> actually this are methods in usually you don't do this with methods this >>> is something done in c because there where no enc

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Dirk Meyer
Hans Meine wrote: > Am Montag, 02. April 2007 17:49:27 schrieb Mathias Weber: >> I see that you already do start the functions with the names. but >> actually this are methods in usually you don't do this with methods this >> is something done in c because there where no encapsulation. > > I disagr

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Hans Meine
Am Montag, 02. April 2007 17:49:27 schrieb Mathias Weber: > I see that you already do start the functions with the names. but > actually this are methods in usually you don't do this with methods this > is something done in c because there where no encapsulation. I disagree; "pause" is simply too

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Dirk Meyer
Mathias Weber wrote: > Dirk Meyer wrote: >> >> OK. But do not include it into plugin.py and make an keep it an extra >> file. > > ok you are right. > >> ... The >> functions isApplication and isPlugin are not really needed, you could >> ask isinstance. > > I think isinstance is fine. So I will dro

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-02 Thread Mathias Weber
Dirk Meyer wrote: > > OK. But do not include it into plugin.py and make an keep it an extra > file. ok you are right. > ... The > functions isApplication and isPlugin are not really needed, you could > ask isinstance. I think isinstance is fine. So I will drop the resource_type. > Another idea

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-01 Thread Dirk Meyer
Mathias Weber wrote: > I would add the get_resource/free_resource to the Plugin object. To get > this working I would move the resources.py from ui.aplication to the > core since this is nothing that only belongs to the ui. OK, fine by me. > In addition i would like to propose a new interface

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-04-01 Thread Mathias Weber
Dirk Meyer wrote: > But there is get_ressource() in application. Right now it is used so > that audio player and video player know that the other one is blocking > the audio device. I guess this function would be a good starting > point. Right now only applications can block a ressource, we need to

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-30 Thread Dirk Meyer
Mathias Weber wrote: > I tried to look how to disable a joystick plugin if it was running but > i couldn't get how i could achieve this. First I would need to check > if a joystick plugin is active if yes i have to stop it and restart it > when the emulator is finished. That would be nice to have

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-30 Thread Hans Meine
On Friday 30 March 2007 18:27, Mathias Weber wrote: > I tried to look how to disable a joystick plugin if it was running but i > couldn't get how i could achieve this. First I would need to check if a > joystick plugin is active if yes i have to stop it and restart it when > the emulator is finishe

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-30 Thread Mathias Weber
Dirk Meyer wrote: Mathias Weber wrote: I took a look at the code and you added a comment about yielding in the scummvm part. You are right it would be better if i don't have to wait for the scummvm but how to yield here? since i need to give back a list, or i don't get the list of games? Or did

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-29 Thread Dirk Meyer
Mathias Weber wrote: > ok here is the patch for the games plugin that it works again, there > where some imports missing. > +# kaa imports > +import kaa.utils You mean kaa.notifier here, utils is not used. > # Freevo imports > from freevo.ui.menu import ActionItem, Menu, Action > from freevo.u

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-29 Thread Mathias Weber
ok here is the patch for the games plugin that it works again, there where some imports missing. I took a look at the code and you added a comment about yielding in the scummvm part. You are right it would be better if i don't have to wait for the scummvm but how to yield here? since i need to

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-28 Thread Mathias Weber
Dirk Meyer wrote: > Mathias Weber wrote: >> here is the patch needed and the games directory. > > Thanks, in SVN now. I did some minor consmetic changes (without > testing). Looks very good, thanks. I see that emulator.py is in games > and not games/plugins but I guess it is ok that way. > thanks

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-28 Thread Dirk Meyer
Mathias Weber wrote: > here is the patch needed and the games directory. Thanks, in SVN now. I did some minor consmetic changes (without testing). Looks very good, thanks. I see that emulator.py is in games and not games/plugins but I guess it is ok that way. Dischi -- recursive see: recursi

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-28 Thread Mathias Weber
Dirk Meyer wrote: Cool. In that case I guess I need to start using the games plugin. :) at least someone will use it ;-) Yes please. The dir as tgz + a patch for the other stuff. I will add it to svn and after that only patches are needed. here is the patch needed and the games directory. M

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-28 Thread Dirk Meyer
Mathias Weber wrote: > Dirk Meyer wrote: >> I just took a quick look. Only the stuff in the tgz is needed in the >> games subdir? Looks very promissing. Maybe make emulator not a plugin >> and inherit special emulators from it. >> >> Go for scummvm! > > ok scumm is working. Cool. In that case I

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-27 Thread Mathias Weber
Dirk Meyer wrote: > I just took a quick look. Only the stuff in the tgz is needed in the > games subdir? Looks very promissing. Maybe make emulator not a plugin > and inherit special emulators from it. > > Go for scummvm! ok scumm is working. I moved the emulator to the directory below. There is

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-22 Thread Mathias Weber
Dirk Meyer wrote: > I just took a quick look. Only the stuff in the tgz is needed in the > games subdir? Looks very promissing. Maybe make emulator not a plugin > and inherit special emulators from it. > Yes only the stuff in the tgz is need in the games subdir. the patch i supplied is also need

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-22 Thread Dirk Meyer
Mathias Weber wrote: > Dirk Meyer wrote: >> Please send the code as tgz of the games directory + a patch of all >> non games files. > > ok here is the games directory as tar.gz and the patch for the rest. I just took a quick look. Only the stuff in the tgz is needed in the games subdir? Looks very

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-22 Thread Dirk Meyer
Mathias Weber wrote: > Dirk Meyer wrote: >> Mathias Weber wrote: >>> Dirk Meyer wrote: Please send the code as tgz of the games directory + a patch of all non games files. >>> ok here is the games directory as tar.gz and the patch for the rest. >> >> Thanks. I'm very busy at work this we

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-22 Thread Mathias Weber
Dirk Meyer wrote: > Mathias Weber wrote: >> Dirk Meyer wrote: >>> Please send the code as tgz of the games directory + a patch of all >>> non games files. >> ok here is the games directory as tar.gz and the patch for the rest. > > Thanks. I'm very busy at work this week (last week vacation and CeB

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-16 Thread Mathias Weber
Dirk Meyer wrote: > > Thanks. I'm very busy at work this week (last week vacation and CeBIT > is starting this week). I will have time on Friday to look at it. No problem I didn't even get time to read my emails this week. But not because of the CeBIT. I won't get started with the scummvm plugin

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-13 Thread Dirk Meyer
Mathias Weber wrote: > Dirk Meyer wrote: >> Please send the code as tgz of the games directory + a patch of all >> non games files. > > ok here is the games directory as tar.gz and the patch for the rest. Thanks. I'm very busy at work this week (last week vacation and CeBIT is starting this week).

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-12 Thread Mathias Weber
Dirk Meyer wrote: Please send the code as tgz of the games directory + a patch of all non games files. ok here is the games directory as tar.gz and the patch for the rest. There are two different game plugins at the moment the emulator plugin, this should work for most of the emulators (i h

Re: [Freevo-devel] Freevo 2.0 Games Plugin

2007-03-11 Thread Dirk Meyer
Mathias Weber wrote: > I got a first version of the games plugin working. Maybe someone with > more knowledge about Freevo 2.0 takes a look at it and tels me what i > should improve. Please send the code as tgz of the games directory + a patch of all non games files. > I didn't write it as a Medi

[Freevo-devel] Freevo 2.0 Games Plugin

2007-03-11 Thread Mathias Weber
Hi I got a first version of the games plugin working. Maybe someone with more knowledge about Freevo 2.0 takes a look at it and tels me what i should improve. I didn't write it as a MediaItem since i saw know way this would fit. There are two different game plugins at the moment the emulator p

Re: [Freevo-devel] freevo 2.0 Games plugin

2007-02-15 Thread Dirk Meyer
Mathias Weber wrote: > is there some one porting the game plugin for freevo 2.0? If not i will > give it a try. Not that I know off. Regarding the plugin, I guess all the additional_arg stuff in directory is kind of ugly. Maybe you can find a better idea, e.g. making plugins for each type of game

[Freevo-devel] freevo 2.0 Games plugin

2007-02-15 Thread Mathias Weber
Hi, is there some one porting the game plugin for freevo 2.0? If not i will give it a try. Mathias - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to shar

[Freevo-devel] Freevo 2.0 Games Plugin

2005-08-28 Thread Daniel C. Casimiro
Hey, I am trying to fix the games plugin in CVS so that it works again. I am learning the plugin system at the same time. Could someone take a look at what I have so far and provide me some feedback? What is attached: This is a simplified version that only implements the essen