summaryrefslogtreecommitdiff
path: root/README
blob: 1bc093fb047745bd1c5dea41e6ae0705a70a81e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
This is a "plugin" for the Video Disk Recorder (VDR).

Written by:                  Thomas Keil <tkeil@datacrystal.de>
                             Sascha Volkenandt <sascha@akv-soft.de>
                             Dieter Hametner <dh+vdr@gekrumbel.de>
                             Christian Wieninger <cwieninger@gmx.de>

Project's homepage:          http://live.vdr-developer.org

Latest version available at: either http://live.vdr-developer.org
                             or the current cvs version at
                             http://www.vdr-developer.org/cgi-bin/cvsweb.cgi/live/live.tar.gz?tarball=1

See the file COPYING for license information.


IMPORTANT:
==========

This is one of the last developer snapshot versions of LIVE which will
work with Tntnet < 1.6.0.6. In fact only versions of Tntnet up to
1.6.0.1 have been used during development of LIVE and can be used for
shure until today.

Since Nov 17 version 1.6.0.6 of Tntnet has been released with new
features and binary incompatible changes. This version of LIVE works
with that version and still maintains backwards compatibilty to older
versions of Tntnet.

Future versions of LIVE will start to use the new Tntnet
features. This means that backwards compatibility can not be
maintained from that point in time onwards.

We therefor strongly suggest you upgrade to Tntnet with at least
version 1.6.0.6. This new Tntnet version is supported by the current
version of LIVE. Just update Tntnet and recompile LIVE from scratch.


Description:
============

Live, the "Live Interactive VDR Environment", is a plugin providing the
possibility to interactively control the VDR and some of it's plugins by
a web interface.

Unlike external utility programs that communicate with VDR and it's plugins
by SVDRP, Live has direct access to VDR's data structures and is thus very
fast.


Requirements:
=============

VDR >= 1.4.0-2

gcc >= 3.1
if gcc < 4.0:
boost >= 1.32.0		- http://www.boost.org

Tntnet >= 1.5.3		- http://www.tntnet.org/download.hms
Cxxtools >= 1.4.3	- http://www.tntnet.org/download.hms

Tntnet provides basic webserver functions for live and needs cxxtools.
Boost provides some data structures we need. While currently relying on the
full blown package we might provide a stripped down version in the future.

If you optionaly want to regenerate the i18n-generated.h header file
for backward compatible i18n (VDR version prior to 1.5.7) you also
need: (See also the Internationalization section below)

Locale::PO 		- perl module from CPAN www.cpan.org

The default i18n-generated.h header (provided via CVS) contains all
translations from CVS. Users that just want to stay on bleeding development
edge of live do not need Locale::PO installed.

How to get Locale::PO
- Use search function on www.cpan.org to obtain module.
- Check if your distribution provides the package.
  (e.g. in Debian the package name is liblocale-po-perl)

If you added new translations in your language specific .mo file and
still want to use an VDR older than version 1.5.7 you must regenerate
i18n-generated.h by calling make with the target generate-i18n. Only
in this case you need to have Locale::PO installed on your system.


Installation:
=============

If you compile the plugin outside of the VDR source codes you must
copy the resulting binary to VDRs directory where the other plugins
are expected.

In order to work correctly you must copy the subdirectory 'live' from
the source distribution to the directory where the vdr plugins look
for their configuration files. The pure VDR default for this config
directory is: /video/plugins, but this depends also from the
parameters -c or -v (see 'vdr --help' for details).

cp -a <live-src-dir>/live <plugin-config-dir>/plugins


Setup
=====

Live provides a username/password protection, so that it can be used from
the internet. The default username and password are:

	admin/live

The default port is 8008.

You can also specifiy this parameter via commandline:

  -p PORT,  --port=PORT     use PORT to listen for incoming connections
                            (default: 8008)
  -i IP,    --ip=IP         bind server only to specified IP, may appear
                            multiple times
                            (default: 0.0.0.0)

The rest of the parameters can be adjusted in VDR's OSD or in the web
interface.

The password is stored as a MD5 hash.
"Last Channel" is the last channel in the channels list, that live displays.
This is especially useful if you have VDR's automatic channel update active.
For example, you can add a group seperator ":@1000 Found automatically" to
channels.conf an set this parameter to "1000". Thus, everything VDR finds
during scanning (which can after a few months be well more than 3000
channels) won't be displayed.


So how does it work?
====================
Basically, Live itself is a Tntnet webserver integrated into the plugin
structure VDR needs.
This webserver, running in VDR's environment, is provided with all public data
structures VDR provides for plugins and thus has very fast access to
information like the EPG, timers or recordings.

Live's "pages" are written in "ecpp", a language integrating C++ and HTML in
one file, very much like e.g. PHP or ASP weave functionality and "static"
content information together.


Contribute!
===========
If you would like to contribute, please read doc/dev-contribute.txt
and doc/TODO.txt.


Internationalization (i18n)
===========================

Since the release of VDR 1.5.7 the way how VDR (and its plugins) are
localized changed dramatically. The system now uses GNU gettext. This
has the advantage that more languages can be supported. Also the
translations are now local to a language specific message file. So
simultaneous translations of different languages are much better
supported. Message files are located in the po subdirectory.

The downside to this is that, in order to provide new live-plugin
versions for VDR versions less than 1.5.7, it means one has to
maintain old i18n.c file and the new message files. Since this would
be an ongoing source of complications we decided to actively support
only the new internationalization scheme from VDR 1.5.7 and above.

To be able to support versions of VDR prior to 1.5.7 we generate a
backward compatible i18n-generated.h file from the new message
files. This generation step is *not* done automatically on every
build. It is only neccessary if the localized strings have changed or
if translations have been added. So if one of above is true you can
regenerate i18n-generated.h with the make target 'generate-i18n' prior
to creating the live plugin. In this case you need the CPAN perl
module Locale::PO installed on your system.


Security consideratios
======================

Live uses the tntnet MapUrl mechanism to map different request urls
to tntnet components. One component 'content.ecpp' delivers files
found in the file system. When given the wrong 'path' it could
retrieve any file from the server where live runs on.  Therefore
content.ecpp needs to be enhanced to check the paths before returning
files.  A second measure against missuse is to limit the mappings from
MapUrl to only valid files. In the current version this approach has
been taken. But due to the 'dificulty' to fully understand regular
expressions, this might get spoiled again by 'unchecked' code
contribution.