How to contribute
Downloading the latest code
The code is maintained in a mercurial repository. You can fetch it with the following command :
hg clone http://mroy31.dyndns.org/repository/deejayd/
Sending in your changes
mercurial is easy and makes it easy both to integrate your patches and to give you credit for what you have contributed.
Patches by email will of course also be more than welcome.
The code
Main source
Overview
All of Deejayd's source code is located in the root directory. You'll find in there :
- packaging for some distributions
- translations
- distutils script.
- the deejayd python module
- the test suite and its launcher.
- some documentation, especially the protocol documentation.
- the launcher scripts
The prepare script changes some permitions and sets up some symlinks because darcs cannot hold this information. You should run it first, especially if you want to work on djmote.
The deejayd module
This module holds all of deejayd's fonctionnality.
First, there is an interface which aims at being shared among the client library and the core facade used in the server.
The mediadb and the database work together to populate some relationnal database tables according to you media files.
The player, either using the Gstreamer or the Xine backend gives us media playback. This playback capabilities gets used by the various available sources (such as playlist, webradio, dvd, etc).
Then there are the Twisted factories for both the net protocol and the web interface.
Those two manipulate the core facade which is a frontend to all those components.
The pytyxi module
Those are the Python ctypes bindings to xine-lib. To module holds ctypes declarations of the used C functions (pytyxi/_*.py modules) and object-oriented interfaces to xine-lib. See the bottom of the xine bindings for example usage and the stuff that glues this to deejayd for an advanced usage.
The test suite
The full test suite may be launched using this simple line :
./tests.py
It accepts some options to narrow down which tests it is to run. Those options are documented in the test suite launcher source.
Each test module is a python file named test_*.py which sits in the testdeejayd directory. There are a few helpers for building tests, such as launching a test server or building dummy media files to test the library on real data.
There is a special test module which ensures that the deejayd core and the client library share the same interface (API). This way, if you for for instance a python GTK client to deejayd, it can become a full blown media player by only changing one line of code.
The net protocol documentation
The Deejayd net protocol documentation is generated from the commands source using a simple documentation generation script.
