MHEG plugin for VDR

Here are some trivial patches to the "redbutton" MHEG display program which convert it into a plugin for "VDR", a popular DVB viewing/recording program.

The purpose of this plugin is to view the "Redbutton" interactive data service which is broadcast in the UK by the BBC. I believe that a similar service exists in a few other countries, such as New Zealand.

This plugin is INCOMPLETE and EXPERIMENTAL. I am still developing the code, so please don't download it and expect it to work straight away. I am doing my development under Debian, with a DVB-S card and "Freesat", and using the "xineliboutput" plugin for output. I don't guarantee that this code will work in a different environment; in particular, it creates an OSD display that occupies the whole screen, and I think that the hardware of a "fully-featured" DVB-S card does not support this.

Screenshots

Home screen

Weather map

Sport Multiscreen

Building

There are actually two plugins, named "mheg" and "redbutton". The "mheg" plugin runs in the background and downloads the data; the "redbutton" is responsible for displaying the data on the OSD.

To build the VDR plugin in Debian Squeeze:
  1. Install the following prerequisite packages:
          vdr-dev
          libavformat-dev
          libfontconfig1-dev
          libpng12-dev
          libswscale-dev
          libxext-dev
          libxft-dev
          libxt-dev
          xsltproc
        
  2. Download the files for the "mheg" plugin from here into an empty directory. Run the shell script "makeit.sh", which will check out the redbutton source, patch it and build the plugin.
  3. Download the files for the "redbutton" plugin from here into another empty directory. Run the shell script "makeit.sh", which will check out the redbutton source, patch it and build the plugin.
To build the plugins by hand:
  1. Build vdr version 1.6.0 from source.
  2. In the vdr source directory, checkout the source code of redbutton-download and redbutton-browser programs with the following commands:
        svn co https://redbutton.svn.sourceforge.net/svnroot/redbutton/redbutton-download/trunk --revision 538 PLUGINS/src/mheg
        svn co https://redbutton.svn.sourceforge.net/svnroot/redbutton/redbutton-browser/trunk --revision 541 PLUGINS/src/redbutton
        
    Note that this puts the redbutton-download source in PLUGINS/src/mheg and the redbutton-browser source in PLUGINS/src/browser
  3. Download the files for the "mheg" plugin from here into PLUGINS/src/mheg, and apply the patch redbutton-download-538.patch. Run "make" in this directory.
    This should build a plugin file PLUGINS/lib/libvdr-mheg.so.1.6.0
  4. Download the files for the "redbutton" plugin from here into PLUGINS/src/redbutton, and apply the patch redbutton-browser-541.patch. Run "make" in this directory.
    This should build a plugin file PLUGINS/lib/libvdr-redbutton.so.1.6.0

Running

The code requires access to an X11 display in order to work. It does not write anything to the display - all output is via the OSD - but the code makes extensive use of X11 functions which need a display handle. If you are running vdr as a daemon, you will need to give it permission to access the display: I did this simply by running the command "xhost +local:". If you are running vdr on a headless box, you will have to install xvfb.

Tune to BBC1 and select the redbutton plugin from the main VDR menu. You should see a icon in the corner of the screen, telling you to press the red button.

I put the following line in keymacros.conf:
Red @redbutton Red
so that pressing the red button both selects the plugin and sends the initial red button keypress.
To exit from the plugin, press the "stop" button.

Bugs and features

Author

All the redbutton download and browser code was written by Simon Kilvington for his standalone MHEG browser, which is available from http://redbutton.sourceforge.net. All thanks, bouquets, bottles of wine and cheques for large amounts of money should be sent directly to him.
All I have done is to convert the stand-alone programs into VDR plugins. However, this makes me solely responsible for all the bugs in these plugins, so please send all your brickbats, complaints and patches to fix bugs to me: john (at) pond-weed.com