Open fossfreedom opened 10 years ago
multiprocessing using queue - maybe useful? http://blog.pingoured.fr/index.php?post/2014/11/27/Python-multiprocessing-and-queue
dbus is actually simpler here
http://stackoverflow.com/questions/22390064/use-dbus-to-just-send-a-message-in-python
thus coverart browser act as the server - we spawn a separate process that does the hard-work.
the separate process is the client - client talks to the server to get the next item to process. server controls the progress bar.
Every time the client checks for the next item, if the user has cancelled the progress bar, then the client will then quit.
The server will autoquit if the client hasnt returned within - say 40 seconds - this is to catch the case where the client process has died for whatever reason
when implemented we had to use gstreamer blocking because gstreamer 0.10 did not have the capability to watch for signals on the bus.
we can now do that since we are using gstreamer 1.0
rhythmbox-spectrum gives an example how to watch on the bus - lets look to see if this can be used to prevent blocking of the UI.