Win How to approach coding an XBMC extension
#1
Hi.

I'd like to extend XBMC with some proprietary natural user interaction device. So that this device can be a remote control, most importantly to shift select up/down/left/right and to confirm (<enter>). I already have C++ code for that device, which I'd like to make use of. This code generates events whenever an action is performed, but also before that, when "it" thinks the user is about perform an action, and keeps updating a "intention of the user" for the actions (i.e. it provides continuous feedback to the user, this is crucial for this kind of interaction to work). When integrating the C++ code into other applications, I already found some visualizations for displaying the intentions. They work well, and I'd like to use them in XBMC, too.

I'm completely new to XBMC development and I've spent some time now figuring out a way how to integrate this. It seems that it is possible write so-called addons in Python. The API that XBMC offers to Python addons unfortunately won't cut it for me. I saw that it is possible to move the selection up/down/left/right etc., and to create a small set of pre-selected widgets (e.g. progressbars, checkboxes, windows, etc.), but the visualization of the user's intention requires UI elements which are not offered by xbmc.gui. What I'd basically like to have is the freedom to provide pixmaps/bitmaps (with alpha channel) that contain my own visualization.
Is that possible? If so, how? Are there guides explaining how to develop C++ DLL addons? (Oh, I almost forgot to mention, I'm using Microsoft Windows 7 and my priority is to get it to work there, but a platform-independent solution would be a nice extra).

Cheers!
NZ912
Reply
#2
If all you need to do is throw a texture onscreen then you could use a modeless dialog to do so which might be available in python.

Otherwise you'll need linkage code between whatever dll you're writing and XBMC, i.e. you'll need to modify XBMC itself.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
With your first statement, are you implying simply to have another python dialog on top / over of the XBMC window (and not actually inside it)?

Personally, I would really like to avoid using Python, since the library that controls my device is a C++ library (of which I do have the source, though). I am not sure as to whether it's even possible to integrate this C++ code seamlessly into XBMC's Python environment (I saw a general guide here). I'd prefer to write in C++ directly. It seems to be possible to use a native interface, but that's undocumented. Thus, I'm thinking about extending XBMC in its C++ code directly. Do you guys have additional advice?
Reply
#4
bump
Reply
#5
what you're asking is not implemented yet. the only c++ add-ons that are currently supported are pvr add-ons
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#6
(2013-06-06, 13:56)spiff Wrote: kmb32123; see here - https://launchpad.net/~arne-morten-kvarv.../+packages

this is my work for binary add-ons. you can find some examples for opengl there (sources are available in the .orig tar balls) - in particular spectrum or waveform should be pretty straight forward.
spiff wrote this here: http://forum.xbmc.org/showthread.php?tid=157321
Haven't actually looked at this, but perhaps this might be of use to you.
Reply
#7
Hi. Thanks for your help. I've been researching all afternoon and come to the conclusion that it is best to write a pure C++ application which interfaces with XBMC via JSON-RPC. The information/notifications I can send/retrieve this way are sufficient. It will be a bit of a pain to find/write JSON-RPC client for C++ (I have not found any tbh), but still a lot faster than trying to understand the legacy interface of XBMC.

For any drawing purposes, where XBMC gui elements are not suitable, I can simply draw on top of the XBMC window using DirectDraw (this seems like a good library that allows to do that). Cheers!
Reply

Logout Mark Read Team Forum Stats Members Help
How to approach coding an XBMC extension0