Python bindings for PVR
#1
Hi,

I'm interested in writing a PVR addon that will be able to support multiple IPTV providers through specific implementations of various interfaces. I'd like to do this in Python since writing and maintaining something like this in C++ is going to be a hassle.

I understand that currently the only way to write PVR addons is using C++ so I'd like to create Python bindings that would allow to make Python PVR addons.

Unfortunately, I have zero knowledge of the Kodi source code, so I would appreciate if someone experienced with the PVR and addon architecture could give me some hints and point me in the right direction.

Questions:
  1. Are there technical limitations that currently make Python PVR addons an impossibility?
  2. What should be the steps in adding this kind of capability?
  3. Which areas of the code should I be looking at?
  4. Is there a clear example of a previous similar project that added Python support for what previously was only possible through a binary addon?

Thanks!
Reply
#2
1) no. certain aspects might be designed for a fast reponsive language and not a scripting language, but it would not be fundamentally impossible, just awkward.

2) several ways to do this. in my opinion the way to do this with minimal effort is is to create a python bridge as an addon. this addon communicates with kodi, then proxies on to a python script. this bridge would be written in C++ and should be reusable. one good thing about this approach is that you'd work almost entirely on the outside of the kodi code base, lessening the learning curve (you only have to relate to the PVR api).

3) if you do not like this approach, you should look at the python bindings generator used in kodi, and then create python bindings mimicking the c++ bindings. relevant code sits in

- xbmc/pvr (the actual pvr code using the clients)
- xbmc/addons (callback classes)
- xbmc/addons/include (interface definitions)
- xbmc/interfaces/legacy (code for the python bindings)
- xbmc/interfaces/swig (python binding generation - swig bits)
- tools/codegenerator (python binding generation - groovy bits)

4) no. no such projects have been attempted. there was support for python addons long before binary addons and they have been used exclusively for different features.
Reply
#3
Thank you very much for the help. This will give me a while to look into things! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Python bindings for PVR0