Commit b9b9ace9 authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 1.5.3

- Fixed some spelling errors in 'newplugin' (thanks to Ville Skyttä).
- Fixed a busy loop in fast forward if the next video data file is missing
  (thanks to Reinhard Nissl).
- Fixed handling frequencies in NitFilter::Process() (thanks to Anssi Hannula).
- Fixed a race condition with signal handlers at program exit (thanks to Udo
  Richter).
- Non-primary devices in Transfer mode are now also used for recording (thanks
  to Anssi Hannula).
- Fixed handling ChannelUp/Down keys if there is currently a replay running
  (thanks to Marco Schlüßler).
- The new SVDRP command REMO can be used to turn VDR's remote control off and
  on in case other programs need to be controlled (based on patches from Krzysztof
  Parma and Helmut Auer).
- Increased the maximum number of CA system ids to cope with the AlphaCrypt
  CAM's version 3.11 firmware.
- Fixed getting the code setting from the locale (thanks to Matthias Schwarzott).
- Implemented support for Freetype fonts (based on a patch from Alexander Riedel).
  The font names and sizes can be adjusted in the "Setup/OSD" menu.
  Note that VDR now requires freetype fonts to be installed in
  /usr/share/fonts/truetype.
- If the OSD device in use has at least 8bpp bitmap depth and this is also
  used by the current skin, Freetype fonts are displayed "anti-aliased".
  The new setup parameter "OSD/Anti-alias" can be used to turn this off.
- The new function cOsd::SetAntiAliasGranularity() can be used to help the OSD
  in managing the available color palette entries when doing anti-aliasing.
  Skins that use 8bpp bitmaps can call this function with the maximum number
  of colors used, and the maximum number of color combinations. The OSD will
  then evenly split the available palette entries between the various colors
  combinations, so that fonts can be "anti-aliased". By default a total of
  10 colors and 10 combinations is assumed.
- The pixel fonts have been completely removed from the VDR source.
- VDR is now "UTF-8 aware". It handles strings according to the character
  encoding used on the user's system. All internationalization strings and
  incoming SI data are converted to the system encoding.
- Plugins that handle strings need to be aware that on systems with UTF-8
  encoding a "character symbol" may consist of more than a single byte in
  memory. The functions and macros named Utf8...() can be used to handle
  strings without needing to care about the underlying character encoding
  (see tools.h for details).
- Even though the weekdays of repeating timers are presented to the user as UTF-8
  characters in the OSD, the timers.conf file and the SVDRP timer commands still
  use single byte characters ("MTWTFSS") to make sure this information is handled
  correctly between systems with different character encodings.
- Added a missing i18n string for "CAM" in the Turkish OSD texts.
- Improved editing strings that are too long to fit into the editable area.
- Changes to the OSD settings in the "Setup/OSD" menu now immediately take effect
  when the "Ok" key is pressed.
parent a5921252
......@@ -585,6 +585,7 @@ Helmut Auer <vdr@helmutauer.de>
for reporting that the shutdown script is given a reboot time in the past if there
is a recording going on or about to start, and the user insists in shutting down now
for suggesting to make the channel entry timeout configurable
for a patch that was used to implement the SVDRP command REMO
Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c
......@@ -1120,6 +1121,7 @@ Reinhard Nissl <rnissl@gmx.de>
for making cCommand::Execute() use cPipe instead of popen() to avoid problems
with open file handles when starting background commands
for fixing handling error status in cDvbTuner::GetFrontendStatus()
for fixing a busy loop in fast forward if the next video data file is missing
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
......@@ -1395,6 +1397,7 @@ Marco Schl
speed mode"
for removing 'assert(0)' from cDvbSpuDecoder::setTime()
for adapting 'libsi' to DVB-S2
for fixing handling ChannelUp/Down keys if there is currently a replay running
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP
......@@ -1491,6 +1494,7 @@ Udo Richter <udo_richter@gmx.de>
for implementing cPlugin::WakeupTime() to allow plugins to request VDR to wake
up at a particular time
for making the HUP signal force a restart of VDR
for fixing a race condition with signal handlers at program exit
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
......@@ -1659,6 +1663,7 @@ Ville Skytt
for reporting that there are places where ntohs() is assigned to different types
for adapting cThread::ThreadId() to recent kernels
for some improvements to the man pages
for fixing some spelling errors in 'newplugin'
Steffen Beyer <cpunk@reactor.de>
for fixing setting the colored button help after deleting a recording in case the next
......@@ -2014,6 +2019,8 @@ Anssi Hannula <anssi.hannula@gmail.com>
for suggesting that cDevice::GetDevice() should prefer any device that's already
receiving and doesn't require detatching receivers
for improving handling Transfer Mode devices when selecting a device to receive
for fixing handling frequencies in NitFilter::Process()
for making non-primary devices in Transfer mode be also used for recording
Antti Hartikainen <ami+vdr@ah.fi>
for updating 'S13E' in 'sources.conf'
......@@ -2044,6 +2051,7 @@ Tomas Berglund <tomber@telia.com>
Matthias Schwarzott <zzam@gentoo.org>
for suggesting to add LC_ALL to the checks for UTF-8 at startup
for fixing getting the code setting from the locale
Martin Ostermann <martin@familie-ostermann.de>
for fixing processing the PDCDescriptor in 'libsi' on big endian systems
......@@ -2072,3 +2080,10 @@ Petri Helin <phelin@googlemail.com>
Oktay Yolgeçen <oktay_73@yahoo.de>
for translating OSD texts to the Turkish language
Krzysztof Parma <krzycho@zoz.wodzislaw.pl>
for suggesting to implement the SVDRP command REMO
Alexander Riedel <alexander-riedel@t-online.de>
for a patch that was used as a base to implement support for Freetype fonts and
UTF-8 handling
......@@ -5165,3 +5165,67 @@ Video Disk Recorder Revision History
On its old transponder, the ProSieben/SAT.1 channels also had their EPG data
wrongly encoded, but apparently on the new transponder they started broadcasting
on this month, they got it right.
2007-04-30: Version 1.4.6-1
- Fixed a busy loop in fast forward if the next video data file is missing
(thanks to Reinhard Nissl).
- Fixed handling frequencies in NitFilter::Process() (thanks to Anssi Hannula).
- Fixed handling ChannelUp/Down keys if there is currently a replay running
(thanks to Marco Schlüßler).
- Increased the maximum number of CA system ids to cope with the AlphaCrypt
CAM's version 3.11 firmware.
2007-05-12: Version 1.4.7
- Official release.
2007-06-10: Version 1.5.3
- Fixed some spelling errors in 'newplugin' (thanks to Ville Skyttä).
- Fixed a busy loop in fast forward if the next video data file is missing
(thanks to Reinhard Nissl).
- Fixed handling frequencies in NitFilter::Process() (thanks to Anssi Hannula).
- Fixed a race condition with signal handlers at program exit (thanks to Udo
Richter).
- Non-primary devices in Transfer mode are now also used for recording (thanks
to Anssi Hannula).
- Fixed handling ChannelUp/Down keys if there is currently a replay running
(thanks to Marco Schlüßler).
- The new SVDRP command REMO can be used to turn VDR's remote control off and
on in case other programs need to be controlled (based on patches from Krzysztof
Parma and Helmut Auer).
- Increased the maximum number of CA system ids to cope with the AlphaCrypt
CAM's version 3.11 firmware.
- Fixed getting the code setting from the locale (thanks to Matthias Schwarzott).
- Implemented support for Freetype fonts (based on a patch from Alexander Riedel).
The font names and sizes can be adjusted in the "Setup/OSD" menu.
Note that VDR now requires freetype fonts to be installed in
/usr/share/fonts/truetype.
- If the OSD device in use has at least 8bpp bitmap depth and this is also
used by the current skin, Freetype fonts are displayed "anti-aliased".
The new setup parameter "OSD/Anti-alias" can be used to turn this off.
- The new function cOsd::SetAntiAliasGranularity() can be used to help the OSD
in managing the available color palette entries when doing anti-aliasing.
Skins that use 8bpp bitmaps can call this function with the maximum number
of colors used, and the maximum number of color combinations. The OSD will
then evenly split the available palette entries between the various colors
combinations, so that fonts can be "anti-aliased". By default a total of
10 colors and 10 combinations is assumed.
- The pixel fonts have been completely removed from the VDR source.
- VDR is now "UTF-8 aware". It handles strings according to the character
encoding used on the user's system. All internationalization strings and
incoming SI data are converted to the system encoding.
- Plugins that handle strings need to be aware that on systems with UTF-8
encoding a "character symbol" may consist of more than a single byte in
memory. The functions and macros named Utf8...() can be used to handle
strings without needing to care about the underlying character encoding
(see tools.h for details).
- Even though the weekdays of repeating timers are presented to the user as UTF-8
characters in the OSD, the timers.conf file and the SVDRP timer commands still
use single byte characters ("MTWTFSS") to make sure this information is handled
correctly between systems with different character encodings.
- Added a missing i18n string for "CAM" in the Turkish OSD texts.
- Improved editing strings that are too long to fit into the editable area.
- Changes to the OSD settings in the "Setup/OSD" menu now immediately take effect
when the "Ok" key is pressed.
Installation of the Video Disk Recorder
---------------------------------------
Version 1.4
Version 1.5
-----------
IMPORTANT NOTES:
----------------
Please make sure your environment is NOT set to use UTF-8 or
any other multibyte character representation. Check the value of your
$LANG or $LC_CTYPE environment variable, and if it contains something
like "de_DE.UTF-8", make sure you set it to something like "de_DE.iso8859-1"
or whatever single byte character mode you want. If you run VDR with
UTF-8 enabled, it may crash in case it encounters EPG or channel data
that contains non-7-bit ASCII characters. Another problem may occur if
you have mounted your video partition with "iocharset=utf8". In that case
recordings that contain umlauts or other non-seven-bit ASCII characters
may be displayed wrong, or not at all. Please make sure you mount your
video partition with "iocharset=iso8859-1" or whatever single byte character
mode you want.
Compiling and running the program:
----------------------------------
......@@ -35,11 +19,18 @@ Refer to http://linuxtv.org for more information about the Linux-DVB driver.
VDR requires the Linux-DVB driver version dated 2003-08-23 or higher
to work properly.
You will also need to install the "libjpeg" and "libcap" libraries,
as well as their "devel" packages to get the necessary header files
for compiling VDR. If the "capability" module is not compiled into
your kernel, you may need to do "modprobe capability" before running
VDR.
You will also need to install the following libraries, as well as their
"devel" packages to get the necessary header files for compiling VDR:
freetype2
libcap
libjpeg
If the "capability" module is not compiled into your kernel, you may
need to do "modprobe capability" before running VDR.
When running VDR, the Freetype fonts must be installed in the directory
/usr/share/fonts/truetype.
After extracting the package, change into the VDR directory
and type 'make'. This should produce an executable file
......
......@@ -503,6 +503,23 @@ Version 1.4
current skin wants to, and 2 means always use the small
font.
Anti-alias = 1 Controls whether the OSD uses "anti-aliasing" to improve
font rendering. To make this work, the OSD must support
at least 256 colors, and the skin in use has to
utilize these. If either of these conditions is not met,
rendering will be done without anti-aliasing.
OSD font name = arialbd.ttf
Small font name = arial.ttf
Fixed font name = courbd.ttf
The file names of the various fonts to use.
OSD font size = 22
Small font size = 18
Fixed font size = 20
The sizes (in pixel) of the various fonts. Valid range is
10...64.
Channel info position = bottom
The position of the channel info window in the OSD
(either 'bottom' or 'top').
......
......@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 1.99 2007/03/11 10:22:18 kls Exp $
# $Id: Makefile 1.100 2007/05/28 11:22:42 kls Exp $
.DELETE_ON_ERROR:
......@@ -17,8 +17,8 @@ CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual
LSIDIR = ./libsi
MANDIR = /usr/local/man
BINDIR = /usr/local/bin
LIBS = -ljpeg -lpthread -ldl -lcap
INCLUDES =
LIBS = -ljpeg -lpthread -ldl -lcap -lfreetype
INCLUDES = -I/usr/include/freetype2
PLUGINDIR= ./PLUGINS
PLUGINLIBDIR= $(PLUGINDIR)/lib
......@@ -39,34 +39,6 @@ OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o d
skinclassic.o skins.o skinsttng.o sources.o spu.o status.o svdrp.o themes.o thread.o\
timers.o tools.o transfer.o vdr.o videodir.o
FIXFONT_ISO8859_1 = -adobe-courier-bold-r-normal--25-*-100-100-m-*-iso8859-1
OSDFONT_ISO8859_1 = -adobe-helvetica-medium-r-normal--23-*-100-100-p-*-iso8859-1
SMLFONT_ISO8859_1 = -adobe-helvetica-medium-r-normal--18-*-100-100-p-*-iso8859-1
FIXFONT_ISO8859_2 = -adobe-courier-bold-r-normal--25-*-100-100-m-*-iso8859-2
OSDFONT_ISO8859_2 = -adobe-helvetica-medium-r-normal--24-*-75-75-p-*-iso8859-2
SMLFONT_ISO8859_2 = -adobe-helvetica-medium-r-normal--18-*-75-75-p-*-iso8859-2
FIXFONT_ISO8859_5 = -rfx-courier-bold-r-normal--24-*-75-75-m-*-iso8859-5
OSDFONT_ISO8859_5 = -rfx-helvetica-medium-r-normal--24-*-75-75-p-*-iso8859-5
SMLFONT_ISO8859_5 = -rfx-helvetica-medium-r-normal--18-*-75-75-p-*-iso8859-5
FIXFONT_ISO8859_7 = --user-medium-r-normal--26-171-110-110-m-140-iso8859-7
OSDFONT_ISO8859_7 = --user-medium-r-normal--23-179-85-85-m-120-iso8859-7
SMLFONT_ISO8859_7 = --user-medium-r-normal--19-160-72-72-m-110-iso8859-7
FIXFONT_ISO8859_9 = -adobe-courier-bold-r-normal--25-*-100-100-m-*-iso8859-9
OSDFONT_ISO8859_9 = -adobe-helvetica-medium-r-normal--23-*-100-100-p-*-iso8859-9
SMLFONT_ISO8859_9 = -adobe-helvetica-medium-r-normal--18-*-100-100-p-*-iso8859-9
FIXFONT_ISO8859_13 = -adobe-courier-bold-r-normal--25-*-100-100-m-*-iso8859-13
OSDFONT_ISO8859_13 = -adobe-helvetica-medium-r-normal--23-*-100-100-p-*-iso8859-13
SMLFONT_ISO8859_13 = -adobe-helvetica-medium-r-normal--18-*-100-100-p-*-iso8859-13
FIXFONT_ISO8859_15 = -adobe-courier-bold-r-normal--25-*-100-100-m-*-iso8859-15
OSDFONT_ISO8859_15 = -adobe-helvetica-medium-r-normal--23-*-100-100-p-*-iso8859-15
SMLFONT_ISO8859_15 = -adobe-helvetica-medium-r-normal--18-*-100-100-p-*-iso8859-15
ifndef NO_KBD
DEFINES += -DREMOTE_KBD
endif
......@@ -98,15 +70,6 @@ DEFINES += -DVFAT
endif
all: vdr
font: genfontfile\
fontfix-iso8859-1.c fontosd-iso8859-1.c fontsml-iso8859-1.c\
fontfix-iso8859-2.c fontosd-iso8859-2.c fontsml-iso8859-2.c\
fontfix-iso8859-5.c fontosd-iso8859-5.c fontsml-iso8859-5.c\
fontfix-iso8859-7.c fontosd-iso8859-7.c fontsml-iso8859-7.c\
fontfix-iso8859-9.c fontosd-iso8859-9.c fontsml-iso8859-9.c\
fontfix-iso8859-13.c fontosd-iso8859-13.c fontsml-iso8859-13.c\
fontfix-iso8859-15.c fontosd-iso8859-15.c fontsml-iso8859-15.c
@echo "font files created."
# Implicit rules:
......@@ -127,62 +90,6 @@ $(DEPFILE): Makefile
vdr: $(OBJS) $(SILIB)
$(CXX) $(CXXFLAGS) -rdynamic $(OBJS) $(NCURSESLIB) $(LIBS) $(LIBDIRS) $(SILIB) -o vdr
# The font files:
fontfix-iso8859-1.c:
./genfontfile "cFont::tPixelData FontFix_iso8859_1" "$(FIXFONT_ISO8859_1)" > $@
fontosd-iso8859-1.c:
./genfontfile "cFont::tPixelData FontOsd_iso8859_1" "$(OSDFONT_ISO8859_1)" > $@
fontsml-iso8859-1.c:
./genfontfile "cFont::tPixelData FontSml_iso8859_1" "$(SMLFONT_ISO8859_1)" > $@
fontfix-iso8859-2.c:
./genfontfile "cFont::tPixelData FontFix_iso8859_2" "$(FIXFONT_ISO8859_2)" > $@
fontosd-iso8859-2.c:
./genfontfile "cFont::tPixelData FontOsd_iso8859_2" "$(OSDFONT_ISO8859_2)" > $@
fontsml-iso8859-2.c:
./genfontfile "cFont::tPixelData FontSml_iso8859_2" "$(SMLFONT_ISO8859_2)" > $@
fontfix-iso8859-5.c:
./genfontfile "cFont::tPixelData FontFix_iso8859_5" "$(FIXFONT_ISO8859_5)" > $@
fontosd-iso8859-5.c:
./genfontfile "cFont::tPixelData FontOsd_iso8859_5" "$(OSDFONT_ISO8859_5)" > $@
fontsml-iso8859-5.c:
./genfontfile "cFont::tPixelData FontSml_iso8859_5" "$(SMLFONT_ISO8859_5)" > $@
fontfix-iso8859-7.c:
./genfontfile "cFont::tPixelData FontFix_iso8859_7" "$(FIXFONT_ISO8859_7)" > $@
fontosd-iso8859-7.c:
./genfontfile "cFont::tPixelData FontOsd_iso8859_7" "$(OSDFONT_ISO8859_7)" > $@
fontsml-iso8859-7.c:
./genfontfile "cFont::tPixelData FontSml_iso8859_7" "$(SMLFONT_ISO8859_7)" > $@
fontfix-iso8859-9.c:
./genfontfile "cFont::tPixelData FontFix_iso8859_9" "$(FIXFONT_ISO8859_9)" > $@
fontosd-iso8859-9.c:
./genfontfile "cFont::tPixelData FontOsd_iso8859_9" "$(OSDFONT_ISO8859_9)" > $@
fontsml-iso8859-9.c:
./genfontfile "cFont::tPixelData FontSml_iso8859_9" "$(SMLFONT_ISO8859_9)" > $@
fontfix-iso8859-13.c:
./genfontfile "cFont::tPixelData FontFix_iso8859_13" "$(FIXFONT_ISO8859_13)" > $@
fontosd-iso8859-13.c:
./genfontfile "cFont::tPixelData FontOsd_iso8859_13" "$(OSDFONT_ISO8859_13)" > $@
fontsml-iso8859-13.c:
./genfontfile "cFont::tPixelData FontSml_iso8859_13" "$(SMLFONT_ISO8859_13)" > $@
fontfix-iso8859-15.c:
./genfontfile "cFont::tPixelData FontFix_iso8859_15" "$(FIXFONT_ISO8859_15)" > $@
fontosd-iso8859-15.c:
./genfontfile "cFont::tPixelData FontOsd_iso8859_15" "$(OSDFONT_ISO8859_15)" > $@
fontsml-iso8859-15.c:
./genfontfile "cFont::tPixelData FontSml_iso8859_15" "$(SMLFONT_ISO8859_15)" > $@
# The font file generator:
genfontfile: genfontfile.c
$(CC) $(CFLAGS) -o $@ -L/usr/X11R6/lib $< -lX11
# The libsi library:
$(SILIB):
......@@ -261,10 +168,8 @@ srcdoc:
clean:
$(MAKE) -C $(LSIDIR) clean
-rm -f $(OBJS) $(DEPFILE) vdr genfontfile genfontfile.o core* *~
-rm -f $(OBJS) $(DEPFILE) vdr core* *~
-rm -rf include
-rm -rf srcdoc
fontclean:
-rm -f fontfix*.c fontosd*.c fontsml*.c
CLEAN: clean fontclean
CLEAN: clean
......@@ -6,7 +6,7 @@
<center><h1>The VDR Plugin System</h1></center>
<center><b>Version 1.5.1</b></center>
<center><b>Version 1.5.3</b></center>
<p>
<center>
Copyright &copy; 2006 Klaus Schmidinger<br>
......@@ -14,12 +14,15 @@ Copyright &copy; 2006 Klaus Schmidinger<br>
<a href="http://www.cadsoft.de/vdr">www.cadsoft.de/vdr</a>
</center>
<p>
<!--X1.5.0--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<!--X1.5.0--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.5.0 are marked like this.
<!--X1.5.0--></td></tr></table>
<!--X1.5.1--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
<!--X1.5.1--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.5.1 are marked like this.
<!--X1.5.1--></td></tr></table>
<!--X1.5.3--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.5.3 are marked like this.
<!--X1.5.3--></td></tr></table>
<p>
VDR provides an easy to use plugin interface that allows additional functionality
to be added to the program by implementing a dynamically loadable library file.
......@@ -58,7 +61,7 @@ structures and allows it to hook itself into specific areas to perform special a
<li><a href="#Housekeeping">Housekeeping</a>
<li><a href="#Main thread hook">Main thread hook</a>
<li><a href="#Activity">Activity</a>
<!--X1.5.1--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
<!--X1.5.1--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<li><a href="#Wakeup">Wakeup</a>
<!--X1.5.1--></td></tr></table>
<li><a href="#Setup parameters">Setup parameters</a>
......@@ -82,7 +85,7 @@ structures and allows it to hook itself into specific areas to perform special a
<li><a href="#Devices">Devices</a>
<li><a href="#Audio">Audio</a>
<li><a href="#Remote Control">Remote Control</a>
<!--X1.5.0--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<!--X1.5.0--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<li><a href="#Conditional Access">Conditional Access</a>
<!--X1.5.0--></td></tr></table>
</ul>
......@@ -681,7 +684,7 @@ be queried, and further prompts may show up. If all prompts have been confirmed,
the shutdown will take place. As soon as one prompt is not confirmed, no
further plugins will be queried and no shutdown will be done.
<!--X1.5.1--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
<!--X1.5.1--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<a name="Wakeup"><hr><h2>Wakeup</h2>
<center><i><b>Wake me up before you go-go</b></i></center><p>
......@@ -970,6 +973,19 @@ written to the log file, indicating that a translation is missing.
Texts are first searched for in the <i>Phrases</i> registered for this plugin (if any)
and then in the global VDR texts. So a plugin can make use of texts defined by the
core VDR code.
<p>
<!--X1.5.3--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
The system VDR is running on may use a character encoding where a single character
(or <i>symbol</i>) consists of more than one byte (UTF-8, as opposed to, for instance,
ISO8859-1, where every character is represented by a single byte in memory).
In order to make sure a plugin works regardless of the character encoding the current
system uses, the VDR core code provides several functions and macros that allow accessing
text strings transparently without knowing whether this is a single or multi byte
character set. The names of these functions and macros are all of the form <tt>Utf8...()</tt>,
and are defined in <tt>VDR/tools.h</tt>.
Most of the time a plugin doesn't need to care about this, but when it comes to
handling individual characters these functions may come in handy.
<!--X1.5.3--></td></tr></table>
<a name="Custom services"><hr><h2>Custom services</h2>
......@@ -1618,7 +1634,22 @@ Note that a plugin should always at first request a single drawing area
with the full required resolution. Only if this fails shall it use alternate
areas. Drawing areas are always rectangular and may not overlap (but do not need
to be adjacent).
<p>
<!--X1.5.3--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
Special consideration may have to be given to color usage if the OSD provides
8bpp (256 colors). In that case, fonts may be drawn using <i>anti-aliasing</i>,
which requires several blended color values between the foreground and background
color. In order to not use up the whole color palette for a single color
combination (and thus be unable to draw any other colors at all), it may be
useful to call
<p><table><tr><td bgcolor=#F0F0F0><pre>
osd-&gt;SetAntiAliasGranularity();
</pre></td></tr></table><p>
which allows the system to evenly distribute the palette entries to the various
color combinations (see <tt>VDR/osd.h</tt> for details).
<!--X1.5.3--></td></tr></table>
<p>
Directly accessing the OSD is only allowed from the foreground thread, which
restricts this to a <tt>cOsdObject</tt> returned from the plugin's <tt>MainMenuAction()</tt>
......@@ -2087,7 +2118,7 @@ Put(uint64 Code, bool Repeat = false, bool Release = false);
The other parameters have the same meaning as in the first version of this function.
<!--X1.5.0--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<!--X1.5.0--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<a name="Conditional Access"><hr><h2>Conditional Access</h2>
<center><i><b>Members only!</b></i></center><p>
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: ci.c 1.47 2007/01/05 10:38:03 kls Exp $
* $Id: ci.c 1.48 2007/04/30 13:02:49 kls Exp $
*/
#include "ci.h"
......@@ -643,7 +643,7 @@ void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data)
// --- cCiConditionalAccessSupport -------------------------------------------
#define MAXCASYSTEMIDS 16
#define MAXCASYSTEMIDS 64
// CA Enable Ids:
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.c 1.150 2007/02/25 13:58:45 kls Exp $
* $Id: config.c 1.151 2007/06/02 11:21:40 kls Exp $
*/
#include "config.h"
......@@ -264,6 +264,13 @@ cSetup::cSetup(void)
OSDHeight = 486;
OSDMessageTime = 1;
UseSmallFont = 1;
AntiAlias = 1;
strcpy(FontOsd, "arialbd.ttf");
strcpy(FontSml, "arial.ttf");
strcpy(FontFix, "courbd.ttf");
FontOsdSize = 22;
FontSmlSize = 18;
FontFixSize = 20;
MaxVideoFileSize = MAXVIDEOFILESIZE;
SplitEditedFiles = 0;
MinEventTimeout = 30;
......@@ -427,6 +434,13 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "OSDHeight")) { OSDHeight = atoi(Value); if (OSDHeight < 100) OSDHeight *= 27; }
else if (!strcasecmp(Name, "OSDMessageTime")) OSDMessageTime = atoi(Value);
else if (!strcasecmp(Name, "UseSmallFont")) UseSmallFont = atoi(Value);
else if (!strcasecmp(Name, "AntiAlias")) AntiAlias = atoi(Value);
else if (!strcasecmp(Name, "FontOsd")) strn0cpy(FontOsd, Value, MAXFONTNAME);
else if (!strcasecmp(Name, "FontSml")) strn0cpy(FontSml, Value, MAXFONTNAME);
else if (!strcasecmp(Name, "FontFix")) strn0cpy(FontFix, Value, MAXFONTNAME);
else if (!strcasecmp(Name, "FontOsdSize")) FontOsdSize = atoi(Value);
else if (!strcasecmp(Name, "FontSmlSize")) FontSmlSize = atoi(Value);
else if (!strcasecmp(Name, "FontFixSize")) FontFixSize = atoi(Value);
else if (!strcasecmp(Name, "MaxVideoFileSize")) MaxVideoFileSize = atoi(Value);
else if (!strcasecmp(Name, "SplitEditedFiles")) SplitEditedFiles = atoi(Value);
else if (!strcasecmp(Name, "MinEventTimeout")) MinEventTimeout = atoi(Value);
......@@ -497,6 +511,13 @@ bool cSetup::Save(void)
Store("OSDHeight", OSDHeight);
Store("OSDMessageTime", OSDMessageTime);
Store("UseSmallFont", UseSmallFont);
Store("AntiAlias", AntiAlias);
Store("FontOsd", FontOsd);
Store("FontSml", FontSml);
Store("FontFix", FontFix);
Store("FontOsdSize", FontOsdSize);
Store("FontSmlSize", FontSmlSize);
Store("FontFixSize", FontFixSize);
Store("MaxVideoFileSize", MaxVideoFileSize);
Store("SplitEditedFiles", SplitEditedFiles);
Store("MinEventTimeout", MinEventTimeout);
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.288 2007/03/03 15:39:05 kls Exp $
* $Id: config.h 1.290 2007/06/02 11:22:17 kls Exp $
*/
#ifndef __CONFIG_H
......@@ -17,12 +17,13 @@
#include <time.h>
#include <unistd.h>
#include "i18n.h"
#include "font.h"
#include "tools.h"
// VDR's own version number:
#define VDRVERSION "1.5.2"
#define VDRVERSNUM 10502 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.5.3"
#define VDRVERSNUM 10503 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
......@@ -242,6 +243,13 @@ public:
int OSDLeft, OSDTop, OSDWidth, OSDHeight;
int OSDMessageTime;
int UseSmallFont;
int AntiAlias;
char FontOsd[MAXFONTNAME];
char FontSml[MAXFONTNAME];
char FontFix[MAXFONTNAME];
int FontOsdSize;
int FontSmlSize;
int FontFixSize;
int MaxVideoFileSize;
int SplitEditedFiles;
int MinEventTimeout, MinUserInactivity;
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 1.139 2007/01/13 12:05:00 kls Exp $
* $Id: device.c 1.140 2007/04/30 09:34:00 kls Exp $
*/
#include "device.h"
......@@ -327,7 +327,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView
// difference, because it results in the most significant bit of the result.
uint32_t imp = 0;
imp <<= 1; imp |= LiveView ? !device[i]->IsPrimaryDevice() || ndr : 0; // prefer the primary device for live viewing if we don't need to detach existing receivers
imp <<= 1; imp |= !device[i]->Receiving() || ndr; // use receiving devices if we don't need to detach existing receivers
imp <<= 1; imp |= !device[i]->Receiving() && (device[i] != cTransferControl::ReceiverDevice() || device[i]->IsPrimaryDevice()) || ndr; // use receiving devices if we don't need to detach existing receivers, but avoid primary device in local transfer mode
imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving
imp <<= 1; imp |= device[i] == cTransferControl::ReceiverDevice(); // avoid the Transfer Mode receiver device
imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 1.45 2006/04/17 12:45:48 kls Exp $
* $Id: dvbplayer.c 1.46 2007/04/28 14:55:22 kls Exp $
*/
#include "dvbplayer.h"
......@@ -402,8 +402,10 @@ void cDvbPlayer::Action(void)
bool TimeShiftMode = index->IsStillRecording();
int Index = index->GetNextIFrame(readIndex, playDir == pdForward, &FileNumber, &FileOffset, &Length, TimeShiftMode);
if (Index >= 0) {
if (!NextFile(FileNumber, FileOffset))
if (!NextFile(FileNumber, FileOffset)) {
readIndex = Index;
continue;
}
}
else {
if (!TimeShiftMode && playDir == pdForward) {
......
......@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
* $Id: eit.c 1.122 2006/10/09 16:14:36 kls Exp $
* $Id: eit.c 1.123 2007/06/10 12:51:05 kls Exp $
*/
#include "eit.h"
......@@ -188,6 +188,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
if (hit) {
char linkName[ld->privateData.getLength() + 1];
strn0cpy(linkName, (const char *)ld->privateData.getData(), sizeof(linkName));
// TODO is there a standard way to determine the character set of this string?
cChannel *link = Channels.GetByChannelID(linkID);
if (link != channel) { // only link to other channels, not the same one
//fprintf(stderr, "Linkage %s %4d %4d %5d %5d %5d %5d %02X '%s'\n", hit ? "*" : "", channel->Number(), link ? link->Number() : -1, SiEitEvent.getEventId(), ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId(), ld->getLinkageType(), linkName);//XXX
......@@ -218,7 +219,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
if (1 <= Stream && Stream <= 2 && Type != 0) {
if (!Components)
Components = new cComponents;
char buffer[256];
char buffer[Utf8BufSize(256)];
Components->SetComponent(Components->NumComponents(), cd->getStreamContent(), cd->getComponentType(), I18nNormalizeLanguageCode(cd->languageCode), cd->description.getText(buffer, sizeof(buffer)));
}
}
......@@ -230,7 +231,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
if (!rEvent) {
if (ShortEventDescriptor) {
char buffer[256];
char buffer[Utf8BufSize(256)];
pEvent->SetTitle(ShortEventDescriptor->name.getText(buffer, sizeof(buffer)));
pEvent->SetShortText(ShortEventDescriptor->text.getText(buffer, sizeof(buffer)));
}
......@@ -239,7 +240,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
pEvent->SetShortText(NULL);
}
if (ExtendedEventDescriptors) {
char buffer[ExtendedEventDescriptors->getMaximumTextLength(": ") + 1];
char buffer[Utf8BufSize(ExtendedEventDescriptors->getMaximumTextLength(": ")) + 1];
pEvent->SetDescription(ExtendedEventDescriptors->getText(buffer, sizeof(buffer), ": "));
}
else if (!HasExternalData)
......
......@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
* $Id: epg.c 1.81 2006/10/28 09:12:42 kls Exp $
* $Id: epg.c 1.82 2007/06/10 12:52:19 kls Exp $
*/
#include "epg.h"
......@@ -634,6 +634,7 @@ Final:
// data, so let's always convert them to blanks (independent of the setting of EPGBugfixLevel):
strreplace(title, '\n', ' ');
strreplace(shortText, '\n', ' ');
/* TODO adapt to UTF-8
// Same for control characters:
strreplace(title, '\x86', ' ');
strreplace(title, '\x87', ' ');
......@@ -641,6 +642,7 @@ Final:
strreplace(shortText, '\x87', ' ');
strreplace(description, '\x86', ' ');
strreplace(description, '\x87', ' ');
XXX*/
}
// --- cSchedule -------------------------------------------------------------
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: font.h 1.15 2007/03/11 09:50:42 kls Exp $
* $Id: font.h 1.16 2007/06/10 12:58:54 kls Exp $
*/
#ifndef __FONT_H
......@@ -13,6 +13,10 @@
#include <stdint.h>
#include <stdlib.h>
#define MAXFONTNAME 64
#define MAXFONTSIZE 64
#define FONTDIR "/usr/share/fonts/truetype"
enum eDvbFont {
fontOsd,
fontFix,
......@@ -20,49 +24,35 @@ enum eDvbFont {
#define eDvbFontSize (fontSml + 1)
};
enum eDvbCode {
code_iso8859_1,
code_iso8859_2,
code_iso8859_5,
code_iso8859_7,
code_iso8859_9,
code_iso8859_13,
code_iso8859_15,
#define eDvbCodeSize (code_iso8859_15 + 1)
};
class cBitmap;
typedef uint32_t tColor; // see also osd.h
typedef uint8_t tIndex;
class cFont {
public:
enum { NUMCHARS = 256 };
typedef uint32_t tPixelData;
struct tCharData {
tPixelData width, height;
tPixelData lines[1];
};
private:
static eDvbCode code;
static cFont *fonts[];
const tCharData *data[NUMCHARS];
int height;
public:
cFont(const void *Data);
virtual ~cFont() {}
void SetData(const void *Data);
virtual int Width(unsigned char c) const { return data[c]->width; }
///< Returns the width of the given character.
virtual int Width(const char *s) const;
///< Returns the width of the given string.
virtual int Height(unsigned char c) const { return data[c]->height; }
///< Returns the height of the given character.
virtual int Height(const char *s) const;
///< Returns the height of the given string.
virtual int Height(void) const { return height; }
///< Returns the height of this font (all characters have the same height).
const tCharData *CharData(unsigned char c) const { return data[c]; }
static bool SetCode(const char *Code);
static void SetCode(eDvbCode Code);
static void SetFont(eDvbFont Font, const void *Data = NULL);
virtual int Width(uint c) const = 0;
///< Returns the width of the given character in pixel.
virtual int Width(const char *s) const