Posts: 492
Joined: Dec 2006
Reputation:
5
I've been thinking about writing a Python script that will bridge the xbmc native modules (xbmc,xbmcgui,xbmcplugin,xbmcaddon) to a jvm through JNI. I don't think it's that difficult - unless dynamically loading a library from Python is difficult - it looks like I can do it with "ctypes".
Doing this will allow the writing of addons using java or another jre based language (for example, groovy).
Is there any interest in having this?
Thanks
Jim
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
2010-08-16, 14:32
(This post was last modified: 2010-08-16, 14:35 by spiff.)
good idea, but it won't work. the xbmc python bindings are NOT a python library, they are exported directly to the interpreter from c++ code.
we are definitely interested in extending the add-ons to handle more languages, but i do not think this is the way to go about. ideally, we'd export a clean C api, then bindings can be written for different languages. unfortunately this is quite a lot of work since python's tentacles goes deep into the code base.
another way to go about it is to drop some integrability, atleast in the first place, and write a json-rpc interface much like the current plugin api.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
AH, now i follow. i had it the other way around in my head, you loading the python modules from java. yes, this will work, not the prettiest solution but it will definitely work.
Posts: 492
Joined: Dec 2006
Reputation:
5
OK,
I've been looking at the code and considering how to do this. I think you're right about the way I proposed being somewhat of a hack so I've been looking at refactoring the xbmc python built-in/native code. I'm considering giving it a try but I don't want to be wasting my time. As you say - it's fairly major surgery.
How do you handle non-team member xbmc developers that want to make such drastic changes to the codebase?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
usually we handle it through patches on trac.
this will be way too much for that though. my suggestion; clone our git somewhere and publish yours. that way we can follow your work in the git. a trac ticket may serve us good on the coordination of stuff.
irc is best if you need to discuss stuff with us.