MythTV Architecture
0.20.2
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 SVN commits mailing list
If you just stumbled onto the developer pages by accident, maybe you want to go to the official MythTV Installation page. There is also a good unofficial Fedora MythTV installation page, and a Gentoo MythTV installation page.
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. Almost all Qt container objects, including QString, make shallow copies on assignment, the two copies of the object must only be used in one thread unless you use a lock on the object. You can use the QDeepCopy template on most Qt containers to make a copy you can use in another thread.
There are also special dangers when using QObject outside the Qt event thread.
The is also short HOWTO on Profiling MythTV available in addition to documentation on the code itself.
MythTV is divided up into eight libraries:
- libmyth
- MythTV Plugin library. The database, audio, LCD, OSD, lirc, and the myth network protocol are supported by libmyth.
- libmythtv
- Core MythTV library. The recorders and A/V players are supported by libmythtv.
- libmythui
- Main user interface rendering library
- libavcodec/libavformat
- This is the ffmpeg A/V decoding library (aka avlib). Documented Externally.
- libmythmpeg2
- Alternate MPEG-1/2 A/V decoding library. External Website.
- libmythsamplerate
- Audio resampling library Documented Externally. We use this to support a different output sample rates than the sample rate used in the audio streams we play.
- libmythsoundtouch
- Pitch preserving audio resampling library. External Website. We use this for the time-stretch feature.
Two libraries libmythmpeg2 and libmythsamplerate appear redundant, but libmpeg2 decodes MPEG-2 more quickly than ffmpeg on some systems, and libmythsamplerate 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 Database Schema.
MythTV contains 12 applications:
- mythbackend
- This is the backend which runs the recorders.
- mythfrontend
- This is the frontend which is the main application for viewing programs and using the MythTV plugins.
- mythtv
- This is the "External Player" used to play videos from within mythfrontend that are not proper programs, such as your home movies.
- mythtvosd
- This is used externally by programs that want to pop-up an on screen display in MythTV while one is watching a recording.
- mythfilldatabase
- This is used both internally and externally to fetch program listings. Tribune Media provides listings in exchange for demographic information in the USA, and D1 has donated free listings in Australia as thanks for the MythTV code used in their Home Media Centre product. Other markets are served by the XMLTV web spiders.
- mythtranscode
- This is used both internally and externally to transcode videos from one format to another. This is used to shrink HDTV programs to lower quality recordings that match the hardware the user has.
- mythjobqueue
- This is used internally by mythfrontend to schedule jobs such as commercial flagging and transcoding.
- mythcommflag
- This is used internally by mythfrontend to flag commercials.
- mythepg
- This is used internally by mythfrontend to find upcoming programs to record based on the channel and time.
- mythprogfind
- This is used internally by mythfrontend to find programs to record based on the first letter of the program name.
- mythuitest
- This is a test program for libmythui development.
- mythlcd
- This is a test program for MythTV LCD support.
- mythbrowser
- Provides a simple web browser.
- mythdvd
- Launches DVD players such as Xine and MPlayer.
- mythgame
- Launches the xmame classic game system emulator.
- mythnews
- Browses RSS news feeds.
- mythweather
- Presents your local weather report.
- mythgallery
- A simple picture viewer for your TV.
- mythmusic
- A simple music player for your TV.
- mythphone
- SIP based video phone.
- mythvideo
- Video Browser for non-MythTV recordings.
- mythweb
- Provides a PHP based web pages to control mythbackend.
Generated on Sat Mar 15 06:08:59 2008 for MythTV by
1.5.1