Commit d5c85f5f authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 1.3.32

- Added some missing braces in remux.c (thanks to Wayne Keer for reporting this one).
- Removed unused MAINMENUENTRY from svdrpdemo.c (thanks to Udo Richter for reporting
  this one).
- Fixed appending sequence end code in cDvbPlayer::Goto() (thanks to Reinhard Nissl).
- Fixed syncing in cRepacker (thanks to Reinhard Nissl).
- Now always using stream id 0xE0 for the video stream, to avoid problems with
  post processing tools that choke on different ids (suggested by Reinhard Nissl).
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Fixed cDvbPlayer::SkipFrames() to properly handle radio recordings (thanks to
  Reinhard Nissl).
- Updated the Swedish OSD texts (thanks to Tomas Prybil).
- Updated the Slovenian OSD texts (thanks to Matjaz Thaler).
- Updated the Danish OSD texts (thanks to Mogens Elneff).
- Made LIRC command parsing more robust (thanks to Ville Skyttä).
- Introduced a separate 'plugins-install' target in the Makefile (thanks to Daniel
  Thompson).
- Re-introduced the code that waits for a tuner lock in VDR/device.c, since
  apparently some users actually need it. It's not active by default, you'll have
  to define the WAIT_FOR_TUNER_LOCK macro in that file if you need it (suggested
  by Malcolm Caldwell).
- Adjusted the Makefile to the dvb-kernel driver on kernel 2.6 and up (thanks to
  Lauri Tischler).
- Repeat keys are now ignored when waiting for a keypress to cancel an operation
  (thanks to Marko Mäkelä).
- The main menu function of a plugin can now be activated through a key macro of
  the form "@plugin" even if that plugin doesn't have a main menu entry (using
  part of a patch by Hardy Flor, which originally implemented calling plugins from
  SVDRP).
- The menu timeout handling is now done centrally in the main program loop.
- Added missing help for the 'help' keyword in the SVDRP command PLUG.
- The main menu function of a plugin can now be called programmatically through
  the static function cRemote::CallPlugin().
- The SVDRP command PLUG now has a new option 'main' which can be used to initiate
  a call to the main menu function of a plugin (using part of a patch by Hardy Flor).
- The new command line option '--vfat' can be used to make VDR encode special
  characters in recording file names, even if it wasn't compiled with VFAT=1
  (suggested by Peter Bieringer). The compile time option VFAT still exists and
  creates a VDR that always behaves as if it were called with '--vfat'.
- Replaced the ':' delimiter between hour and minute in recording file names with
  a '.' under Linux, too. Existing recordings with ':' as delimiter will still work.
- Implemented the SVDRP command MOVC (thanks to Andreas Brachold).
- Added support for multiple audio language codes in ISO639LanguageDescriptors to
  'libsi' (thanks to Marcel Wiesweg).
- Changed the audio PID language codes to hold up to two 3 letter codes, separated
  by '+', to store separate languages broadcast in two channel audio mode.
- If the preferred audio language is broadcast on a PID that has two different
  languages in the two stereo channels, the audio channel is now properly set when
  switching to such a channel (thanks to Mogens Elneff for his help in testing this).
- Fixed some typos in MANUAL (thanks to Ville Skyttä).
- Fixed the default value for "Setup/EPG bugfix level" (thanks to Ville Skyttä for
  reporting this one).
- Fixed defining timers that only differ in the day of week (thanks to Patrick
  Rother for reporting this one).
- Fixed converting summary.vdr files that would result in a very long 'short text'
  (thanks to Carsten Koch).
- Implemented a hash for the channels to reduce the system load in the EIT scanning
  thread (based on a patch by Georg Acher).
parent ad40eaa2
......@@ -13,6 +13,7 @@ Carsten Koch <Carsten.Koch@icem.de>
for suggesting that the "Back" button in replay mode should bring up the "Recordings" menu
for fixing the watchdog timer if the program hangs in OSD activities
for his support in keeping the Premiere World channels up to date in 'channels.conf'
for fixing converting summary.vdr files that would result in a very long 'short text'
Plamen Ganev <pganev@com-it.net>
for fixing the frequency offset for Hotbird channels
......@@ -588,6 +589,7 @@ Lauri Tischler <lauri.tischler@efore.fi>
unavailable due to a recording on a different transponder
for reporting a compiler warning about virtual cConfig::Load() functions
for reporting a warning about character comparison in libsi/si.c
for adjusting the Makefile to the dvb-kernel driver on kernel 2.6 and up
Andy Carter <fruit@ukgateway.net>
for helping to test new DVB-T handling
......@@ -791,6 +793,7 @@ Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
for modifying LOF handling to allow for C-band reception
for reporting a crash in creating a new timer in case there is no device in the
system that can actually receive any channel
for suggesting to re-introduced the code that waits for a tuner lock in VDR/device.c
Ludwig Nussel <ludwig.nussel@web.de>
for making the LIRC thread avoid high CPU load in case the connection to LIRC gets lost
......@@ -828,6 +831,7 @@ Andreas Brachold <vdr04@deltab.de>
umask settings
for reporting that there are empty info.vdr files created if there is no EPG
info available
for implementing the SVDRP command MOVC
Manuel Hartl <icecep@gmx.net>
for suggesting to extend the logging info when starting/stopping timers
......@@ -908,6 +912,7 @@ Hermann Gausterer <mrq1@gmx.net>
Peter Bieringer <pb@bieringer.de>
for reporting a problem with duplicate recordings with the same file name
for suggesting to implement the command line option '--vfat'
Alexander Damhuis <ad@phonedation.de>
for reporting problems when deleting a timer that is currently recording
......@@ -978,6 +983,9 @@ Reinhard Nissl <rnissl@gmx.de>
for fixing cDvbSpuBitmap::putPixel()
for implementing cAudioRepacker in remux.c
for modifying handling of audio packets for radio channels in remux.c
for suggesting to always use stream id 0xE0 for the video stream, to avoid problems
with post processing tools that choke on different ids
for fixing cDvbPlayer::SkipFrames() to properly handle radio recordings
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
......@@ -1153,6 +1161,7 @@ Wayne Keer <syphir@syphir.sytes.net>
for reporting an unused variable from cTimer::GetWDayFromMDay()
for reporting a spelling error in 'canceling'
for adding some 'mkdir -p' to the Makefile's 'install' target
for reporting some missing braces in remux.c
Marco Schlüßler <marco@lordzodiac.de>
for fixing handling colors in cDvbSpuPalette::yuv2rgb()
......@@ -1266,6 +1275,7 @@ Udo Richter <udo_richter@gmx.de>
for suggesting a fix for an out-of-bounds memory access with audio language ids
for reporting a problem with cRemux in a single thread
for adding 'Service' functions to the plugin interface
for reporting an unused MAINMENUENTRY in svdrpdemo.c
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
......@@ -1287,6 +1297,8 @@ Uwe Hanke <uhanke@gmx.de>
Mogens Elneff <mogens@elneff.dk>
for translating OSD texts to the Danish language
for his help in testing automatically selecting the proper audio channel when
switching to a channel with two different languages on the same PID
Joachim Wilke <vdr@joachim-wilke.de>
for reporting missing calls to cStatus::MsgOsdClear() in cSkins::Message()
......@@ -1382,6 +1394,9 @@ Roman Krenick
Ville Skyttä <ville.skytta@iki.fi>
for reporting several compiler warnings in gcc 4.0
for including the optional user defined Make.config from the 'libsi' Makefile
for making LIRC command parsing more robust
for fixing some typos in MANUAL
for reporting that the default value for "Setup/EPG bugfix level" was wrong
Steffen Beyer <cpunk@reactor.de>
for fixing setting the colored button help after deleting a recording in case the next
......@@ -1389,6 +1404,7 @@ Steffen Beyer <cpunk@reactor.de>
Daniel Thompson <daniel.thompson@st.com>
for fixing a memory leak in tComponent
for introducing a separate 'plugins-install' target in the Makefile
Matthias Lötzke <Matthias@Loetzke.de>
for adding missing text internationalization for "Starting EPG scan"
......@@ -1414,6 +1430,7 @@ Georg Acher <acher@baycom.de>
for avoiding unnecessary calls to getLength() in libsi/si.c, and avoiding the
'& 0xff' in CRC32::crc32() of libsi/util.c
for suggesting to reduce the priority of the section handler threads
for a patch that was used to implement a hash for the channels
Henrik Niehaus <henrik.niehaus@gmx.de>
for reporting a problem with timers with a day given as MTWTF--@6, i.e. a repeating
......@@ -1456,3 +1473,9 @@ Hardy Flor <HFlor@web.de>
Harald Milz <hm@seneca.muc.de>
for his CUTR patch, which was used as a base to implement the SVDRP command EDIT
Marko Mäkelä <marko.makela@hut.fi>
for making repeat keys be ignored when waiting for a keypress to cancel an operation
Patrick Rother <krd-vdr@gulu.net>
for reporting a bug in defining timers that only differ in the day of week
......@@ -1114,7 +1114,7 @@ Video Disk Recorder Revision History
Please check if your system provides 'killall' - if it doesn't, please change
this back in 'runvdr' and report this (thanks to Achim Lange).
- The "Commands" menu now automatically assigns number keys as hotkeys to the
commands. If you have preceeded your commands with digits you may want to
commands. If you have preceded your commands with digits you may want to
remove these from your 'commands.conf' file.
- The new Setup item "Restart" can be used to force a complete restart of VDR,
including reloading the driver. Note that this can only work if VDR and the
......@@ -3746,3 +3746,63 @@ Video Disk Recorder Revision History
Hardy Flor).
- The new SVDRP command EDIT can be used to start the editing process of a recording
(based on the CUTR patch by Harald Milz).
2005-09-11: Version 1.3.32
- Added some missing braces in remux.c (thanks to Wayne Keer for reporting this one).
- Removed unused MAINMENUENTRY from svdrpdemo.c (thanks to Udo Richter for reporting
this one).
- Fixed appending sequence end code in cDvbPlayer::Goto() (thanks to Reinhard Nissl).
- Fixed syncing in cRepacker (thanks to Reinhard Nissl).
- Now always using stream id 0xE0 for the video stream, to avoid problems with
post processing tools that choke on different ids (suggested by Reinhard Nissl).
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Fixed cDvbPlayer::SkipFrames() to properly handle radio recordings (thanks to
Reinhard Nissl).
- Updated the Swedish OSD texts (thanks to Tomas Prybil).
- Updated the Slovenian OSD texts (thanks to Matjaz Thaler).
- Updated the Danish OSD texts (thanks to Mogens Elneff).
- Made LIRC command parsing more robust (thanks to Ville Skyttä).
- Introduced a separate 'plugins-install' target in the Makefile (thanks to Daniel
Thompson).
- Re-introduced the code that waits for a tuner lock in VDR/device.c, since
apparently some users actually need it. It's not active by default, you'll have
to define the WAIT_FOR_TUNER_LOCK macro in that file if you need it (suggested
by Malcolm Caldwell).
- Adjusted the Makefile to the dvb-kernel driver on kernel 2.6 and up (thanks to
Lauri Tischler).
- Repeat keys are now ignored when waiting for a keypress to cancel an operation
(thanks to Marko Mäkelä).
- The main menu function of a plugin can now be activated through a key macro of
the form "@plugin" even if that plugin doesn't have a main menu entry (using
part of a patch by Hardy Flor, which originally implemented calling plugins from
SVDRP).
- The menu timeout handling is now done centrally in the main program loop.
- Added missing help for the 'help' keyword in the SVDRP command PLUG.
- The main menu function of a plugin can now be called programmatically through
the static function cRemote::CallPlugin().
- The SVDRP command PLUG now has a new option 'main' which can be used to initiate
a call to the main menu function of a plugin (using part of a patch by Hardy Flor).
- The new command line option '--vfat' can be used to make VDR encode special
characters in recording file names, even if it wasn't compiled with VFAT=1
(suggested by Peter Bieringer). The compile time option VFAT still exists and
creates a VDR that always behaves as if it were called with '--vfat'.
- Replaced the ':' delimiter between hour and minute in recording file names with
a '.' under Linux, too. Existing recordings with ':' as delimiter will still work.
- Implemented the SVDRP command MOVC (thanks to Andreas Brachold).
- Added support for multiple audio language codes in ISO639LanguageDescriptors to
'libsi' (thanks to Marcel Wiesweg).
- Changed the audio PID language codes to hold up to two 3 letter codes, separated
by '+', to store separate languages broadcast in two channel audio mode.
- If the preferred audio language is broadcast on a PID that has two different
languages in the two stereo channels, the audio channel is now properly set when
switching to such a channel (thanks to Mogens Elneff for his help in testing this).
- Fixed some typos in MANUAL (thanks to Ville Skyttä).
- Fixed the default value for "Setup/EPG bugfix level" (thanks to Ville Skyttä for
reporting this one).
- Fixed defining timers that only differ in the day of week (thanks to Patrick
Rother for reporting this one).
- Fixed converting summary.vdr files that would result in a very long 'short text'
(thanks to Carsten Koch).
- Implemented a hash for the channels to reduce the system load in the EIT scanning
thread (based on a patch by Georg Acher).
......@@ -23,18 +23,21 @@ mode you want.
Compiling and running the program:
----------------------------------
Make sure the files from this package are located in a
directory that is "parallel" to the DVB directory of the
driver source for the Siemens DVB-S PCI card (refer to
http://linuxtv.org/dvb/siemens_dvb.html for more information
about that driver). For example, if the DVB driver was
extracted into the directory /home/kls/vdr/DVB, then this
package should be extracted into /home/kls/vdr/VDR.
VDR requires the Linux-DVB driver header files to compile.
As of kernel 2.6 these are part of the official Linux kernel
distribution, and VDR's Makefile will automatically locate
them. If you are using kernel 2.4 or earlier, you should
install the files from this package in a directory that is
"parallel" to the DVB directory of the driver source (refer to
http://linuxtv.org for more information about that driver).
For example, if the DVB driver was extracted into the directory
/home/kls/vdr/DVB, then this package should be extracted into
/home/kls/vdr/VDR.
If you have the DVB driver source in a different location
you will have to change the definition of DVBDIR in the
Makefile (see the file Make.config.template).
you can rename the file Make.config.template to Make.config and
adjust the definition of DVBDIR in that file.
VDR requires the Linux-DVB card driver version dated 2003-08-23 or higher
VDR requires the Linux-DVB driver version dated 2003-08-23 or higher
to work properly.
After extracting the package, change into the VDR directory
......@@ -68,7 +71,8 @@ time switch
VFAT=1
to the 'make' command.
to the 'make' command. Alternatively, you can call VDR with the command
line option '--vfat'.
When running, the 'vdr' program writes status information into the
system log file (/var/log/messages). You may want to watch these
......
......@@ -77,7 +77,7 @@ Version 1.2
"by name" and "by provider".
(4) In the "Timers" menu, when on the "Day" item, the '0' key toggles between
a single shot and a repeating timer. If "Day" indicates a repeating timer,
the keys '1'...'7' can be used to toggle the individual days ('1' is monday).
the keys '1'...'7' can be used to toggle the individual days ('1' is Monday).
* Navigating through the On Screen Menus
......@@ -342,7 +342,7 @@ Version 1.2
mark, and a triangle at the bottom means that this is an "end" mark.
The cutting process will save all video data between "start" and "end" marks
into a new file (the original recording remains untouched). The new file will
have the same name as the original recording, preceeded with a '%' character
have the same name as the original recording, preceded with a '%' character
(imagine the '%' somehow looking like a pair of scissors ;-). Red bars in the
progress display indicate which video sequences will be saved by the cutting
process.
......@@ -376,7 +376,7 @@ Version 1.2
The parameters in the "Edit Timer" menu have the following meanings:
Active: Defines whether the timer will be processed (set it to 'no' to
temporarily desable a timer).
temporarily disable a timer).
Channel: The channel to be recorded (as defined in the "Channels" list).
Any changes made in the "Channels" list (like renaming or
reordering channels) will be automatically reflected in the
......@@ -386,11 +386,11 @@ Version 1.2
timer that hits once and is deleted after it ends.
Another option here are "repeating timers" which are defined
by listing the days of the week on which they shall record.
For example, a timer that shall record every monday and wednesday
For example, a timer that shall record every Monday and Wednesday
would have a Day setting of "M-W----".
The '0' key toggles between a single shot and a repeating timer.
If "Day" indicates a repeating timer, the keys '1'...'7' can be
used to toggle the individual days ('1' is monday).
used to toggle the individual days ('1' is Monday).
You can also switch to a set of predefined repeating timer settings
by pressing the "Left" key when the day is the present day. To return
to the single shot mode just press "Right" until a date is displayed.
......@@ -545,7 +545,7 @@ Version 1.2
Set system time = no Defines whether the system time will be set according to
the time received from the DVB data stream.
Note that this works only if VDR is running under a user
id that has permisson to set the system time. You also
id that has permission to set the system time. You also
need to set the option "Use time from transponder" to a
channel that you trust to transmit a reliable time base
(not all channels seem to have access to a correct time
......
......@@ -6,7 +6,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Make.config.template 1.5 2005/07/31 11:35:28 kls Exp $
# $Id: Make.config.template 1.6 2005/09/02 14:24:31 kls Exp $
### The C compiler and options:
......@@ -18,7 +18,7 @@ CXXFLAGS = -fPIC -g -O2 -Wall -Woverloaded-virtual
### The directory environment:
DVBDIR = ../DVB
#DVBDIR = ../DVB
MANDIR = /usr/local/man
BINDIR = /usr/local/bin
......
......@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 1.77 2005/08/14 11:42:20 kls Exp $
# $Id: Makefile 1.79 2005/09/02 14:23:38 kls Exp $
.DELETE_ON_ERROR:
......@@ -14,7 +14,16 @@ CFLAGS ?= -O2
CXX ?= g++
CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
DVBDIR = ../DVB
LINUX_VERSION := $(shell uname -r | cut -c-3)
LINUX := $(shell uname -r)
DVBDIR := /lib/modules/$(LINUX)/build
ifeq ($(LINUX_VERSION), 2.4)
DVBDIR = ../DVB
endif
ifeq ($(LINUX_VERSION), 2.2)
DVBDIR = ../DVB
endif
LSIDIR = ./libsi
MANDIR = /usr/local/man
BINDIR = /usr/local/bin
......@@ -185,8 +194,6 @@ plugins-clean:
install:
@mkdir -p $(BINDIR)
@cp vdr runvdr $(BINDIR)
@mkdir -p $(BINDIR)/$(PLUGINLIBDIR)
@cp $(PLUGINLIBDIR)/* $(BINDIR)/$(PLUGINLIBDIR)
@mkdir -p $(MANDIR)/man1
@mkdir -p $(MANDIR)/man5
@gzip -c vdr.1 > $(MANDIR)/man1/vdr.1.gz
......@@ -196,6 +203,10 @@ install:
cp *.conf $(VIDEODIR);\
fi
plugins-install:
@mkdir -p $(BINDIR)/$(PLUGINLIBDIR)
@cp $(PLUGINLIBDIR)/* $(BINDIR)/$(PLUGINLIBDIR)
# Source documentation:
srcdoc:
......
......@@ -273,7 +273,7 @@ file (or rather its contents, to be precise) from being included more than once,
The example shown here is the way VDR does this in its core source files.
It takes the header file's name, converts it to all uppercase, replaces the
dot with an underline and preceedes the whole thing with two underlines.
dot with an underline and precedes the whole thing with two underlines.
The GNU library header files do this pretty much the same way, except that they
usually precede the name with only one underline (there are exceptions, though).
<p>
......@@ -655,7 +655,7 @@ used in the <a href="#The Setup menu"><i>Setup</i> menu</a>'s <tt>Store()</tt> f
<p>
The plugin's setup parameters are stored in the same file as VDR's parameters.
In order to allow each plugin (and VDR itself) to have its own set of parameters,
the <tt>Name</tt> of each parameter will be preceeded with the plugin's
the <tt>Name</tt> of each parameter will be preceded with the plugin's
name, as in
<p>
<tt>hello.GreetingTime = 3</tt>
......@@ -1031,7 +1031,7 @@ plugin was called, and will therefore process the values according to the
particular plugin's definitions.
<p>
The returned string may consist of several lines, separated by the newline character
('<tt>\n</tt>'). Each of these lines will be preceeded with the <tt>ReplyCode</tt>
('<tt>\n</tt>'). Each of these lines will be preceded with the <tt>ReplyCode</tt>
when presenting them to the caller, and the continuation character ('<tt>-</tt>')
will be set for all but the last one.
......
......@@ -4,3 +4,7 @@ VDR Plugin 'svdrpdemo' Revision History
2005-08-27: Version 0.0.1
- Initial revision.
2005-08-28: Version 0.0.2
- Removed unused MAINMENUENTRY.
......@@ -3,14 +3,13 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: svdrpdemo.c 1.1 2005/08/27 16:28:58 kls Exp $
* $Id: svdrpdemo.c 1.2 2005/08/28 21:11:14 kls Exp $
*/
#include <vdr/plugin.h>
static const char *VERSION = "0.0.1";
static const char *VERSION = "0.0.2";
static const char *DESCRIPTION = "How to add SVDRP support to a plugin";
static const char *MAINMENUENTRY = NULL;
class cPluginSvdrpdemo : public cPlugin {
private:
......
......@@ -4,12 +4,13 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: channels.c 1.44 2005/08/06 12:22:41 kls Exp $
* $Id: channels.c 1.46 2005/09/11 14:22:24 kls Exp $
*/
#include "channels.h"
#include <linux/dvb/frontend.h>
#include <ctype.h>
#include "device.h"
// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
// format characters in order to allow any number of blanks after a numeric
......@@ -341,11 +342,14 @@ void cChannel::SetId(int Nid, int Tid, int Sid, int Rid)
dsyslog("changing id of channel %d from %d-%d-%d-%d to %d-%d-%d-%d", Number(), nid, tid, sid, rid, Nid, Tid, Sid, Rid);
modification |= CHANNELMOD_ID;
Channels.SetModified();
Channels.UnhashChannel(this);
}
nid = Nid;
tid = Tid;
sid = Sid;
rid = Rid;
if (Number())
Channels.HashChannel(this);
}
}
......@@ -386,7 +390,7 @@ void cChannel::SetPortalName(const char *PortalName)
#define STRDIFF 0x01
#define VALDIFF 0x02
static int IntArraysDiffer(const int *a, const int *b, const char na[][4] = NULL, const char nb[][4] = NULL)
static int IntArraysDiffer(const int *a, const int *b, const char na[][MAXLANGCODE2] = NULL, const char nb[][MAXLANGCODE2] = NULL)
{
int result = 0;
for (int i = 0; a[i] || b[i]; i++) {
......@@ -400,7 +404,7 @@ static int IntArraysDiffer(const int *a, const int *b, const char na[][4] = NULL
return result;
}
static int IntArrayToString(char *s, const int *a, int Base = 10, const char n[][4] = NULL)
static int IntArrayToString(char *s, const int *a, int Base = 10, const char n[][MAXLANGCODE2] = NULL)
{
char *q = s;
int i = 0;
......@@ -416,7 +420,7 @@ static int IntArrayToString(char *s, const int *a, int Base = 10, const char n[]
return q - s;
}
void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dpids, char DLangs[][4], int Tpid)
void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int Tpid)
{
int mod = CHANNELMOD_NONE;
if (vpid != Vpid || ppid != Ppid || tpid != Tpid)
......@@ -427,8 +431,9 @@ void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dp
if (m & VALDIFF)
mod |= CHANNELMOD_PIDS;
if (mod) {
char OldApidsBuf[(MAXAPIDS + MAXDPIDS) * 10 + 10]; // 10: 5 digits plus delimiting ',' or ';' plus optional '=cod', +10: paranoia
char NewApidsBuf[(MAXAPIDS + MAXDPIDS) * 10 + 10];
const int BufferSize = (MAXAPIDS + MAXDPIDS) * (5 + 1 + MAXLANGCODE2) + 10; // 5 digits plus delimiting ',' or ';' plus optional '=cod+cod', +10: paranoia
char OldApidsBuf[BufferSize];
char NewApidsBuf[BufferSize];
char *q = OldApidsBuf;
q += IntArrayToString(q, apids, 10, alangs);
if (dpids[0]) {
......@@ -448,12 +453,12 @@ void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dp
ppid = Ppid;
for (int i = 0; i < MAXAPIDS; i++) {
apids[i] = Apids[i];
strn0cpy(alangs[i], ALangs[i], 4);
strn0cpy(alangs[i], ALangs[i], MAXLANGCODE2);
}
apids[MAXAPIDS] = 0;
for (int i = 0; i < MAXDPIDS; i++) {
dpids[i] = Dpids[i];
strn0cpy(dlangs[i], DLangs[i], 4);
strn0cpy(dlangs[i], DLangs[i], MAXLANGCODE2);
}
dpids[MAXDPIDS] = 0;
tpid = Tpid;
......@@ -633,7 +638,8 @@ cString cChannel::ToText(const cChannel *Channel)
if (Channel->ppid && Channel->ppid != Channel->vpid)
q += snprintf(q, sizeof(vpidbuf) - (q - vpidbuf), "+%d", Channel->ppid);
*q = 0;
char apidbuf[(MAXAPIDS + MAXDPIDS) * 10 + 10]; // 10: 5 digits plus delimiting ',' or ';' plus optional '=cod', +10: paranoia
const int BufferSize = (MAXAPIDS + MAXDPIDS) * (5 + 1 + MAXLANGCODE2) + 10; // 5 digits plus delimiting ',' or ';' plus optional '=cod+cod', +10: paranoia
char apidbuf[BufferSize];
q = apidbuf;
q += IntArrayToString(q, Channel->apids, 10, Channel->alangs);
if (Channel->dpids[0]) {
......@@ -722,7 +728,7 @@ bool cChannel::Parse(const char *s)
char *l = strchr(q, '=');
if (l) {
*l++ = 0;
strn0cpy(alangs[NumApids], l, 4);
strn0cpy(alangs[NumApids], l, MAXLANGCODE2);
}
else
*alangs[NumApids] = 0;
......@@ -743,7 +749,7 @@ bool cChannel::Parse(const char *s)
char *l = strchr(q, '=');
if (l) {
*l++ = 0;
strn0cpy(dlangs[NumDpids], l, 4);
strn0cpy(dlangs[NumDpids], l, MAXLANGCODE2);
}
else
*dlangs[NumDpids] = 0;
......@@ -865,6 +871,16 @@ bool cChannels::Load(const char *FileName, bool AllowComments, bool MustExist)
return false;
}
void cChannels::HashChannel(cChannel *Channel)
{
channelsHashSid.Add(Channel, Channel->Sid());
}
void cChannels::UnhashChannel(cChannel *Channel)
{
channelsHashSid.Del(Channel, Channel->Sid());
}
int cChannels::GetNextGroup(int Idx)
{
cChannel *channel = Get(++Idx);
......@@ -891,6 +907,7 @@ int cChannels::GetNextNormal(int Idx)
void cChannels::ReNumber( void )
{
channelsHashSid.Clear();
int Number = 1;
for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (channel->GroupSep()) {
......@@ -898,6 +915,7 @@ void cChannels::ReNumber( void )
Number = channel->Number();
}
else {
HashChannel(channel);
maxNumber = Number;
channel->SetNumber(Number++);
}
......@@ -921,32 +939,43 @@ cChannel *cChannels::GetByNumber(int Number, int SkipGap)
cChannel *cChannels::GetByServiceID(int Source, int Transponder, unsigned short ServiceID)
{
for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (!channel->GroupSep() && channel->Source() == Source && ISTRANSPONDER(channel->Transponder(), Transponder) && channel->Sid() == ServiceID)
return channel;
}
cList<cHashObject> *list = channelsHashSid.GetList(ServiceID);
if (list) {
for (cHashObject *hobj = list->First(); hobj; hobj = list->Next(hobj)) {
cChannel *channel = (cChannel *)hobj->Object();
if (channel->Sid() == ServiceID && channel->Source() == Source && ISTRANSPONDER(channel->Transponder(), Transponder))
return channel;
}
}
return NULL;
}
cChannel *cChannels::GetByChannelID(tChannelID ChannelID, bool TryWithoutRid, bool TryWithoutPolarization)
{
for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (!channel->GroupSep() && channel->GetChannelID() == ChannelID)
return channel;
}
if (TryWithoutRid) {
ChannelID.ClrRid();
for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (!channel->GroupSep() && channel->GetChannelID().ClrRid() == ChannelID)
return channel;
}
}
if (TryWithoutPolarization) {
ChannelID.ClrPolarization();
for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (!channel->GroupSep() && channel->GetChannelID().ClrPolarization() == ChannelID)
int sid = ChannelID.Sid();
cList<cHashObject> *list = channelsHashSid.GetList(sid);
if (list) {
for (cHashObject *hobj = list->First(); hobj; hobj = list->Next(hobj)) {
cChannel *channel = (cChannel *)hobj->Object();
if (channel->Sid() == sid && channel->GetChannelID() == ChannelID)
return channel;
}
if (TryWithoutRid) {
ChannelID.ClrRid();
for (cHashObject *hobj = list->First(); hobj; hobj = list->Next(hobj)) {
cChannel *channel = (cChannel *)hobj->Object();
if (channel->Sid() == sid && channel->GetChannelID().ClrRid() == ChannelID)
return channel;
}
}
if (TryWithoutPolarization) {
ChannelID.ClrPolarization();
for (cHashObject *hobj = list->First(); hobj; hobj = list->Next(hobj)) {
cChannel *channel = (cChannel *)hobj->Object();
if (channel->Sid() == sid && channel->GetChannelID().ClrPolarization() == ChannelID)
return channel;
}
}
}
return NULL;
}
......
RTL Television,RTL;RTL World:12187:hC34:S19.2E:27500:163:104=deu:105:0:12003:1:1089:0
SAT.1;ProSiebenSat.1:12480:vC34:S19.2E:27500:1791:1792=deu;1795=deu:34:0:46:133:33:0
ProSieben;ProSiebenSat.1:12480:vC34:S19.2E:27500:255:256=deu;257=deu:32:0:898:133:33:0
ProSieben;ProSiebenSat.1:12480:vC34:S19.2E:27500:0:0:0:0:898:133:33:0
RTL2;RTL World:12187:hC34:S19.2E:27500:166:128=deu:68:0:12020:1:1089:0
Das Erste;ARD:11836:hC34:S19.2E:27500:101:102=deu:104:0:28106:1:1101:0
Bayerisches FS;ARD:11836:hC34:S19.2E:27500:201:202=deu:204:0:28107:1:1101:0
hr-fernsehen;ARD:11836:hC34:S19.2E:27500:301:302=deu:304:0:28108:1:1101:0
NDR FS MV;ARD:12109:hC34:S19.2E:27500:301:302=deu:2404:0:28224:1:1073:0
SR SDWEST Ferns.;ARD:11836:hC34:S19.2E:27500:501:502=deu:504:0:28110:1:1101:0
NDR FS MV;ARD:12109:hC34:S19.2E:27500:2401:2402=deu:2404:0:28224:1:1073:0
SR SDWEST Fernsehen;ARD:12265:hC34:S19.2E:27500:1301:1302=deu:1304:0:28486:1:1093:0
WDR Kln;ARD:11836:hC34:S19.2E:27500:601:602=deu:604:0:28111:1:1101:0
BR-alpha;ARD:11836:hC34:S19.2E:27500:701:702=deu:704:0:28112:1:1101:0
SDWEST Ferns. BW;ARD:11836:hC34:S19.2E:27500:801:802=deu:804:0:28113:1:1101:0
......@@ -15,7 +15,7 @@ ZDF;ZDFvision:11953:hC34:S19.2E:27500:110:120=deu,121=2ch;125=dd:130:0:28006:1:1
3sat;ZDFvision:11953:hC34:S19.2E:27500:210:220=deu,221=2ch;225=dd:230:0:28007:1:1079:0
KiKa;ZDFvision:11953:hC34:S19.2E:27500:310:320=deu:330:0:28008:1:1079:0
arte;ARD:11836:hC34:S19.2E:27500:401:402=deu,403=fra:404:0:28109:1:1101:0
ORF1;ORF:12692:hC56:S19.2E:22000:160:161=deu;163=deu:165:3:13001:1:1117:0
ORF1;ORF:12692:hC56:S19.2E:22000:160:161=deu;163=deu:165:1762,D05,1702,1801:13001:1:1117:0
ORF2;ORF:12692:hC56:S19.2E:22000:500:501=deu;503=deu:505:3:13002:1:1117:0
ZDFinfokanal;ZDFvision:11953:hC34:S19.2E:27500:610:620=deu:130:0:28011:1:1079:0
CNN Int.;CNN:11778:vC34:S19.2E:27500:165:100=eng:47:0:28522:1:1068:0
......@@ -27,7 +27,7 @@ DSF;BetaDigital:12480:vC34:S19.2E:27500:1023:1024=deu:39:0:900:133:33:0
HSE24,HSE24;BetaDigital:12480:vC34:S19.2E:27500:1279:1280=deu:37:0:40:133:33:0
Bloomberg TV Germany;Bloomberg:12551:vC56:S19.2E:22000:162:99=deu:0:0:12160:1:1108:0
EURONEWS;CSAT:11817:vC34:S19.2E:27500:163:92=fra,93=eng,94=ita,95=esl,91=rus,98=por,99=deu:0:0:8004:1:1070:0
rbb Brandenburg;ARD:12109:hC34:S19.2E:27500:501:502=deu:504:0:28205:1:1073:0
rbb Brandenburg;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28205:1:1073:0
Sky News:11597:vC56:S19.2E:22000:305+131:306=eng:0:0:28707:1:1026:0
Veronica/JETIX;CANALDIGITAAL:12574:hC56:S19.2E:22000:518+8190:92=dut:38:622,100:5020:53:1109:0
BVN;CANALDIGITAAL:12574:hC56:S19.2E:22000:515+8190:96=dut:36:0:5025:53:1109:0
......@@ -45,9 +45,9 @@ rbb Berlin;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28206:1:1073:0
:Premiere World
PREMIERE START,START;PREMIERE:11797:hC34:S19.2E:27500:255:256=deu:32:1:8:133:2:0
PREMIERE 1,PREM 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu,513=deu;515=deu:32:1:10:133:2:0
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1801,1722,1702:11:133:2:0
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1:11:133:2:0
PREMIERE 3,PREM 3;PREMIERE:11797:hC34:S19.2E:27500:2303:2304=deu,2305=deu:32:1722,1801,1702:43:133:2:0
PREMIERE 4,PREM 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu:32:1801,1722,1702:9:133:2:0
PREMIERE 4,PREM 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu,769=deu:32:1801,1722,1702:9:133:2:0
PREMIERE 5,PREM 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu:32:1722,1801,1702:29:133:2:0
PREMIERE 6,PREM 6;PREMIERE:11797:hC34:S19.2E:27500:1535:1536=deu:32:1702,1801,1722:41:133:2:0
PREMIERE 7,PREM 7;PREMIERE:11797:hC34:S19.2E:27500:1023:1024=deu:32:1801,1722,1702:20:133:2:0
......@@ -56,7 +56,7 @@ DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:32:1722,180
PREMIERE DIREKT,DIREKT;PREMIERE:12031:hC34:S19.2E:27500:2815:2816=deu,2817=deu;2819=deu:0:0:18:133:4:0
:PW Erotic
BEATE-UHSE.TV,B-UHSE;PREMIERE:11758:hC34:S19.2E:27500:1791:1792=deu:32:1801,1722,1702:21:133:17:0
DIREKT EROTIK,EROTIK;PREMIERE:12031:hC34:S19.2E:27500:1279:0:0:1722,1801,1702:513:133:4:0
DIREKT EROTIK,EROTIK;PREMIERE:12031:hC34:S19.2E:27500:1279:1280=deu:0:1722,1801,1702:513:133:4:0
:Sportsworld
PREMIERE SPORT PORTAL,SPORT PORTAL;PREMIERE:11719:hC34:S19.2E:27500:255:256=deu,257=deu:32:1702,1801,1722:17:133:3:0
PREMIERE WIN,WIN;PREMIERE:12031:hC34:S19.2E:27500:3839:3840=deu:32:1722,1801,1702:27:133:4:0
......@@ -79,8 +79,8 @@ ASTRA-Mosaic 4;SES ASTRA:12551:vC56:S19.2E:22000:185:170=fra:0:0:3985:1:1108:0
ASTRA-Mosaic 5;SES ASTRA:12551:vC56:S19.2E:22000:163:164:0:0:3984:1:1108:0
Chamber TV;Chambre des Dputes:12551:vC56:S19.2E:22000:55:56=ltz:0:0:12180:1:1108:0
RTL TELE Letzebuerg:12551:vC56:S19.2E:22000:168:144=eng,146=fra,151=ltz:74:0:3994:1:1108:0
RTL7.;CANALDIGITAAL:12574:hC56:S19.2E:22000:512+8190:84=dut:33:622,100:5010:53:1109:0
MTV2 Pop Channel;MTV Networks:12226:hC34:S19.2E:27500:513+8190:661=deu:577:0:28640:1:1091:0
Test;CANALDIGITAAL:12574:hC56:S19.2E:22000:512+8190:84=dut:33:622,100:5010:53:1109:0
Nickelodeon;MTV Networks:12226:hC34:S19.2E:27500:513+8190:661=deu:577:0:28640:1:1091:0
MTV Central;MTV Networks:11739:vC34:S19.2E:27500:3031:3032:3034:0:28653:1:1066:0
VIVA;VIVA Fernsehen GmbH & Co. KG:12669:vC56:S19.2E:22000:309:310=deu:311:0:12732:1:1116:0
VIVA PLUS;VIVA Fernsehen GmbH & Co. KG:12551:vC56:S19.2E:22000:171:172=deu:173:0:12120:1:1108:0
......@@ -108,12 +108,12 @@ Sky Cinema 1;BSkyB:12285:vC23:S28.2E:27500:519+8190:647=eng,667=NAR:583:960,961:
Sky Cinema 2;BSkyB:12285:vC23:S28.2E:27500:517+8190:645=eng,665=NAR:581:960,961:4802:2:2030:0
:@900 Some 'seed' channels
Chelsea TV;BskyB:11778:vC23:S28.2E:27500:2308+2304:2309=eng:0:960,961:9307:2:2004:0
WDR Mnster;ARD:12421:hC34:S19.2E:27500:701:702=deu:104:0:28310:1:1201:0
WDR Mnster;ARD:12421:hC34:S19.2E:27500:101:102=deu:104:0:28310:1:1201:0
Animal Plnt+;BSkyB:12070:hC23:S28.2E:27500:2314+2307:2315=eng:0:960,961:50002:2:2019:0
S1T;BSkyB:12285:vC23:S28.2E:27500:513+8190:641=eng,661=NAR:577:960,961:4409:2:2030:0
CNN;BSkyB:12051:vC23:S28.2E:27500:2313:2315=eng:2314:0:7140:2:2018:0
BBC PARL'MNT;BSkyB:10847:vC56:S28.2E:22000:2327:2328=eng:2331:0:6902:2:2050:0
Bethel TV;T-Systems/MTI:11200:vC56:S13.0E:27500:413:414:0:0:4733:318:13400:0
JGLESIA MME;T-Systems/MTI:11200:vC56:S13.0E:27500:413:414:0:0:4733:318:13400:0
Euro1080;EURO1080:12168:vC34:S19.2E:27500:308:256:0:FF:21100:1:1088:0
Astra HD:12441:vC34:S19.2E:27500:133+80:134=eng:0:FF:29700:0:0:0
eng-WRN-multi;WRN:12597:vC34:S13.0E:27500:0:2132:0:0:8230:318:9400:0
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: channels.h 1.33 2005/08/06 11:23:32 kls Exp $
* $Id: channels.h 1.35 2005/09/11 11:17:19 kls Exp $
*/
#ifndef __CHANNELS_H
......@@ -36,6 +36,9 @@
#define MAXSPIDS 8 // subtitles
#define MAXCAIDS 8 // conditional access
#define MAXLANGCODE1 4 // a 3 letter language code, zero terminated
#define MAXLANGCODE2 8 // up to two 3 letter language codes, separated by '+' and zero terminated
struct tChannelParameterMap {
int userValue;
int driverValue;
......@@ -69,6 +72,11 @@ public:
bool Valid(void) const { return (nid || tid) && sid; } // rid is optional and source may be 0//XXX source may not be 0???
tChannelID &ClrRid(void) { rid = 0; return *this; }
tChannelID &ClrPolarization(void);
int Source(void) { return source; }
int Nid(void) { return nid; }
int Tid(void) { return tid; }
int Sid(void) { return sid; }
int Rid(void) { return rid; }
static tChannelID FromString(const char *s);
cString ToString(void) const;
static const tChannelID InvalidID;
......@@ -102,11 +110,11 @@ private:
int vpid;
int ppid;
int apids[MAXAPIDS + 1]; // list is zero-terminated
char alangs[MAXAPIDS][4];
char alangs[MAXAPIDS][MAXLANGCODE2];
int dpids[MAXDPIDS + 1]; // list is zero-terminated
char dlangs[MAXDPIDS][4];
char dlangs[MAXDPIDS][MAXLANGCODE2];
int spids[MAXSPIDS + 1]; // list is zero-terminated
char slangs[MAXSPIDS][4];
char slangs[MAXSPIDS][MAXLANGCODE2];
int tpid;
int caids[MAXCAIDS + 1]; // list is zero-terminated
int nid;
......@@ -188,7 +196,7 @@ public:
void SetId(int Nid, int Tid, int Sid, int Rid = 0);
void SetName(const char *Name, const char *ShortName, const char *Provider);
void SetPortalName(const char *PortalName);
void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dpids, char DLangs[][4], int Tpid);
void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int Tpid);
void SetCaIds(const int *CaIds); // list must be zero-terminated
void SetCaDescriptors(int Level);
void SetLinkChannels(cLinkChannels *LinkChannels);
......@@ -200,10 +208,13 @@ private:
int maxNumber;
int modified;