On Wednesday 10 December 2003 20:58, Dirk Meyer wrote: > Viggo Fredriksen wrote: > > > Hi! > > > > I'm working on implementing an audio detach bar (with modified a > > detach.py). > > > >>From detach.py I call plugin.activate() for my DaemonPlugin. This > > > > works as expected. I also have a draw() function in this plugin, and I > > need to have a reasonably high poll_interval for the time > > elapsed/remaining/etc for the plugin to be usable. When playing is over, > > the poll of this plugin is therefore unnecessary. > > > > So, the problem is getting this plugin removed from the list of plugins > > where the initial draw() is called. I've tried plugin.shutdown, but all > > this seems to do is to call the shutdown for my own plugin. > > > > I have tried to find answers in the code, but so far I've been > > unsuccessfull. > > Any thoughts? :) > > > Right now it's not possible to remove a plugin at runtime. Basicly you > need a low value for poll_interval when playing and you don't want to > be called when you are not playing, right? You can't do it, but you > could set poll_interval to something large 100000 to avoid unneeded > polling. But still, you need to be prepared that the poll() function > is called when you don't need it. Just return than. > > > Does this help? > > > Dischi > > -- > "We're back to the times when men were men and wrote their own device > drivers" > -- Linus Torvalds > >
I've tried adjusting the poll_interval when I don't need it to draw. Eg. setting it to 10 when drawing, 99999 when not. It does however not seem to change after the interval is set for the first time in the __init__. Regards Viggo Fredriksen ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel