This TV software is designed to be displayed in full-screen on a television, projector, or similar display device. The software manages and renders television broadcasts captured via Linux DVB compatible digital tuners, and is able to process simultaneous program streams (channels) within any transport stream (mux), making an efficient use of the available digital TV tuners.
An electronic program guide is provided for storing and viewing programs that are either currently playing or in the buffer. At the moment, the program guide parses its data directly from www.telkku.com (Finnish only), detects your favourite and must-see programs, and automatically stores them accordingly for later viewing.
The graphics engine doesn't rely on any external libraries, and implements everything from low-level YUV-space rendering to higher level animations and video stream controlling. Visual appearance is designed with simplicity in mind, particularly avoiding any sudden appearance or disappearance of visual elements, resulting in (overly) smooth transitions between states and menus. A remote control is used for user input.
The program is logically separated into two parts: the graphics engine and the control unit.
The graphics engine is responsible for everything visual on the screen. The program uses its own software rendering engine (written in C++) for all graphics. The construct is easily portable to OpenGL as well, and I have an earlier OpenGL version of the engine in use in another project; I will port this to OpenGL as well, if I see the need for it.
At the moment the graphics output is raw uncompressed YUV4MPEG video stream, directly playable with mplayer. The rationale behind such a decision is that the software can be played on any type of display device that is able to output video with mplayer. Not every display device used for watching TV is able to act as a X11 display for example, but almost every configuration can be used with mplayer: console framebuffer devices, decoder cards, etc, including X11 displays. Personally, I use this software with a DXR3 MPEG2 decoder card, which can't be used as a X11 or OpenGL backend.
The control unit launches a modified dvbstream utility as a thread within the software to extract program streams after tuning in on a program multiplex (mux). With the modifications, dvbstream is able to extract multiple concurrent program streams and supply the data internally for the application for further processing. Multiple dvbstream instances, for different DVB tuners, can be launched allowing a simultaneous activation of channels from different muxes.
Any code being in contact with the dvbstream unit is written in C. Most of the control unit is written in C++, and the electronic program guide parser is written in Perl. All software code (graphics engine included) is basically Unix compliant, so it could be ported to any other Unix, whose DVB devices can be accessed with dvbstream. Linux input event interface (evdev) is used for remote controlling, but remote control code is well separated, and is easily replaceable with an alternative interface.
The program is multi-threaded (using posix threads) and uses separate processes for program stream decoding, allowing an efficient usage of about 5 processors. The program can easily run 3 simultaneous channels on a PAL resolution screen with a 2.53 GHz Celeron-D. HD (1280x720) resolution is usable at 20 fps with the EPG view on, and at the full 25 fps while playing a program. Any modern CPU (especially a dual-core) should be able to run the program at full speed with full-HD resolutions, and have plenty of reserve CPU time for possible encoding of stored programs, etc.
The software will be released under another project, later.