Visualisation plugin API for XBMC - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Visualisation plugin API for XBMC (/showthread.php?tid=137) |
Visualisation plugin API for XBMC - Frodo - 2003-10-12 hi, i'm setting up an architecture which allows other devs to develop a visualisation plugin for xbmc from the settings->music the end-user can select which visz. he/she wants and xbmc will use that one. so how does it work? first : 1. visz. plugins are normal .dlls but with the extension .vis 2. visz. plugins should b copied into the visualisations/ subdirectory on your xbox 3. visz. plugins must use a minimal set of dependencies. they should not depend on windows kernel/gdi or other things! so how to program one? here's a skeleton of a visz. plugin .dll: Quote:// spectrum.cpp: implementation of the cspectrum class. please note that due to a bug in the forums i cant post any underscores. so i replaced the underscores with -- xbmc will first call get_module() to retrieve the visualisation struct. the plugin will give xbmc the visualisation struct filled with function pointers to all visz. routines needed by xbmc well thats it for now. remember this is all premature. no plugins are available yet, but hopefully we'll see one soon frodo - jmarshall - 2003-10-12 frodo: what a great interface! i wonder how long it will take me to port the spectrum analyser... perhaps having the possibility to transfer other information regarding the audio would be a good feature - things such as track, album, artist info etc. might be an idea? i'll look at compiling up the spectrum analyser plugin - the only other dependencies are xmldocument for loading the config file iirc. cheers, jonathan - Frodo - 2003-10-13 hehehe, yeah i must admit i copied the ideas from you visz. classes :d about copying more info, i'll see if i can come up with something frodo - jmarshall - 2003-10-13 that's cool. have you implemented the fft code + delay stuff? if so, i'll look at having a play with getting the sa into a dll. (i haven't done any dll based stuff before, so this should be an adventure - i may ask some questions when i get stuck) cheers, jonathan - Frodo - 2003-10-13 Quote:have you implemented the fft code + delay stuff?yes, well you did. i just copied it into xbmc anyway i forgot 2 add a method to pass the vis_info struct. its added now (see updated skeleton above) when we got a basic plugin working i'll add other things like the album/artist etc info. about the dll, yes its tricky. compiling a .dll is easy, but we dont want any dependencies on windows. so i'm writing my own import libraries now which you can use. when its working i'll put it in cvs together with an complete working example plugin project frodo - Gamester17 - 2003-10-13 very cool, but just wondering how the customizable part in viz such as jmarshall's spectrum analyzer gonna work? (maybe add a set of parameters inside that can be selected from within gui, and/or a seprate xml file for it?) - Frodo - 2003-10-13 Quote:but just wondering how the customizable part in viz such as jmarshall's spectrum analyzer gonna work? for version 1 eperate xml frodo - Gamester17 - 2003-10-13 (frodo @ oct. 13 2003,13:59 Wrote:k, for v2 maybe devide xml into sections (each which own name) & make those selectable from guiQuote:but just wondering how the customizable part in viz such as jmarshall's spectrum analyzer gonna work?for version 1 eperate xml - jmarshall - 2003-10-13 sounds good, frodo. the vis_info struct i figured might be the way to transfer info in the future, but i hadn't really thought about it all that much, though. i had a play with doing some dll stuff last night. i basically just generated a .dll project, then "modified" it via editing the .vcproj file to use xbox stuff. had to muck around with .lib files to include when linking + still didn't get all the stuff it needed - i was kind of shooting in the dark to be honest! let me know when you have some import libraries sorted + the example project and i'll do the sa. cheers, jonathan - Frodo - 2003-10-14 well here's the status so far. 1. i ported your spectrum analyser to a visz. dll 2. xbmc can load it 3. all the function calls seem 2 work (create/stop/start/render...) but the 2nd time i call render() it crashes my guess is that there's something wrong with the directx linking, so i'll look into it frodo - Frodo - 2003-10-14 ok, the 1st visualisation works now i ported the spectrum analyser from jmarshall just press x when playing a song to switch between visualisation & gui visualisation can b found in xbmc/visualisations/ and must b copied -> xbox source of visualisations can b found in xbmc/xbmc/visualisations/source frodo - jmarshall - 2003-10-14 great work, frodo! i'll take a look at it as soon as i can grab the source. cheers, jonathan - Frodo - 2003-10-17 ok, i ported the goom visz. , so that makes 2. however there's one challenge left, and thats to port tripex ( see here for screenshots ) i've contacted the author and he gave me the sources of tripex (thx ben! but now i'm looking for someone to port it 2 xbmc jonathan, are you interessted frodo - Gamester17 - 2003-10-17 (frodo @ oct. 17 2003,09:38 Wrote:ok, i ported the goom visz. , so that makes 2.great work frodo, which version of goom did you port the 'old' one or the new one with 'tentacles'? most users are divded on which one of the two looked/looks best in xbmp, so maybe port both? - Frodo - 2003-10-17 Quote:which version of goom did you port the 'old' one or the new one with 'tentacles'? the new one with tentacles.will see what we can do with the old one frodo |