Re: [Rhythmbox-devel] Rhythmbox And Vala - Questions:

On Mon, 2010-06-28 at 09:52 -0400, Sean McNamara wrote:
> Hi,
> I currently maintain an out-of-tree GPLv2 Vala plugin for Rhythmbox,
> called rbpitch: . 

Hi Sean,

Thanks, very interesting answer.

I did have a snoop around your git repository when looking for some
interesting bits to try and generate (gstreamer filters, in particular).

> IMHO, the most difficult part of creating any out-of-tree bindings for
> Rhythmbox is that there's no explicit plugin API 

I agree and it was kinda why I feel that the work I've done on
generating the .vapis actually is more appropriate for Vala as a first
class language for internal stuff in Rhythmbox than really generating a
plugin interface / binding. (Not that I'm advocating that, just pointing
out it is really getting inside Rhythmbox).

> The way I see it, hiding artifacts that technically _could be_ bound
> is not really productive. It makes the .vapi shorter, but you might
> exclude some functionality that someone needs. These last two
> statements are based on a world where we do *not* have an explicit
> plugin interface; that is, the only thing explicitly plugin-related is
> RBPlugin; the rest of the core is "implicitly" usable by plugins, in
> theory.

Yeah good points. 

One thing I did notice with using/abusing vapigen - exposing methods on
discovery unfortunately doesn't guarantee the bindings are correct (see
array length indicators, vaargs methods etc). I don't see any way (for
now) of automating that part of the process. I'm guessing maybe gobject
introspection will fix all this.

Having a "hidden unless explicitly exposed" approach for the moment at
least provides a barrier for things that aren't yet tested / checked.

> ....As you can tell by reading the .vapi, it is very incomplete,
> and even the included bindings may not be 100% correct. This is
> unfortunately a case of open source laziness, where I did just enough
> hacking on the bindings to get them to work with software I was
> developing to consume them. Now, I'm glad I didn't bind the entire
> rb-core, because your automatic generation probably does a better job
> of that than I ever could.

Hehe, I'm guilty of that too. I've currently got more or less just
enough bound in the .VAPIS to allow me to startup and query the DB and
play around with the shell a little .-)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]