View Full Version : 'Loading' screen for plugins
2004-04-11, 06:18 PM
How would I put up a 'loading' screen to indicate the plugin was going out on the net to gather data (like the weather data for example)? *I don't see how I would render the loading screen and return to gb-pvr and still go out, get the data, and render the 'real' weather screen.
Do we need a new plugin method like:
// returns true to render something and false if no splash screen
public bool SplashScreen()
Because this can be a lengthy operation, you probably need to to launch a worker thread to retrieve the information which would set a "complete flag" when done. Render should set the bRequiresMoreRendering flag, until the operation is complete forcing it to be repeatidly rendered. Render() should should a "loading" messages until it has completed.
I expect this same approach would probably also be used by much longer processes such as a DVD Ripper plugin, which might show a percentage complete etc.
2004-04-11, 06:45 PM
Thanks. That's on my list of things to do http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif
2004-04-11, 06:57 PM
An even better thing would be if u could return to the main menu and start another plugin while the riping goes on...
Could be done with a service...
Maybe a service that with plugins, so you would have a frontend plugin inside GBPVR that comunicates with the service that runs the plugin that does all the real work.
Maybe when the BGPlugin deactivates, it would set the services priority to low. That way you could still watch a movie or watever....
You actually should be able to implement that sort of approach with the current plugin architecture (without the service).
The plugin could be coded to show then either a screen for a initiating a DVD rip, or a progress screen with a cancel button. That way when they first visit the screen and initiate a DVD rip, a worker thread would be started (possible low priority), which preforms the ripping. The user would be free to continue using GB-PVR for whatever they like. If they return to the plugin, they user would be shown up to date progress information that was reported by the ripping thread.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.