MediaMVP Server - 0.0.11
========================

Introduction
------------

The MediaMVP server is available in two forms:

1. A standalone application

2. A VDR plugin

A common code based is at present used for two parts, it consists of a generic
library for controlling the MediaMVP and an application which generates the
user interface. Some details of how to develop your own application are given
at the end of this document.

Licensing
---------

The mediamvp server is licensed under the GNU Public License - see the file
COPYING in the root directory.

General Installation
--------------------

- Setting up the MediaMVP to boot without the windows server

* You should obtain the file dongle.bin from build 21317 or later. This can be 
obtained from either the Hardware/ directory if you've installed the software,
or by unzipping the installer.

* You need a dhcp/bootp server and tftp server

* Place the dongle.bin in an appropriate place under the tftpd root - eg 
/tftpboot/dongle.bin

* Edit your dhcpd configuration file so that it provides a non-dynamic ip
address to the MediaMVP. You can find out the MAC address by doing a arp -a.
Chances are it starts off with 00:0d:fe..

* Specify a filename in the dhcpd.conf file, this should be dongle.bin, thus
your entry in dhcpd.conf should look similar to this:

        host mvp {
                filename "dongle.bin";
                hardware ethernet  00:0d:fe:XX:XX:XX;
                fixed-address [dotted ip adddress];
        }

VDR Plugin Installation
-----------------------

* You need to install libevent from http://www.monkey.org/~provos/libevent/ 
libevent is used only as an easy replacement for select()

* Extract to PLUGINS/src

* Build the plugin in the usual way (make plugins)

* Create a file called httpradio.conf in /video/plugins this should contain
any shoutcast radio stations you wish to tune into - this should be in the
same format as liveradio in the console/ directory

* Restart VDR including the mediamvp plugin

* mp3 files are read from /home/mp3 

Standalone server installation
------------------------------

* You need to install libevent from http://www.monkey.org/~provos/libevent/ 
libevent is used only as an easy replacement for select()

* Change to the console directory and type make

Configuration (standalone)
--------------------------

- General Configuration

* The file mediamvp.conf is the main configuration file for the standalone
server. It's documented so should be easy to follow what needs to be done.

- Media Configuration

* The files "livetv" and "liveradio" contain redirectors for the various
live TV and radio stations that are exported by the streamdev plugin on
your vdr box. The supplied config contains all (English) UK channels, though
you may want to change the host referenced in the URL (unless your vdr
box is named florence as well!)

* liveradio may also contain redirectors to internet radio stations that 
broadcast in mp3 format.

* The mp3 option in mediamvp.conf should point to the root directory of your
mp3 collection.

* The mpeg option in mediamvp.conf should point to the root directory of your
of your mpeg collection

Tips
----

* You can change TV channels using the up and down keys
* Change settings using Vol+/Vol- OK uses the selected configuration
* You can use different dongle.bin files by specifying the version that
  you are using in mediamvp.conf
* Skip/Replay will step forward/back a page in the menu

Issues
------

* Interface is a little clunky in places
* Aspect ratio is probably slightly broken
* Settings can only be previewed - saving will be enabled soon (done 0.0.3)
* If you switch radio stations then you have to press "OK" twice (fixed 0.0.3)
* Multiple MVPs should be supported, but it hasn't been tested...
* A fair bit of debug information is spat out onto stdout.
* Paths longer than 256 characters are almost certainly broken
* Forward and rewind do not work for mpeg, rewind is broken for mp3


Future
------

* Support for playback of non-streaming mp3 files (done 0.0.5)
* Support for playback of non-streaming mpeg files (done 0.0.7)
* Support for saving of settings (done 0.0.3)
* Interface improvements
* Retrieval of scheduling information from vdr for channel selection screens
* Full integration into vdr as a plugin (partially done 0.0.9)
* Rewrite the non-library code for the plugin in C++

Greater Future
--------------

* Abandon this server and run vdr on the MVP itself (soon...)


Contact
-------

Any crashes (with stack traces) should be sent to dom@suborbital.org.uk

Enjoy,

d.
19/12/2003


MediaMVP Library
----------------

As of 0.0.8, the codebase of the server has been split into two parts:

1. A core library which handles communication with the MVP using the
   Hauppauge protocols

2. An application which links into the library

To start up the library you should call mediamvp_server_start() with
an appropriately configured mvpinit_t object - take a look at main.c
for an example of how to do it.

Details of the functions you can call are listed in mvp/libmvp.h

URL handling - url handling has now been abstracted out to support data
input from different sources, file:// and http:// are handled internally
by the library. To register a different type call this function:

void     urlhandler_add() with the appropriate parameters.

Type should be populated with the type of the media upon open: MEDIA_MPEG or
MEDIA_MP3 or'd with MEDIA_SOCKET if the media is not coming from a file on
disc. This permits buffering to be performed within the library. MEDIA_LIVE
also should be set if the media to be played is not a recording.
