State of bindings

Hi friends!

I am currently working on that caps and options branch you probably have
heard of (I promise, it will be there soon!), and since I am a lazy boy,
I decided to write tests for it in python, which means less code to
write to test more ;).  Doing this allowed me to get a good idea of the
current limitations of our bindings (most of this would also apply to
javascript or vala) and compiled a quick list for you:

1/ Things that would require fixing in Grilo

 - lack of support for the life length of our callbacks and associated
user data: right now, only works properly if a reference is kept on the
python/js/whatever side, to ensure it isn't destroyed. This might need a
change on our async API (see "Scope types"[1]).
 - things would be more pythonic if "properties" were available as
instance properties instead of through getters/setters. I'm not sure yet
of how to do this, but I suspect that having all these implemented as
proper GObject properties could do it. Need investigating to make sure
of that.
 - I don't think we can write (and load) a source in python or
javascript.  There's probably not much to do for that to work in python,
since pygobject allows you to subclass GObjects in python. What's
missing is a way to load python sources and a lot of testing. To load
the sources, we could do something like GStreamer's python plugin[2]. It
basically looks for gstreamer elements in predetermined paths, and make
them available like any C element to applications.

2/ Things that would require fixing in GObject-Introspection and/or

 - Constructors: need to call<args>) instead of
SomeClass(<args>); see [3]
 - DateTime not supported -> and
 - Support for optional arguments/default values (need to do Grl.init(0,
null) in js, Grl.init([]) in python) -> file bug?
 - no documentation of bindings; fixing that is already in the goals of
the Berlin hackfest[4]
 - async functions and their callbacks require the user_data parameter;
should work like signals do (a variable number of args are passed to
connect(), and then forwarded to the callback) ->


If you noticed something that I forgot, or if you know more about how
these things would apply to bindings other than python, please reply!



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