MythTV
master
|
Over the last couple years MythTV has grown into a rather large application. The purpose of these pages is to provide a portal into the code for developers to get their heads around it. This is intended for both those new to MythTV and experienced with it to get familiar with different aspects of the code base.
If you are just looking for the code formatting standards, see the official MythTV wiki article coding standards. If you are looking for the bug tracker, it can be found on the official pages. If you haven't already, you should subscribe to the developer mailing list and the Commits mailing list
If you just stumbled onto the developer pages by accident, maybe you want to go to the official MythTV User Documentation or MythTV Wiki.
If you are new to Qt programming it is essential that you keep in mind that almost all Qt objects are not thread-safe, including QString. The Qt containers QMap, QSet, QHash, QString, QList, etc are copy-on-write containers. This means that when you assign one container from another the data isn't actually copied. Instead a copy of a pointer to the data is made and the reference count is increased. Then when you actually modify the date or get a modifiable reference into the container an actual copy is made. This means you can return one of these containers efficiently from a function without needing C++11 support. This also means these containers are a bit less efficient than their STL equivalents most of the time. We still prefer them in MythTV code, especially QString due to the extensive i18n support in Qt. QList is actually equivalent to an STL deque. We also use the STL style iterators. This is both because it makes it easier to switch to an STL container in the rare case when it is necessary, such as when we need a reverse iterator iterator, and because they are more efficient than the Java style iterators that Qt also supports.
There are some special dangers when using QObject outside the Qt event thread.
There is a short HOWTO on Profiling MythTV available in addition to documentation on the code itself.
There are also a few simple testing shortcuts.
MythTV is divided up into over 20 libraries:
Lowest-level MythTV library. Used by the Plugins.
Contains the database, and network support code (used by the MythTV network protocol and LCDproc interface).
This also contains some other basic functionality and classes which are used by one or more of libmyth, libmythui and libmythtv.
Any changes to this library's ABI may trigger a MythTV binary version change because the plugins depend on it.
Main user interface rendering library. Used by the Plugins.
The mouse/touchscreen gesture, remote control (LIRC and AppleRemote) and screen saver control code are also contained in this library.
This library depends on libmyth. Any changes to this library's ABI may trigger a MythTV binary version change because the plugins depend on it.
Simple uPnP (universal Plug and Play) support.
This library depends on libmythbase.
Core MythTV library. Used by the Plugins. The audio, MythTV Language Support language support, plugin manager, media manager, and some old UI widgets are implemented by libmyth.
This library depends on libav*, libmythbase, libmythui, libmythupnp and libmythfreesurround.
Any changes to this library's ABI may trigger a MythTV binary version change because the plugins depend on it.
MythTV TV functionality library. Used by some Plugins. The OSD, recorders, video and A/V players are implemented by libmythtv.
This library basically depends on all the other libraries!
This library is used by some plugins so changes to it's ABI may require a MythTV binary version change.
Any changes to classes that are serialized by the MythTV network protocol (for example ProgramInfo) or to the protocol itself require the protocol version number to be incremented.
These together form the FFmpeg A/V decoding library (aka avlib). Documented Externally.
These should be modified as little as possible, and any changes should be sent upstream for inclusion in the FFmpeg project's version of these libraries.
These libraries do not depend on any of our libraries.
Alternate MPEG-1/2 A/V decoding library. Documented externally. This is offered as an option for software decoding of MPEG-1 and MPEG-2 files. FFmpeg is still used for decoding MPEG still frames when this library is selected for playback.
This library does not depend on any of our libraries.
Used for navigating Blu Ray and DVD menus when using the internal player.
This library should not depend on any of our libraries.
This internal library is only used if the system cannot provide version 0.9.3 (or better) or this library.
UK interactive TV viewer.
This library does not depend on any of our libraries.
Support for some multi-channel audio transforms.
This library does not depend on any of our libraries.
Interface between X-windows and NVidia drivers.
This library does not depend on any of our libraries.
The libmythmpeg2 library appears redundant with the system libsamplerate, but libmpeg2 decodes MPEG-2 more quickly than ffmpeg on some systems, and libsamplerate resamples audio with better quality when we only need to match the hardware sample rate to the A/V streams audio sample rate.
The database schema is documented here.
MythTV contains 13 applications which are installed by make install
These tools are in the packaging repository: