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 for VDR 1.7.28:
  • Install the following prerequisite packages (these are the package names in Debian Wheezy; they may be slightly different in other distributions):
          libavformat-dev
          libfontconfig1-dev
          libpng12-dev
          libswscale-dev
          libxext-dev
          libxft-dev
          libxt-dev
          xsltproc
        
  • Download the vdr source code (in Debian, it is sufficient to install the vdr-dev package).
  • Download the mheg plugin source code. Unpack it in the PLUGINS/src directory of the vdr source tree, and then just type "make".
    In Debian with the vdr-dev package installed, it is sufficient to make a PLUGINS/src directory anywhere, and unpack the source in it; any missing vdr header files can be copied from wherever the vdr-dev package put them.
  • Download and build the redbutton plugin source code in the same way.
  • 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