This is a "plugin" for the Video Disk Recorder (VDR).

Initial versions by:         Roland Praml
Further development by:      The Softdevice Team
                             Stefan Lucke, Torgeir Veimo, Martin Wache

Project's homepage:          http://softdevice.berlios.de


Description:
------------

This plugin is a MPEG2 decoder.
It can be used as an output device for the vdr. Possible output devices are
Xv, DirectFB, Vidix or a framebuffer.


Requirements:
-------------

- libavcodec (i took the one shipped with ffmpeg 0.4.8)
- libavformat (also included in ffmpeg)
  It is recommended that after building ffmpeg you do:
  make install
  make installlib
  By this it is guaranteed that all libraries _and_ headers
  get installed.

- ALSA

And one of the following:
- DirectFB compatible VGA-Card
- DirectFB (I use cvs, 0.9.20 should work also)
- DFB++ (I use cvs, 0.9.20 should work also)

 OR
- Vidix compatible VGA-Card
- Vidix-library

 OR
- XV compatible VGA-Card

 OR
- A strong CPU and a Framebuffer with 16 bit

Typically a CPU with around 1 GHz gives you smooth playback for
all accelerated video out methods (all except framebuffer).

Installation:
-------------

This plugin is written for VDR 1.2.x and VDR 1.3.x

As usual, unpack the plugin and make a link in the
./VDR/PLUGINS/src directory

By default you should "cd" to softdevice directory and run "./configure" .
This will generate config.h and config.mak files, which will guide make.
Available parameters of configure are listed by "./configure --help" .

To get rid of these generated files a "make dist-clean" should be done.

Without running configure, you'll have to modify the Makefile to your needs.
Comment out all ouput methods that you don't plan to use
( put a "#"-sign in at the start of the line ). Adjust the path to libavcodec
in the Makefile, and disable all other features you don't want.

If you don't plan to use Xv,set up a framebuffer on /dev/fb0

recommened resolution: 768x576
16bit with Framebuffer output
32bit with DFB/Vidix output

Start vdr with -P "softdevice -vo [your prefered output method]:"
Example:
- vdr -P "softdevice -vo xv:" for X11/Xv
- vdr -P "softdevice -vo dfb:" for DirectFB


If you compiled softdevice with option USE_SUBPLUGINS (the default from
Makefile) and you start vdr with option -L PATH or --lib=PATH , you'll have to
specify that pathname to softdevice too via option -L PATH.


To get a full list of options try "vdr -h"

Set the PrimaryDVB value to the last device if you own a FF-Card.

Note that we strongly recommend to use Xv, DirectFB or Vidix for output. 
Framebuffer mode is not well maintained and  _completly_ unaccelerated. 


AC3 pass through:
-----------------
For using AC3 pass through, you have to specify the IEC958 device name of
your sound card. Which device to use, can be checked with ac3play.
For my system, ac3play works with: "ac3play -C -D 0,1 AC3_FILE_NAME"

So my vdr call with parameter list for softdevice looks like:
-P "softdevice -ao alsa:pcm=default#ac3=hw:0,1# -vo dfb:mgatv"

Notice the trailing '#' of the last alsa subparameter.

AC3 pass through is mainly based on the code of ac3play-0.5.2f, so
many thanks to the authors of that program.

Problems/todo:
--------------
What does NOT work:
- Other depths than 16/15 bit framebuffer are not supported. (in FB-mode)

The code in the plugin is based on parts of:
- mplayer
- mpeg2dec
- alsa
- ac3play-0.5.2f

Many thanks to:
- Colin Paton
- Herbert Attenberger
- Holger Waechtler
- Konrad Naumann
- Luca Olivetti
- Lucian Muresan
- Malcolm Caldwell
- Marko Mkel
- Martin Wache
- Nicolas Huillard
- Roland Praml
- Rolf Ahrenberg
- Stefan Lucke
- Torgeir Veimo
- Vadim Catana

