Development: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Gamester17
 
(93 intermediate revisions by 22 users not shown)
Line 1: Line 1:
'''XBMC Media Center''' (formerly named "''XBox Media Center''") is a [http://en.wikipedia.org/wiki/Free_and_open_source_software free and open source software (GPL)] [http://en.wikipedia.org/wiki/Cross-platform Cross-platform] media player and entertainment hub. Originally developed as [http://en.wikipedia.org/wiki/XBox_Media_Player XBox Media Player (XBMP)] for the first-generation [http://en.wikipedia.org/wiki/Xbox Xbox game console] in 2002, XBMC have since also been ported to also run natively under [[XBMC for Linux|Linux]], [[XBMC for Mac|Mac OS X]] (including the [[XBMC for Mac on Apple TV|Apple TV]]), and [[XBMC for Windows|Microsoft Windows]] operating-systems.
{{Kodi_development_nav}}
{{mininav}}


=Contributing to the XBMC project=
__TOC__
Third-party developers/programmers can make and submit [[What_Is_Source_Code|source code]] patches/modules with new features, functions, or bug-fixes to us via our [http://trac.xbmc.org Tracker (Trac)] on this site.
{{-}}
== Topics ==
{{see also|Category:Development}}
{{development links}}


The XBMC source code structure uses a fairly modular design (with libraries and DLL files), the structure is large, though relatively easy to grasp by most programmers. XBMC's source code is predominantly written in the [http://en.wikipedia.org/wiki/C%2B%2B_(programming_language) C++ programming-language], though there is a small splattering of C libraries and assembler for good measure. XBMC for uses the Microsoft DirectX multimedia framework (Direct3D) on the Xbox, and the [http://en.wikipedia.org/wiki/Simple_DirectMedia_Layer SDL (Simple DirectMedia Layer) framework with OpenGL rendering] for all other operating-system platforms versions of XBMC, (ie. [[XBMC for Linux port project|Linux]], [[XBMC for Mac OS X port project|Mac OS X]], and [[XBMC for Windows port project|Microsoft Windows]]).
== Source code ==
* See: https://github.com/xbmc/xbmc


The main XBMC program is developed using [http://en.wikipedia.org/wiki/Microsoft_Visual_Studio Microsoft Visual Studio] for the Xbox and Windows builds of XBMC, and there are [http://en.wikipedia.org/wiki/KDevelop KDevelop] project files for Linux, and [http://en.wikipedia.org/wiki/Xcode Xcode] project files for Mac OS X).  For the Xbox version a copy of the latest [[XDK|Microsoft Xbox SDK (a.k.a. XDK)]] is also required, though obviously this is not required for any other of the platforms can be compiled on.  
== Development Tools ==
* [http://www.stack.nl/~dimitri/doxygen/ Doxygen] - Source code documentation generator tool.


XBMC's code also contains three player cores: One core based on [[MPlayer]] that is only available to the Xbox version of XBMC, another [[DVDPlayer|in-house developed (FFmpeg-based) dedicated video-player core]] that is used for video playback on all other platforms, and an [[PAPlayer|in-house developed dedicated music-player core]] which works on all platforms.
== People who can help you with specific development areas of Kodi ==
Your first point of call is to post on the forum in the development section. This will attract the attention of the developer knowledgeable in the field you are working on.


Some of the XBMC libraries are in the C [http://en.wikipedia.org/wiki/Programming_language programming-languages] but those then uses a C++ wrapper and are loaded via XBMC's own DLL loader. The Xbox Operating-System/BIOS is kind of Win32-based however it does have all of the resources or capabilities of a full Microsoft Windows Operating-System, (for example: DirectShow, registry, nor DLL are nativly supported on the Xbox). Because of the constraints on the hardware  (like only 64MB shared memory and a 733Mhz PIII CPU) and the XDK environment of the Xbox, all software development for XBMC is highly focused on reserving the limited resourses that exist, the main hindrance of which is the amount of available random access memory at any one time, (which is why XBMC code structure is built so modular, enabling libraries to be unloaded when they are not in active use). For more detailed information about XBMC inner working please follow these links and the categories at the end of this article:
== Other tools and resources ==
Though any other tools or resources are not required they can possibly help in development.
* Eclipse CDT Setup For XBMC Development
* [http://www.stack.nl/~dimitri/doxygen/ Doxygen] - Source code documentation generator tool.
* [http://valgrind.org Valgrind] (for Linux) - a free Linux programming tool for memory debugging, memory leak detection, and profiling.
* [http://www.daimi.au.dk/~sandmann/sysprof/ Sysprof] (for Linux) - a free System-wide Linux Profiler for tracking CPU usage. Sysprof is a sampling CPU profiler for Linux that uses a kernel module to profile the entire system, not just a single application. Sysprof handles shared libraries, and applications do not need to be recompiled. In fact they don't even have to be restarted. Just insert the kernel module and start sysprof.


=XBMC programming and code formatting convention guidelines=
== General guidelines ==
:'''Note!''' More specifics to come based on ongoing discussions, see [http://forum.xbmc.org/showthread.php?t=5238 Proposed code formatting conventions for XBMC]
* Code documentation (DocBook, rst, or [http://www.doxygen.org doxygen] for the code documentation steps, preferably the latter, [http://www.doxygen.org doxygen])
 
* Self-containment - Kodi should be as little dependent as possible on operating-system and third-party services/daemons/libraries
==General guidelines==
** Kodi should for example contain all file-system and network-client (like samba) support built-into the XBMC package
* Code documentation (DocBook, rst, or [http://www.doxygen.org doxygen] for the code documentation steps, preferably the latter, [http://www.doxygen.org doxygen]).
**Like for example every field of public API structures should have a doxygen comment.
* Self-containment - XBMC should be as little dependent as possible on operating-system and third-party services/deamons/libraries
**XBMC should for example contain all file-system and network-client (like samba) support built-into the XBMC package
* Modular design - independent modules made up by localized/isolated code libraries without dependencies
* Modular design - independent modules made up by localized/isolated code libraries without dependencies
** XBMC should still compile and run if a non-essencial module/library is disabled or removed
** Kodi should still compile and run if a non-essential module/library is disabled or removed
* Aim for the GUI/interface to run smoothly on a low spec computer (less than 1Ghz)
* Aim for the GUI/interface to run smoothly on a low spec computer (single core with less than 1Ghz)
**3D graphic controller (GPU) will always be required hardware for XBMC so try to utilize the GPU as much as possible
** 3D graphic controller (GPU) will always be required hardware for Kodi so try to utilize the GPU as much as possible
* Avoid harddisk trashing (excess read/write/erase cycles), so no harddrive paging, (utilize RAM memory intead).
* Avoid hard-disk trashing (excess read/write/erase cycles), so no hard-drive paging, (utilize RAM memory instead).
**End-users will be running XBMC and the operating-system on Solid-State memory as a [http://en.wikipedia.org/wiki/LiveDistro Live CD (LiveDistro)] of a USB-key
** End-users will be running Kodi and the operating-system on solid-State memory as a [http://en.wikipedia.org/wiki/LiveDistro Live CD (LiveDistro)] of a USB-key
* Fast load and boot times for end-user perception (other thing can still run/start in the background without the user knowledge)
* Fast load and boot times for end-user perception (other things can still run/start in the background without the user knowledge)
 
** 15-seconds or less from when the end user press the power-button on the computer till he/she can browse the GUI
==User-friendliness is next to godlyness==
One of [[Team-XBMC]] major ongoing goal have always been to make XBMC and its [http://en.wikipedia.org/wiki/user_interface user interface] even more [http://en.wikipedia.org/wiki/intuitive intuitive] and [http://en.wikipedia.org/wiki/user-friendliness user-friendly] for its [http://en.wikipedia.org/wiki/End-user end-users], based on the '''KISS''' ('''K'''eep '''I'''t '''S'''imple '''S'''tupid) philosophy. We think that [http://en.wikipedia.org/wiki/Usability usability] is very important for media players like XBMC. Many user interface deciscions are being made by developers who often have little experience in user interface design, in order to improve this, we try to listen to XBMC's end-users for how XBMC is actually being used and how we can improve the user experience. We also aim to do regular overhauls, improving existing features/functions, and scrapping outdated code and features/functions (as "to much stuff" can also be a bad thing).
===XBMC as a whole must...===
*Be easy to install, set-up, configure, and maintain, (so that the end-users do not get fed up with it and quit).
*Have an user interface simple and intuitive enough so that less geek-savvy people are not intimidated by it.
**Make common usage easy, simple '[http://en.wikipedia.org/wiki/Human-computer_interaction Human–Computer Interaction (HCI)]', from the viewpoint of an ordinary user.
*Be able to play audio and video files that have been compressed using divx, xvid, etc. directly out-of-the-box
*Be able to and organize audio and video files in an easy and user-friendly way.
*Use standards and be consistant, (the music section can for example not use completely different controls from the video section)
*Perform actions in the GUI with as few 'clicks' as possible
*Require little to none non-GUI configuration (and all such non-GUI config should be via [[advancedsettings.xml]])
**There is still a little work to be done here, for example RSS-feeds settings need to moved to the GUI
*Look nice.
 
=Development Catagory Sections=
*[http://wiki.xbmc.org/index.php?title=Category:Inner_Workings XBMC Inner Workings]
*[http://wiki.xbmc.org/index.php?title=Category:Development Development]
*[http://wiki.xbmc.org/index.php?title=Category:Skin_Development Skin_Development]
 
=Development HOW-TO=
If you are a programmer/developer but not have access to [http://en.wikipedia.org/wiki/Microsoft_Visual_Studio VS.NET] and the [[XDK]] then you can work on [[XBMC for Linux port project|XBMC for Linux]], [[XBMC for Mac OS X port project|XBMC for Mac OS X]], or [[XBMC for Windows port project|XBMC for Windows (Win32)]], (or you can contribute indirectly by helping [http://ffmpeg.sourceforge.net the FFmpeg project] as all XBMC versions uses [http://ffmpeg.sourceforge.net FFmpeg open source codec-libraries]). See bellow for more information.
 
==XBMC platform-independent HOW-TO guides==
*[[HOW-TO Submit a Proper Bug Report|HOW-TO submit a proper bug report]]
*[[HOW-TO submit an official feature request]]
*[[HOW-TO help with Quality Assurance]]
*[[HOW-TO submit a patch|HOW-TO submit a patch (contribute source code)]]
*[[Basic overview of the XBMC source code]]
*[[Information on Language Support]]
**[[Keyboard Internationalisation|Overview of input methods + code changes for multi keyboard language support]]
*[[HOW-TO debug Dynamic Link Libraries|HOW-TO debug Dynamic Link Libraries (DLL)]]
*[[Building Scripts|Creating Python Scripts (widget plugins)]]
*[[Apply to join the Official XBMC Development-Team]]
 
==XBMC for Linux==
FYI; '''XBMC for Linux''' is a port of '''XBMC for Xbox''':
*[[XBMC for Linux port project]]
*[[HOW-TO compile XBMC for Linux from source code]]
 
==XBMC for Mac OS X==
FYI; '''XBMC for Mac OS X''' is a sub-project of the *[[XBMC for Linux port project]]:
*[[XBMC for Mac OS X port project]]
*[[HOW-TO compile XBMC for Mac OS X from source code]]
 
==XBMC for Windows (Win32)==
FYI; '''XBMC for Windows''' (Win32) is a sub-project of the *[[XBMC for Linux port project]]:
*[[XBMC for Windows port project]]
*[[HOW-TO compile XBMC for Windows from source code]]
 
==XBMC for Xbox==
*[[HOW-TO compile XBMC for Xbox from source code]]
*[[HOW-TO:_Compile_Mplayer.dll|HOW-TO compile mplayer.dll from source code]]
 
=Contact methods=
These are developers forums for XBMC development, (programmers/coders only!).<br>
Respect, these are not for posting feature-requests or end-user support requests!
* IRC: [irc://irc.freenode.net/xbmc-linux #xbmc-linux on freenode] official [http://freenode.net IRC network channel] for the XBMC Linux port project
* IRC: [irc://irc.freenode.net/xbmc-osx #xbmc-osx on freenode] official [http://freenode.net IRC network channel] for the XBMC Mac OS X port
**(You may also sometimes find developers hanging out at [irc://irc.freenode.net/xbmc #xbmc on freenode])
* [http://forum.xbmc.org/forumdisplay.php?f=41 XBMC for Linux port Community-Forum for developers only]
** [http://forum.xbmc.org/forumdisplay.php?f=52 XBMC for Linux port Community-Forum for end-users (unmoderated so far)]
* [http://forum.xbmc.org/forumdisplay.php?f=57 XBMC for Mac OS X port Community-Forum for developers only]
** [http://forum.xbmc.org/forumdisplay.php?f=56 XBMC for Mac OS X port Community-Forum for end-users (unmoderated so far)]
* [http://forum.xbmc.org/forumdisplay.php?f=58 XBMC for Windows port Community-Forum for developers only]
** [http://forum.xbmc.org/forumdisplay.php?f=59 XBMC for Windows port Community-Forum for end-users (unmoderated so far)]
 


== Code guidelines and formatting conventions ==
[[Official:Code_guidelines_and_formatting_conventions|Official: Code guidelines and formatting conventions]]




== Contact methods ==
* IRC: [irc://irc.libera.chat:6697/kodi-dev #kodi-dev on LiberaChat] ([https://libera.chat/ LiberaChat]) focused on Kodi development | via [https://web.libera.chat/#kodi-dev Kodi-dev on Libera Webchat] | Generic Kodi support via IRC: [irc://irc.libera.chat:6697/kodi #kodi on LiberaChat].
* Forum: [https://forum.kodi.tv/forumdisplay.php?fid=93 Kodi Development Community Forum]
* [[HOW-TO:Submit_a_patch]] (where and how to submit source code)


[[category:Appendix]]
[[Category:Development]]
[[category:Inner Workings]]
[[Category:Skin development]]
[[category:Development]]
[[category:Skin Development]]
[[category:Linux]]
[[category:Mac OS X]]
[[category:To-Do]]
[[category:Google Summer of Code]]

Latest revision as of 10:55, 4 December 2021

Development:
Home icon grey.png   ▶ Development


Topics

Kodi development
Specific topics
Skinning
Add-ons

Source code

Development Tools

  • Doxygen - Source code documentation generator tool.

People who can help you with specific development areas of Kodi

Your first point of call is to post on the forum in the development section. This will attract the attention of the developer knowledgeable in the field you are working on.

Other tools and resources

Though any other tools or resources are not required they can possibly help in development.

  • Eclipse CDT Setup For XBMC Development
  • Doxygen - Source code documentation generator tool.
  • Valgrind (for Linux) - a free Linux programming tool for memory debugging, memory leak detection, and profiling.
  • Sysprof (for Linux) - a free System-wide Linux Profiler for tracking CPU usage. Sysprof is a sampling CPU profiler for Linux that uses a kernel module to profile the entire system, not just a single application. Sysprof handles shared libraries, and applications do not need to be recompiled. In fact they don't even have to be restarted. Just insert the kernel module and start sysprof.

General guidelines

  • Code documentation (DocBook, rst, or doxygen for the code documentation steps, preferably the latter, doxygen)
  • Self-containment - Kodi should be as little dependent as possible on operating-system and third-party services/daemons/libraries
    • Kodi should for example contain all file-system and network-client (like samba) support built-into the XBMC package
  • Modular design - independent modules made up by localized/isolated code libraries without dependencies
    • Kodi should still compile and run if a non-essential module/library is disabled or removed
  • Aim for the GUI/interface to run smoothly on a low spec computer (single core with less than 1Ghz)
    • 3D graphic controller (GPU) will always be required hardware for Kodi so try to utilize the GPU as much as possible
  • Avoid hard-disk trashing (excess read/write/erase cycles), so no hard-drive paging, (utilize RAM memory instead).
    • End-users will be running Kodi and the operating-system on solid-State memory as a Live CD (LiveDistro) of a USB-key
  • Fast load and boot times for end-user perception (other things can still run/start in the background without the user knowledge)
    • 15-seconds or less from when the end user press the power-button on the computer till he/she can browse the GUI

Code guidelines and formatting conventions

Official: Code guidelines and formatting conventions


Contact methods