Commit 6f93a5f7 authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 1.3.14

- Fixed detecting transponder lock in cDvbTuner (based on a patch from Stefan
  Meyknecht).
- What was previously marked with WAIT_FOR_LOCK_AFTER_TUNING is now permanently
  active and uses a cCondVar to signal when a transponder is locked.
- Added some missing 'const' to cChannel.
- Added a sample setup for 'DisiCon-4 Single Cable Network' to 'diseqc.conf'
  (thanks to Oliver Endriss).
- Fixed attaching a cPlayer to a cDevice, so that 'Operation not permitted'
  errors don't occur any more (thanks to Marco Schlüßler).
- Fixed a case where the resultBuffer in cRemux ran full before getting a sync.
- Removed the usleep() call from cDvbPlayer::Action() to make VDR run on NPTL
  systems (thanks to Alfred Zastrow). The NPTL check at startup has also been
  removed.
- Taking the complete size of available data into account when deciding whether
  to clear the transfer buffer to avoid overflows (thanks to Reinhard Nissl).
- Updated Romanian language texts and the iso8859-2 fonts (thanks to Lucian Muresan).
- Now actually using the iso8859-15 fonts (thanks to Lucian Muresan).
- Some minor code cleanups (thanks to Prakash K. Cheemplavam).
- Fixed missing cleanup at program exit in case there is a problem with a plugin
  (thanks to Mattias Grönlund for pointing this out).
- Increased the required free buffer space in the resultBuffer of cRemux to
  2 * IPACKS to avoid a buffer overflow in case a cTS2PES writes one complete
  packet and then (within processing the same TS packet) wants to write another
  small packet.
- Removed the signal handler and WakeUp() call from cThread (it is no longer
  needed).
- Added some checks when canceling a thread and removed the usleep() in
  cThread::Start() (suggested by Ludwig Nussel). Also removed 'running' from
  cThread and using only childTid to indicate whether a thread is actually
  running.
- Added cCondWait::Sleep() and using it to replace all usleep() calls (based
  on a suggestion by Werner Fink).
- Only assigning events to timers if the related schedule has actually been
  modified.
- When searching for the present event, the running status is now only taken
  into account if the event has been "seen" within the past 30 seconds.
  This avoids shortly seeing the wrong events in the channel display when
  switching to a channel that hasn't been tuned to in a while.
parent af483c11
......@@ -257,6 +257,7 @@ Werner Fink <werner@suse.de>
for modifying handling of audio packets in cDvbPlayer for better sync with external
AC3 replay
for changing thread handling to make it work with NPTL ("Native Posix Thread Library")
for suggesting to replace usleep() calls with a pthread_cond_timedwait() based wait
Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it
......@@ -530,6 +531,7 @@ Oliver Endriss <o.endriss@gmx.de>
for reporting that the "Classic VDR" skin wrongly displayed unused color buttons
for reporting some missing cStatus::MsgOsdTextItem() calls
for reporting a missing "Editing process finished" message with skins
for adding a sample setup for 'DisiCon-4 Single Cable Network' to 'diseqc.conf'
Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf'
......@@ -741,6 +743,8 @@ Ludwig Nussel <ludwig.nussel@web.de>
for reporting a problem on systems that have UTF-8 enabled
for pointing out a flaw in the the description of cRingBufferLinear
for reporting a bug in cRingBufferLinear::Get() in case the buffer wraps around
for adding some checks when cancelling a thread and removing the usleep() in
cThread::Start()
Thomas Koch <tom@harhar.net>
for his support in keeping the Premiere World channels up to date in 'channels.conf'
......@@ -797,6 +801,8 @@ Alfred Zastrow <vdr@zastrow4u.de>
the recordings created when pausing live video
for reporting two warnings when compiling with gcc 3.3.1
for reporting a bug in handling menu status messages when the list contents is scrolled
for reporting that without the usleep() call in cDvbPlayer::Action() VDR runs on NPTL
systems
Matthias Raus <matthias-raus@web.de>
for reporting a problem with starting the editing process if no marks have been set
......@@ -870,6 +876,8 @@ Reinhard Nissl <rnissl@gmx.de>
for suggesting to make sure the OSD reports oeWrongAlignment errors before any
oeAreasOverlap error
for reporting a a crash in the time search mechanism
for taking the complete size of available data into account when deciding whether
to clear the transfer buffer to avoid overflows
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
......@@ -1021,6 +1029,7 @@ Drazen Dupor <drazen.dupor@dupor.com>
Prakash K. Cheemplavam <PrakashKC@gmx.de>
for fixing some issues with gcc 3.4
for some minor code cleanups
Miko Wohlgemuth <weak@chello.at>
for reporting a problem with the OSD alignment in the SPU decoder
......@@ -1053,6 +1062,8 @@ Marco Schl
for avoiding unnecessary section filter start/stops
for pointing out that if one PID can't be added, the whole cDevice::AttachReceiver()
should fail and all PIDs added so far should be deleted
for fixing attaching a cPlayer to a cDevice, so that 'Operation not permited'
errors don't occur any more
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP
......@@ -1100,3 +1111,14 @@ Udo Richter <udo_richter@gmx.de>
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
Stefan Meyknecht <stefan@meyknecht.org>
for a patch that fixed detecting transponder lock in cDvbTuner
Lucian Muresan <lucianm@users.sourceforge.net>
for updating the Romanian language texts and the iso8859-2 fonts
for making VDR actually use the iso8859-15 fonts
Mattias Grönlund <Mattias@Gronlund.net>
for pointing out a missing cleanup at program exit in case there is a problem
with a plugin
......@@ -3003,7 +3003,7 @@ Video Disk Recorder Revision History
- The cRingBuffer now does EnableGet()/EnablePut() only if the buffer is more than
one third full or empty, respectively. This dramatically improves recording
performance and reduces system load (thanks to Marco Schlüßler for doing some
testing regarding buffer performance and giving me some hints that finally lead
testing regarding buffer performance and giving me some hints that finally led
to finding out that this was the basic problem causing buffer overflows).
- Improved Transfer Mode (thanks to Marco Schlüßler for suggestions and testing).
- Fixed a possible crash with inconsistent SI data (thanks to Marcel Wiesweg).
......@@ -3036,3 +3036,44 @@ Video Disk Recorder Revision History
- Removed the 'Log' parameter from the cChannel::Set... functions. Instead
checking if the channel has a non-zero number.
- Updated 'channels.conf.terr' for Hannover (thanks to Sven Kreiensen).
2004-10-24: Version 1.3.14
- Fixed detecting transponder lock in cDvbTuner (based on a patch from Stefan
Meyknecht).
- What was previously marked with WAIT_FOR_LOCK_AFTER_TUNING is now permanently
active and uses a cCondVar to signal when a transponder is locked.
- Added some missing 'const' to cChannel.
- Added a sample setup for 'DisiCon-4 Single Cable Network' to 'diseqc.conf'
(thanks to Oliver Endriss).
- Fixed attaching a cPlayer to a cDevice, so that 'Operation not permited'
errors don't occur any more (thanks to Marco Schlüßler).
- Fixed a case where the resultBuffer in cRemux ran full before getting a sync.
- Removed the usleep() call from cDvbPlayer::Action() to make VDR run on NPTL
systems (thanks to Alfred Zastrow). The NPTL check at startup has also been
removed.
- Taking the complete size of available data into account when deciding whether
to clear the transfer buffer to avoid overflows (thanks to Reinhard Nissl).
- Updated Romanian language texts and the iso8859-2 fonts (thanks to Lucian Muresan).
- Now actually using the iso8859-15 fonts (thanks to Lucian Muresan).
- Some minor code cleanups (thanks to Prakash K. Cheemplavam).
- Fixed missing cleanup at program exit in case there is a problem with a plugin
(thanks to Mattias Grönlund for pointing this out).
- Increased the required free buffer space in the resultBuffer of cRemux to
2 * IPACKS to avoid a buffer overflow in case a cTS2PES writes one complete
packet and then (within processing the same TS packet) wants to write another
small packet.
- Removed the signal handler and WakeUp() call from cThread (it is no longer
needed).
- Added some checks when cancelling a thread and removed the usleep() in
cThread::Start() (suggested by Ludwig Nussel). Also removed 'running' from
cThread and using only childTid to indicate whether a thread is actually
running.
- Added cCondWait::Sleep() and using it to replace all usleep() calls (based
on a suggestion by Werner Fink).
- Only assigning events to timers if the related schedule has actually been
modified.
- When searching for the present event, the running status is now only taken
into account if the event has been "seen" within the past 30 seconds.
This avoids shortly seeing the wrong events in the channel display when
switching to a channel that hasn't been tuned to in a while.
......@@ -7,14 +7,7 @@ Version 1.3
IMPORTANT NOTES:
----------------
VDR currently doesn't work with NPTL ("Native Posix Thread Library").
Either don't use NPTL, or set the environment variable
LD_ASSUME_KERNEL=2.4.1
before running VDR.
Also, please make sure your environment is NOT set to use UTF-8 or
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"
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: channels.c 1.27 2004/10/17 12:20:56 kls Exp $
* $Id: channels.c 1.28 2004/10/22 14:11:07 kls Exp $
*/
#include "channels.h"
......@@ -503,7 +503,7 @@ static int PrintParameter(char *p, char Name, int Value)
return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0;
}
const char *cChannel::ParametersToString(void)
const char *cChannel::ParametersToString(void) const
{
char type = *cSource::ToString(source);
if (isdigit(type))
......@@ -563,14 +563,12 @@ bool cChannel::StringToParameters(const char *s)
return true;
}
const char *cChannel::ToText(cChannel *Channel)
const char *cChannel::ToText(const cChannel *Channel)
{
char buf[MaxChannelName * 2];
char *s = Channel->name;
if (strchr(s, ':')) {
s = strcpy(buf, s);
strreplace(s, ':', '|');
}
const char *s = Channel->name;
if (strchr(s, ':'))
s = strreplace(strcpy(buf, s), ':', '|');
free(buffer);
if (Channel->groupSep) {
if (Channel->number)
......@@ -602,7 +600,7 @@ const char *cChannel::ToText(cChannel *Channel)
return buffer;
}
const char *cChannel::ToText(void)
const char *cChannel::ToText(void) const
{
return ToText(this);
}
......
......@@ -32,7 +32,7 @@ Sky News;BSkyB:11597:vC56:S19.2E:22000:305+131:306=eng:0:0:28707:1:1026:0
Veronica/FoxKids;CANAL+:12574:hC56:S19.2E:22000:518+8190:92=dut:38:622,602,100:5020:53:1109:0
BVN;CANAL+:12574:hC56:S19.2E:22000:515+8190:96=dut:36:0:5025:53:1109:0
CNBC Europe;CNBC:12610:vC56:S19.2E:22000:944:945=eng:946:0:12200:1:1112:0
n-tv;n-tv:12669:vC56:S19.2E:22000:162:96=deu:55:0:12730:1:1116:0
n-tv;RTL World:12187:hC34:S19.2E:27500:169:73=deu:80:0:12090:1:1089:0
Al Jazeera;CANALSATELLITE:11567:vC56:S19.2E:22000:55:56=ara:0:0:9021:1:1024:0
TW1;ORF:12692:hC56:S19.2E:22000:166:167=deu:168:0:13013:1:1117:0
Eurosport;ZDFvision:11953:hC34:S19.2E:27500:410:420=deu:430:0:28009:1:1079:0
......@@ -45,22 +45,22 @@ MDR FERNSEHEN;ARD:12109:hC34:S19.2E:27500:401:402=deu:404:0:28204:1:1073:0
rbb Berlin;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28206:1:1073:0
:Premiere World
START,PREMIERE START;PREMIERE:11797:hC34:S19.2E:27500:255:256=deu:32:1702,1801,1722:8:133:2:0
PREM 1,PREMIERE 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu,513=deu;515=deu:32:1702,1801,1722:10:133:2:0
PREM 2,PREMIERE 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1702,1801,1722:11:133:2:0
PREM 1,PREMIERE 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu;515=deu:32:1702,1801,1722:10:133:2:0
PREM 2,PREMIERE 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu;1795=deu:32:1702,1722,1801:11:133:2:0
PREM 3,PREMIERE 3;PREMIERE:11797:hC34:S19.2E:27500:2303:2304=deu,2305=deu:32:1722,1801,1702:43:133:2:0
PREM 4,PREMIERE 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu,769=deu:32:1801,1722,1702:9:133:2:0
PREM 5,PREMIERE 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu,1281=deu:32:1722,1702,1801:29:133:2:0
PREM 6,PREMIERE 6;PREMIERE:11797:hC34:S19.2E:27500:1535:1536=deu:32:1702,1801,1722:41:133:2:0
PREM 7,PREMIERE 7;PREMIERE:11797:hC34:S19.2E:27500:1023:1024=deu:32:1722,1801,1702:20:133:2:0
PREM 5,PREMIERE 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu:32:1722,1702,1801:29:133:2:0
PREM 6,PREMIERE 6;PREMIERE:11797:hC34:S19.2E:27500:1535:1536=deu:32:1702,1722,1801:41:133:2:0
PREM 7,PREMIERE 7;PREMIERE:11797:hC34:S19.2E:27500:1023:1024=deu:32:1722,1702,1801:20:133:2:0
DISNEY,DISNEY CHANNEL;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:0:1722,1702,1801:34:133:17:0
:Premiere Direkt
DIREKT,PREMIERE DIREKT;PREMIERE:12031:hC34:S19.2E:27500:2815:2816=deu,2817=deu;2819=deu:0:0:18:133:4:0
:PW Erotic
B-UHSE,BEATE-UHSE.TV;PREMIERE:12070:hC34:S19.2E:27500:1023:1024=deu:32:1801,1702,1722:21:133:1:0
EROTIK,DIREKT EROTIK;PREMIERE:12031:hC34:S19.2E:27500:1279:0:0:1722,1801,1702:513:133:4:0
EROTIK,DIREKT EROTIK;PREMIERE:12031:hC34:S19.2E:27500:1279:0:0:1722,1702,1801:513:133:4:0
:Sportsworld
SPORT 1,PREMIERE SPORT 1;PREMIERE:11719:hC34:S19.2E:27500:255:256=deu:32:1801,1702,1722:17:133:3:0
SPORT 2,PREMIERE SPORT 2;PREMIERE:12031:hC34:S19.2E:27500:3839:3840=deu,3841=deu:32:1722,1702,1801:27:133:4:0
Konferenz:11719:hC34:S19.2E:27500:255:256=deu,257=deu:32:1801,1702,1722:17:133:3:0
Formel 1:12031:hC34:S19.2E:27500:3839:3840=deu,3841=deu:32:1702,1722,1801:27:133:4:0
:Beta Digital
N24;ProSiebenSat.1:12480:vC34:S19.2E:27500:2047:2048=deu:36:0:47:133:33:0
Liberty TV.com;Maastricht Multimedia:12610:vC56:S19.2E:22000:941:943=deu:0:0:12199:1:1112: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.19 2004/10/17 11:52:07 kls Exp $
* $Id: channels.h 1.20 2004/10/22 14:09:47 kls Exp $
*/
#ifndef __CHANNELS_H
......@@ -88,7 +88,7 @@ class cChannel : public cListObject {
friend class cMenuEditChannel;
private:
static char *buffer;
static const char *ToText(cChannel *Channel);
static const char *ToText(const cChannel *Channel);
enum { MaxChannelName = 64 }; // 63 chars + terminating 0!
int __BeginData__;
char name[MaxChannelName];
......@@ -122,14 +122,14 @@ private:
int modification;
cLinkChannels *linkChannels;
cChannel *refChannel;
const char *ParametersToString(void);
const char *ParametersToString(void) const;
bool StringToParameters(const char *s);
public:
cChannel(void);
cChannel(const cChannel &Channel);
~cChannel();
cChannel& operator= (const cChannel &Channel);
const char *ToText(void);
const char *ToText(void) const;
bool Parse(const char *s, bool AllowNonUniqueID = false);
bool Save(FILE *f);
const char *Name(void) const { return name; }
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.200 2004/07/27 07:22:46 kls Exp $
* $Id: config.h 1.201 2004/10/22 13:29:38 kls Exp $
*/
#ifndef __CONFIG_H
......@@ -20,8 +20,8 @@
#include "i18n.h"
#include "tools.h"
#define VDRVERSION "1.3.13"
#define VDRVERSNUM 10313 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.3.14"
#define VDRVERSNUM 10314 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99
#define MAXLIFETIME 99
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 1.60 2004/10/17 09:39:10 kls Exp $
* $Id: device.c 1.61 2004/10/23 10:15:31 kls Exp $
*/
#include "device.h"
......@@ -595,8 +595,8 @@ bool cDevice::AttachPlayer(cPlayer *Player)
if (player)
Detach(player);
player = Player;
player->device = this;
SetPlayMode(player->playMode);
player->device = this;
player->Activate(true);
return true;
}
......
......@@ -4,12 +4,13 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: diseqc.c 1.2 2002/12/07 13:44:56 kls Exp $
* $Id: diseqc.c 1.3 2004/10/24 11:04:56 kls Exp $
*/
#include "diseqc.h"
#include <ctype.h>
#include "sources.h"
#include "thread.h"
// -- cDiseqc ----------------------------------------------------------------
......@@ -61,7 +62,7 @@ char *cDiseqc::Wait(char *s)
int n = strtol(s, &p, 10);
if (!errno && p != s && n >= 0) {
if (!parsing)
usleep(n * 1000);
cCondWait::SleepMs(n);
return p;
}
esyslog("ERROR: illegal value for wait time in '%s'", s - 1);
......
......@@ -60,3 +60,14 @@ S21.5E 99999 H 10600 t V W15 [E0 10 38 F7] W15 B W15 T
# S21.5E 99999 V 10600 [E0 10 38 F5]
# S21.5E 11700 H 9750 [E0 10 38 F6]
# S21.5E 99999 H 10600 [E0 10 38 F7]
#
# DisiCon-4 Single Cable Network:
#
# horizontal: 11.704 - 12.205 GHz (1. IF: 1144 - 1645 MHz) - LOF 1 (10,56 GHz)
# horizontal: 12.676 - 12.709 GHz (1. IF: 2116 - 2148 MHz) - LOF 1 (10,56 GHz)
# vertical: 12.035 - 12.107 GHz (1. IF: 955 - 1027 MHz) - LOF 3 (11,08 GHz)
# vertical: 12.464 - 12.716 GHz (1. IF: 1744 - 1996 MHz) - LOF 2 (10,72 GHz)
#
# S19.2E 99999 H 10560 t v
# S19.2E 12110 V 11080 t v
# S19.2E 99999 V 10720 t v
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 1.97 2004/10/17 09:10:43 kls Exp $
* $Id: dvbdevice.c 1.100 2004/10/24 11:06:37 kls Exp $
*/
#include "dvbdevice.h"
......@@ -35,7 +35,7 @@ extern "C" {
#define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1
#define DO_MULTIPLE_RECORDINGS 1
//#define WAIT_FOR_LOCK_AFTER_TUNING 1
#define TUNER_LOCK_TIMEOUT 5000 // ms
#define DEV_VIDEO "/dev/video"
#define DEV_DVB_ADAPTER "/dev/dvb/adapter"
......@@ -78,6 +78,8 @@ private:
bool useCa;
time_t startTime;
eTunerStatus tunerStatus;
cMutex mutex;
cCondVar locked;
cCondWait newSet;
bool SetFrontend(void);
virtual void Action(void);
......@@ -86,7 +88,7 @@ public:
virtual ~cDvbTuner();
bool IsTunedTo(const cChannel *Channel) const;
void Set(const cChannel *Channel, bool Tune, bool UseCa);
bool Locked(void) { return tunerStatus >= tsLocked; }
bool Locked(int TimeoutMs = 0);
};
cDvbTuner::cDvbTuner(int Fd_Frontend, int CardIndex, fe_type_t FrontendType, cCiHandler *CiHandler)
......@@ -125,7 +127,7 @@ void cDvbTuner::Set(const cChannel *Channel, bool Tune, bool UseCa)
if (Tune)
tunerStatus = tsSet;
else if (tunerStatus == tsCam)
tunerStatus = tsTuned;
tunerStatus = tsLocked;
useCa = UseCa;
if (Channel->Ca() && tunerStatus != tsCam)
startTime = time(NULL);
......@@ -134,6 +136,14 @@ void cDvbTuner::Set(const cChannel *Channel, bool Tune, bool UseCa)
newSet.Signal();
}
bool cDvbTuner::Locked(int TimeoutMs)
{
cMutexLock MutexLock(&mutex);
if (TimeoutMs && tunerStatus < tsLocked)
locked.TimedWait(mutex, TimeoutMs);
return tunerStatus >= tsLocked;
}
static unsigned int FrequencyToHz(unsigned int f)
{
while (f && f < 1000000)
......@@ -253,22 +263,25 @@ void cDvbTuner::Action(void)
active = true;
while (active) {
Lock();
if (tunerStatus == tsSet)
if (tunerStatus == tsSet) {
dvb_frontend_event event;
while (ioctl(fd_frontend, FE_GET_EVENT, &event) == 0)
; // discard stale events
tunerStatus = SetFrontend() ? tsTuned : tsIdle;
if (tunerStatus == tsTuned) {
fe_status_t status = fe_status_t(0);
CHECK(ioctl(fd_frontend, FE_READ_STATUS, &status));
if (status & FE_HAS_LOCK)
tunerStatus = tsLocked;
}
if (tunerStatus != tsIdle) {
dvb_frontend_event event;
if (ioctl(fd_frontend, FE_GET_EVENT, &event) == 0) {
if (event.status & FE_REINIT) {
tunerStatus = tsSet;
esyslog("ERROR: frontend %d was reinitialized - re-tuning", cardIndex);
while (ioctl(fd_frontend, FE_GET_EVENT, &event) == 0) {
if (event.status & FE_REINIT) {
tunerStatus = tsSet;
esyslog("ERROR: frontend %d was reinitialized - re-tuning", cardIndex);
}
if (event.status & FE_HAS_LOCK) {
cMutexLock MutexLock(&mutex);
tunerStatus = tsLocked;
locked.Broadcast();
}
}
}
}
if (ciHandler) {
if (ciHandler->Process() && useCa) {
......@@ -293,7 +306,7 @@ void cDvbTuner::Action(void)
}
Unlock();
// in the beginning we loop more often to let the CAM connection start up fast
newSet.Wait((ciHandler && (time(NULL) - startTime < 20)) ? 100 : 1000);
newSet.Wait((tunerStatus == tsTuned || ciHandler && (time(NULL) - startTime < 20)) ? 100 : 1000);
}
}
......@@ -735,25 +748,29 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
StartTransferMode = false;
#endif
// XXX 1.3: use the same mechanism as below (!EITScanner.UsesDevice(this))
if (EITScanner.Active()) {
StartTransferMode = false;
TurnOnLivePIDs = false;
}
// Turn off live PIDs if necessary:
if (TurnOffLivePIDs)
TurnOffLiveMode();
// Set the tuner:
dvbTuner->Set(Channel, DoTune, !EITScanner.UsesDevice(this)); //XXX 1.3: this is an ugly hack - find a cleaner solution//XXX
#ifdef WAIT_FOR_LOCK_AFTER_TUNING
//XXX TODO preliminary fix for the "Unknown picture type" error
time_t t0 = time(NULL);
while (!dvbTuner->Locked() && time(NULL) - t0 < 5)
usleep(100);
#endif
// If this channel switch was requested by the EITScanner we don't wait for
// a lock and don't set any live PIDs (the EITScanner will wait for the lock
// by itself before setting any filters):
if (EITScanner.UsesDevice(this))
return true;
// Wait for a lock:
if (!dvbTuner->Locked(TUNER_LOCK_TIMEOUT)) {
esyslog("ERROR: no lock for channel %d on device %d", Channel->Number(), CardIndex() + 1);
return false;
}
// PID settings:
if (TurnOnLivePIDs) {
......@@ -1058,7 +1075,7 @@ void cDvbDevice::StillPicture(const uchar *Data, int Length)
#define MIN_IFRAME 400000
for (int i = MIN_IFRAME / Length + 1; i > 0; i--) {
safe_write(fd_video, Data, Length);
usleep(1); // allows the buffer to be displayed in case the progress display is active
cCondWait::SleepMs(1); // allows the buffer to be displayed in case the progress display is active
}
#endif
}
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 1.25 2004/10/15 13:07:55 kls Exp $
* $Id: dvbplayer.c 1.26 2004/10/23 12:39:35 kls Exp $
*/
#include "dvbplayer.h"
......@@ -490,8 +490,6 @@ void cDvbPlayer::Action(void)
break;
}
}
else//XXX
usleep(1); // this keeps the CPU load low
}
// Store the frame in the buffer:
......
......@@ -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.97 2004/10/16 09:49:13 kls Exp $
* $Id: eit.c 1.98 2004/10/24 14:56:39 kls Exp $
*/
#include "eit.h"
......@@ -59,6 +59,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
}
else {
// We have found an existing event, either through its event ID or its start time.
pEvent->SetSeen();
// If the existing event has a zero table ID it was defined externally and shall
// not be overwritten.
if (pEvent->TableID() == 0x00)
......@@ -215,8 +216,10 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
if (Empty && Tid == 0x4E && getSectionNumber() == 0)
// ETR 211: an empty entry in section 0 of table 0x4E means there is currently no event running
pSchedule->ClrRunningStatus(channel);
if (Modified)
if (Modified) {
pSchedule->Sort();
Schedules->SetModified(pSchedule);
}
}
// --- cTDT ------------------------------------------------------------------
......
......@@ -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.19 2004/05/22 12:37:07 kls Exp $
* $Id: epg.c 1.20 2004/10/24 15:01:50 kls Exp $
*/
#include "epg.h"
......@@ -99,6 +99,11 @@ void cEvent::SetVps(time_t Vps)
vps = Vps;
}
void cEvent::SetSeen(void)
{
seen = time(NULL);
}
bool cEvent::HasTimer(void) const
{
for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
......@@ -478,6 +483,7 @@ cSchedule::cSchedule(tChannelID ChannelID)
{
channelID = ChannelID;
hasRunning = false;;
modified = 0;
}
cEvent *cSchedule::AddEvent(cEvent *Event)
......@@ -496,7 +502,7 @@ const cEvent *cSchedule::GetPresentEvent(bool CheckRunningStatus) const
if (!CheckRunningStatus)
break;
}
if (CheckRunningStatus && p->RunningStatus() >= SI::RunningStatusPausing)
if (CheckRunningStatus && time(NULL) - p->Seen() < 30 && p->RunningStatus() >= SI::RunningStatusPausing)
return p;
}
return pe;
......@@ -643,6 +649,7 @@ bool cSchedule::Read(FILE *f, cSchedules *Schedules)
if (!cEvent::Read(f, p))
return false;
p->Sort();
Schedules->SetModified(p);
}
}
else {
......@@ -680,6 +687,7 @@ cSchedules cSchedules::schedules;
const char *cSchedules::epgDataFileName = NULL;
time_t cSchedules::lastCleanup = time(NULL);
time_t cSchedules::lastDump = time(NULL);
time_t cSchedules::modified = 0;
const cSchedules *cSchedules::Schedules(cSchedulesLock &SchedulesLock)
{
......@@ -693,6 +701,12 @@ void cSchedules::SetEpgDataFileName(const char *FileName)
epgDataFileName = strdup(FileName);
}
void cSchedules::SetModified(cSchedule *Schedule)
{
Schedule->SetModified();
modified = time(NULL);
}
void cSchedules::Cleanup(bool Force)
{
if (Force)
......
......@@ -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.h 1.15 2004/03/14 13:25:39 kls Exp $
* $Id: epg.h 1.16 2004/10/24 13:56:00 kls Exp $
*/
#ifndef __EPG_H
......@@ -36,6 +36,7 @@ private:
time_t startTime; // Start time of this event
int duration; // Duration of this event in seconds
time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL)
time_t seen; // When this event was last seen in the data stream
public:
cEvent(tChannelID ChannelID, u_int16_t EventID);
~cEvent();
......@@ -52,6 +53,7 @@ public:
time_t EndTime(void) const { return startTime + duration; }
int Duration(void) const { return duration; }
time_t Vps(void) const { return vps; }
time_t Seen(void) const { return seen; }
bool HasTimer(void) const;
bool IsRunning(bool OrAboutToStart = false) const;
const char *GetDateString(void) const;
......@@ -68,6 +70,7 @@ public:
void SetStartTime(time_t StartTime);
void SetDuration(int Duration);
void SetVps(time_t Vps);
void SetSeen(void);
void Dump(FILE *f, const char *Prefix = "") const;
static bool Read(FILE *f, cSchedule *Schedule);
void FixEpgBugs(void);
......@@ -80,9 +83,12 @@ private:
tChannelID channelID;
cList<cEvent> events;
bool hasRunning;
time_t modified;
public:
cSchedule(tChannelID ChannelID);
tChannelID ChannelID(void) const { return channelID; }
time_t Modified(void) const { return modified; }
void SetModified(void) { modified = time(NULL); }
void SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel = NULL);
void ClrRunningStatus(cChannel *Channel = NULL);
void ResetVersions(void);
......@@ -117,12 +123,15 @@ private:
static const char *epgDataFileName;
static time_t lastCleanup;
static time_t lastDump;
static time_t modified;
public:
static void SetEpgDataFileName(const char *FileName);
static const cSchedules *Schedules(cSchedulesLock &SchedulesLock);
///< Caller must provide a cSchedulesLock which has to survive the entire
///< time the returned cSchedules is accessed. Once the cSchedules is no
///< longer used, the cSchedulesLock must be destroyed.
static time_t Modified(void) { return modified; }
static void SetModified(cSchedule *Schedule);
static void Cleanup(bool Force = false);
static void ResetVersions(void);
static bool ClearAll(void);
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: font.c 1.8 2004/05/31 09:55:37 kls Exp $
* $Id: font.c 1.9 2004/10/23 14:06:01 kls Exp $
*/
#include "config.h"
......@@ -28,13 +28,18 @@
#include "fontosd-iso8859-7.c"
#include "fontsml-iso8859-7.c"
#include "fontfix-iso8859-15.c"
#include "fontosd-iso8859-15.c"
#include "fontsml-iso8859-15.c"
// --- cFont -----------------------------------------------------------------
static void *FontData[eDvbCodeSize][eDvbFontSize] = {
{ FontOsd_iso8859_1, FontFix_iso8859_1, FontSml_iso8859_1 },
{ FontOsd_iso8859_2, FontFix_iso8859_2, FontSml_iso8859_2 },
{ FontOsd_iso8859_5, FontFix_iso8859_5, FontSml_iso8859_5 },
{ FontOsd_iso8859_7, FontFix_iso8859_7, FontSml_iso8859_7 },
{ FontOsd_iso8859_1, FontFix_iso8859_1, FontSml_iso8859_1 },
{ FontOsd_iso8859_2, FontFix_iso8859_2, FontSml_iso8859_2 },
{ FontOsd_iso8859_5, FontFix_iso8859_5, FontSml_iso8859_5 },
{ FontOsd_iso8859_7, FontFix_iso8859_7, FontSml_iso8859_7 },
{ FontOsd_iso8859_15, FontFix_iso8859_15, FontSml_iso8859_15 },
};
static const char *FontCode[eDvbCodeSize] = {
......@@ -42,6 +47,7 @@ static const char *FontCode[eDvbCodeSize] = {
"iso8859-2",
"iso8859-5",
"iso8859-7",
"iso8859-15",
};
eDvbCode cFont::code = code_iso8859_1;
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: font.h 1.8 2004/05/31 09:52:46 kls Exp $
* $Id: font.h 1.9 2004/10/23 14:06:37 kls Exp $
*/
#ifndef __FONT_H
......@@ -24,7 +24,8 @@ enum eDvbCode {
code_iso8859_2,
code_iso8859_5,
code_iso8859_7,
#define eDvbCodeSize (code_iso8859_7 + 1)
code_iso8859_15,
#define eDvbCodeSize (code_iso8859_15 + 1)
};
class cFont {
......
This diff is collapsed.
......@@ -2132,30 +2132,30 @@ cFont::tPixelData FontSml_iso8859_2[][25] = {
0x0000000C, // ........**.
},
{ // 114
6, 23,
0x00000000, // ......
0x00000000, // ......
0x00000000, // ......
0x00000000, // ......
0x00000000, // ......
0x00000000, // ......
0x00000000, // ......
0x00000000, // ......
0x00000000, // ......
0x00000036, // .**.**
0x00000036, // .**.**
0x00000038, // .***..
0x00000030, // .**...
0x00000030, // .**...
0x00000030, // .**...
0x00000030, // .**...
0x00000030, // .**...