Documentation?
#1
i'd like to get into the code to help out from time to time, but i can't find any documentation anywhere on the object model or anything to get started.

i don't really feel like having to figure everything out through trial and error.

please tell me there's a basic object model explanation.

thanks.
Reply
#2
hmmm, well, there is a from code generated helpfile in xbmc\docs\devmanual.rar but it's ancient (almost 2 years old). i think that's about the only "code documentation" there is.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
hi,

no proper documentation is available.

i'll try to give you a short list of useful key code features in xbmc. this will only be a very quick mockup. for details refer to the code...

a) the filesystem
one of the more elegant features of xbmc is it's filesystem classes. these are all located in xbmc/filesystem. the main interface classes here is idirectory, ifile and ifiledirectory (virtual directories, e.g. multi-track sid files). inheriting these we have implemented smb, local, dvd, ftp, rar, zip, xbms, xns, lastfm, shoutcast etc.

b) the dll loader
another very important part of xbmc is it's dll-loader. it enables you to add stuff like codecs (see xbmc/cores/paplayer/icodec.h) in dll's as well as players such as mplayer and the dvdplayer. we have defined macros to make it easy to import from a dll, see dynamicdll.h or e.g. dlldumb.h for an example.

the dll-loader exports its own versions of the standard io functions such as fopen, fwrite, fseek etc. these versions use the xbmc filesystem. this means that anything living in dll-space can just fopen(smb://foo/bar.foo), very handy.

c) settings classes
there are two of these, g_guisettings (guisettings.cpp) for stuff you can configure from the gui and g_stsettings (settings.cpp) for stuff configured from xbmc.xml. see the classes on how to add stuff (fairly easy).

d) handy stuff
lots of handy functions in cutil (utils.cpp).

e) the media windows
example source path: xbmc/guiwindowvideofiles.cpp. this is where the actual sections of xbmc are implemented. admittingly quite a lot of code duplication going one here, but fortunately this means that taking the time to study the workings in one window will get you a very good idea how it works in the others... key classes of interest here: cfileitem (represents files), cguiinfomanager (the guru that knows stuff like which song is playing now etc).

to see how the windows are managed see the guilib. key classes: cguiwindowmanager (the windowmanager that manages stuff like dialogs and windows), cguiwindow (a window) and cguidialog (a dialog like yes/no etc).

f) other classes of interest
imusicinfotagloader - tag loaders.
cstdstring - our preferred string implementation
application.cpp - main code

g) there's a fair amount of libs used in xbmc, such as smb, rar, daap client etc or dlls such as the mp3codec. these are not a part of the main project, the source is packed in docs/ or xbmc/lib and the binaries are in cvs..

this probably doesn't help at all. if you've got any q's, shoot.

(i'm sometimes in #xbmc).
Reply
#4
i've added the above to the online manual. hopefully it can be used as a starting point for others to modify/improve.

thanks spiff!
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
#5
heh, that was unexpected Smile

not exactly well-formulated
Reply

Logout Mark Read Team Forum Stats Members Help
Documentation?0