Re: [Rhythmbox-devel] Calling an executable for each song in rb library
- From: "Charlotte Curtis" <c f curtis gmail com>
- To: "Jonathan Matthew" <notverysmart gmail com>
- Cc: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] Calling an executable for each song in rb library
- Date: Fri, 27 Jun 2008 11:29:06 -0400
On Fri, Jun 27, 2008 at 10:38 AM, Jonathan Matthew
<notverysmart gmail com> wrote:
> Both the child watch and the timeout will only work when the GLib main
> loop is running.
Okay, that's what I (eventually) figured out. Does it present a
problem for my plugin to have its own main loop (as in the email I
sent a few minutes before yours)?
> Either your plugin has to return control
> from whatever callback or handler is being called, then process the next
> file in the child watch or timeout callback, or it can create a
> thread to do this.
I *think* that's what I'm doing by starting the main loop after
spawning the process, and then stopping it when the process completes.
So far, I haven't run into any problems.
> Query models cannot safely be used from multiple threads, so you'll
> probably have to go with the former, and instead of
> 'for for in model:', I think you'll need to pass around a gtk.TreeIter
> between callbacks to keep track of where you're up to.
I discovered the problem of query models + multiple threads... not
good! I was thinking of the gtk.TreeIter idea - having some kind of
signal-callback system where it progresses to the next item, but it
seems like a pain.
> um.. good luck?
um... thanks? ;-) I really appreciate the help, I'm mostly shooting
in the dark here.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]