Commit ddd1e13e authored by Klaus Schmidinger's avatar Klaus Schmidinger

Version 1.3.29

- Fixed a race condition in cTransfer (thanks to Klaus Heppenheimer for reporting this one).
  In doing so, the 'active' variables used by the actual derived cThread classes
  have been replaced by the cThread::Running() function.
  Plugin authors may want to check their derived cThread classes and replace any 'active'
  variables the same way as, for instance, done in transfer.c.
- Fixed handling EPG data for time shifted events (thanks to Marco Schlüßler).
- Increased the default value for 'Min. user inactivity' to 300 minutes (suggested
  by Helmut Auer).
- Now storing the channel id in the info.vdr file even if there is no EPG info
  available (thanks to Andreas Brachold for reporting that there are empty info.vdr
  files created in that case).
- Added some 'mkdir -p' to the Makefile's 'install' target (thanks to Wayne Keer).
- Changed the title of the recording info menu (thanks to Rolf Ahrenberg).
- Fixed handling the frame number display if '7' is pressed before the first editing
  mark, or '9' after the last one (thanks to Thomas Günther).
- Now discarding any previous numerical input to switch channels if Up, Down, Channel+,
  Channel-, Left or Right is pressed (thanks to Wolfgang Rohdewald for reporting a
  problem with this).
- Pressing Ok while entering a channel number now immediately switches to that
  channel, without waiting for further input.
- Avoiding unnecessary OSD draw operations caused by the audio track description
  display in the ST:TNG skin's channel display (thanks to Oliver Endriss for reporting
  this).
- Removed the VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES stuff from
  cDvbDevice::StillPicture(), since apparently the VIDEO_STILLPICTURE call works.
parent 4c5de288
......@@ -520,6 +520,7 @@ Helmut Auer <vdr@helmutauer.de>
for fixing a frequency/transponder handling mixup when setting the time from the
DVB data stream
for implementing a default cRemote::Initialize()
for suggesting to increase the default value for 'Min. user inactivity' to 300 minutes
Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c
......@@ -570,6 +571,8 @@ Oliver Endriss <o.endriss@gmx.de>
being learned overwriting the date/time in the 'classic' skin
for making cDvbOsd check available OSD memory at runtime
for making cEIT::cEIT() drop EPG events that have a zero start time or duration
for reporting an unnecessary OSD draw operation caused by the audio track description
display in the ST:TNG skin's channel display
Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf'
......@@ -822,6 +825,8 @@ Andreas Brachold <vdr04@deltab.de>
the actual plugin library files from this version of VDR
for making files and directories created with rights according to the shell's
umask settings
for reporting that there are empty info.vdr files created if there is no EPG
info available
Manuel Hartl <icecep@gmx.net>
for suggesting to extend the logging info when starting/stopping timers
......@@ -889,6 +894,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for fixing internationalization of the text for "Setup/DVB/Audio language(s)"
for making pressing the Power button not stop Transfer Mode or replay immediately
for making EPG events without a title display "No title" instead of "(null)"
for changing the title of the recording info menu
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
......@@ -1143,6 +1149,7 @@ Wayne Keer <syphir@syphir.sytes.net>
mtError
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
Marco Schlüßler <marco@lordzodiac.de>
for fixing handling colors in cDvbSpuPalette::yuv2rgb()
......@@ -1203,6 +1210,7 @@ Marco Schl
for fixing a possible hangup when ending a replay session while cIndexFile::CatchUp()
is waiting
for improving resetting CAM connections
for fixing handling EPG data for time shifted events
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP
......@@ -1341,6 +1349,8 @@ Wolfgang Rohdewald <wolfgang@rohdewald.de>
cEvent::FixEpgBugs()
for adding a missing cMutexLock to cRemote::HasKeys()
for removing an unnecessary #include from osd.c
for reporting a problem with with numerical input to switch channels if Up, Down,
Channel+ or Channel- is pressed
Chad Flynt <hoochster@sofnet.com>
for suggestions and experiments regarding the buffer reserve in cTransfer
......@@ -1417,3 +1427,10 @@ Frank Kr
Bernhard Stegmaier <bernhard.stegmaier@in.tum.de>
for reporting a problem in cEITScanner::Process() with forced EPG scans if EPG
scan timeout is set to 0
Klaus ??? <klaus@reel-multimedia.com>
for reporting a race condition in cTransfer.
Thomas Günther <tom1@toms-cafe.de>
for fixing handling the frame number display if '7' is pressed before the first
editing mark, or '9' after the last one
......@@ -3671,3 +3671,31 @@ Video Disk Recorder Revision History
- Fixed setting system time to avoid time jumps in case of faulty data (thanks
to Andreas Böttger).
- Fixed a memory leak in the SVDRP command LSTE (thanks to Stefan Huelswitt).
2005-08-15: Version 1.3.29
- Fixed a race condition in cTransfer (thanks to Klaus ??? for reporting this one).
In doing so, the 'active' variables used by the actual derived cThread classes
have been replaced by the cThread::Running() function.
Plugin authors may want to check their derived cThread classes and replace any 'active'
variables the same way as, for instance, done in transfer.c.
- Fixed handling EPG data for time shifted events (thanks to Marco Schlüßler).
- Increased the default value for 'Min. user inactivity' to 300 minutes (suggested
by Helmut Auer).
- Now storing the channel id in the info.vdr file even if there is no EPG info
available (thanks to Andreas Brachold for reporting that there are empty info.vdr
files created in that case).
- Added some 'mkdir -p' to the Makefile's 'install' target (thanks to Wayne Keer).
- Changed the title of the recording info menu (thanks to Rolf Ahrenberg).
- Fixed handling the frame number display if '7' is pressed before the first editing
mark, or '9' after the last one (thanks to Thomas Günther).
- Now discarding any previous numerical input to switch channels if Up, Down, Channel+,
Channel-, Left or Right is pressed (thanks to Wolfgang Rohdewald for reporting a
problem with this).
- Pressing Ok while entering a channel number now immediately switches to that
channel, without waiting for further input.
- Avoiding unnecessary OSD draw operations caused by the audio track description
display in the ST:TNG skin's channel display (thanks to Oliver Endriss for reporting
this).
- Removed the VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES stuff from
cDvbDevice::StillPicture(), since apparently the VIDEO_STILLPICTURE call works.
......@@ -746,7 +746,7 @@ Version 1.2
Miscellaneous:
Min. event timeout = 30
Min. user inactivity = 120
Min. user inactivity = 300
If the command line option '-s' has been set, VDR will
automatically shutdown the computer if the next timer
event is at least MinEventTimeout minutes in the future,
......
......@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 1.76 2005/07/31 11:20:20 kls Exp $
# $Id: Makefile 1.77 2005/08/14 11:42:20 kls Exp $
.DELETE_ON_ERROR:
......@@ -183,11 +183,16 @@ plugins-clean:
# Install the files:
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
@gzip -c vdr.5 > $(MANDIR)/man5/vdr.5.gz
@if [ ! -d $(VIDEODIR) ]; then\
mkdir $(VIDEODIR);\
mkdir -p $(VIDEODIR);\
cp *.conf $(VIDEODIR);\
fi
......
......@@ -8,7 +8,7 @@ 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:2401:2402=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
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;703:704:0:28112: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
Phoenix;ARD:11836:hC34:S19.2E:27500:901:902=deu:904:0:28114:1:1101:0
ZDF;ZDFvision:11953:hC34:S19.2E:27500:110:120=deu,121=2ch;125=dd:130:0:28006:1:1079:0
......@@ -26,9 +26,9 @@ NEUN LIVE Television,NEUN LIVE;BetaDigital:12480:vC34:S19.2E:27500:767:768=deu:3
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,91=rus,93=eng,94=ita,95=esl,98=por,99=deu:0:0:8004:1:1070: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:601:602=deu:604:0:28205:1:1073:0
Sky News;BSkyB:11597:vC56:S19.2E:22000:305+131:306=eng:0:0:28707:1:1026: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
n-tv;RTL World:12187:hC34:S19.2E:27500:169:73=deu:80:0:12090:1:1089:0
......@@ -46,9 +46,9 @@ rbb Berlin;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28206:1:1073:0
PREMIERE START,START;PREMIERE:11797:hC34:S19.2E:27500:255:256=deu:32:1702,1801,1722:8:133:2:0
PREMIERE 1,PREM 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu;515=deu:32:1722,1702,1801:10:133:2:0
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu;1795=deu:32:1801,1722,1702: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,769=deu:32:1801,1722,1702:9:133:2:0
PREMIERE 5,PREM 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu,1281=deu:32:1722,1801,1702:29:133:2:0
PREMIERE 3,PREM 3;PREMIERE:11797:hC34:S19.2E:27500:2303:2304=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 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
DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:32:1722,1801,1702:34:133:17:0
......@@ -64,7 +64,7 @@ PREMIERE WIN,WIN;PREMIERE:12031:hC34:S19.2E:27500:3839:3840=deu:32:1722,1801,170
N24;ProSiebenSat.1:12480:vC34:S19.2E:27500:2047:2048=deu:36:0:47:133:33:0
LibertyTV FR;LibertyTV.com:12610:vC56:S19.2E:22000:941:943=deu:0:0:12199:1:1112:0
:-
ProSieben Austria;ProSiebenSat.1:12051:vC34:S19.2E:27500:161:84=deu;85=deu:36:0:20002:1:1082:0
ProSieben Austria;ProSiebenSat.1:12051:vC34:S19.2E:27500:161:84=deu:36:0:20002:1:1082:0
Kabel 1 Schweiz;ProSiebenSat.1:12051:vC34:S19.2E:27500:162:163=deu:165:0:20003:1:1082:0
Kabel 1 Austria;ProSiebenSat.1:12051:vC34:S19.2E:27500:166:167=deu:169:0:20004:1:1082:0
ProSieben Schweiz;ProSiebenSat.1:12051:vC34:S19.2E:27500:289:290=deu:33:0:20001:1:1082:0
......@@ -79,7 +79,7 @@ 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
Yorin;CANALDIGITAAL:12574:hC56:S19.2E:22000:512+8190:84=dut:33:622,100:5010:53:1109: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
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
......@@ -92,6 +92,8 @@ Sky Mix;BSkyB:12226:hC23:S28.2E:27500:514+8190:642=eng,662=NAR:578:960,961:5104:
ITV2;BSkyB:10758:vC56:S28.2E:22000:2314:2315=eng:2317:960,961:10070:2:2044:0
Sci-Fi;BSkyB:12148:hC23:S28.2E:27500:512+8190:640=eng:576:960,961:4905:2:2023:0
Paramount;BSkyB:12187:hC23:S28.2E:27500:2313+2304:2317=eng,2318=NAR:2315:960,961:5904:2:2025:0
Paramount;BSkyB:11526:vC23:S28.2E:27500:2317+2306:2318=eng:2319:960,961:50305:2:2404:0
Paramount 2;BSkyB:11914:hC23:S28.2E:27500:514+8190:642=eng,662=NAR:578:960,961:4504:2:2011:0
Discovery;BSkyB:11875:hC23:S28.2E:27500:2304:2306=eng,2307=NAR:2305:960,961:6201:2:2009:0
Sky Movies 1;BSkyB:11836:hC23:S28.2E:27500:518+8190:646=eng,653=NAR;686=eng:582:960,961:4303:2:2007:0
Sky Movies 2;BSkyB:11836:hC23:S28.2E:27500:519+8190:647=eng,667=NAR;687=eng:583:960,961:4302:2:2007:0
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.c 1.135 2005/08/07 09:03:00 kls Exp $
* $Id: config.c 1.136 2005/08/13 13:47:08 kls Exp $
*/
#include "config.h"
......@@ -295,7 +295,7 @@ cSetup::cSetup(void)
MaxVideoFileSize = MAXVIDEOFILESIZE;
SplitEditedFiles = 0;
MinEventTimeout = 30;
MinUserInactivity = 120;
MinUserInactivity = 300;
MultiSpeedMode = 0;
ShowReplayMode = 0;
ResumeID = 0;
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.222 2005/07/30 09:19:25 kls Exp $
* $Id: config.h 1.223 2005/08/13 09:43:27 kls Exp $
*/
#ifndef __CONFIG_H
......@@ -20,8 +20,8 @@
#include "i18n.h"
#include "tools.h"
#define VDRVERSION "1.3.28"
#define VDRVERSNUM 10328 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.3.29"
#define VDRVERSNUM 10329 // 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: cutter.c 1.8 2005/05/15 14:21:08 kls Exp $
* $Id: cutter.c 1.10 2005/08/14 10:51:54 kls Exp $
*/
#include "cutter.h"
......@@ -18,7 +18,6 @@
class cCuttingThread : public cThread {
private:
const char *error;
bool active;
int fromFile, toFile;
cFileName *fromFileName, *toFileName;
cIndexFile *fromIndex, *toIndex;
......@@ -35,7 +34,6 @@ cCuttingThread::cCuttingThread(const char *FromFileName, const char *ToFileName)
:cThread("video cutting")
{
error = NULL;
active = false;
fromFile = toFile = -1;
fromFileName = toFileName = NULL;
fromIndex = toIndex = NULL;
......@@ -53,7 +51,6 @@ cCuttingThread::cCuttingThread(const char *FromFileName, const char *ToFileName)
cCuttingThread::~cCuttingThread()
{
active = false;
Cancel(3);
delete fromFileName;
delete toFileName;
......@@ -67,7 +64,8 @@ void cCuttingThread::Action(void)
if (Mark) {
fromFile = fromFileName->Open();
toFile = toFileName->Open();
active = fromFile >= 0 && toFile >= 0;
if (fromFile < 0 || toFile < 0)
return;
int Index = Mark->position;
Mark = fromMarks.Next(Mark);
int FileSize = 0;
......@@ -78,7 +76,7 @@ void cCuttingThread::Action(void)
uchar buffer[MAXFRAMESIZE];
bool LastMark = false;
bool cutIn = true;
while (active) {
while (Running()) {
uchar FileNumber;
int FileOffset, Length;
uchar PictureType;
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 1.103 2005/06/12 13:39:11 kls Exp $
* $Id: device.c 1.105 2005/08/14 10:52:08 kls Exp $
*/
#include "device.h"
......@@ -156,8 +156,6 @@ cDevice::cDevice(void)
SetVideoFormat(Setup.VideoFormat);
active = false;
mute = false;
volume = Setup.CurrentVolume;
......@@ -1126,25 +1124,25 @@ bool cDevice::Receiving(bool CheckAny) const
void cDevice::Action(void)
{
if (active && OpenDvr()) {
for (; active;) {
// Read data from the DVR device:
uchar *b = NULL;
if (GetTSPacket(b)) {
if (b) {
int Pid = (((uint16_t)b[1] & PID_MASK_HI) << 8) | b[2];
// Distribute the packet to all attached receivers:
Lock();
for (int i = 0; i < MAXRECEIVERS; i++) {
if (receiver[i] && receiver[i]->WantsPid(Pid))
receiver[i]->Receive(b, TS_SIZE);
}
Unlock();
}
}
else
break;
}
if (Running() && OpenDvr()) {
while (Running()) {
// Read data from the DVR device:
uchar *b = NULL;
if (GetTSPacket(b)) {
if (b) {
int Pid = (((uint16_t)b[1] & PID_MASK_HI) << 8) | b[2];
// Distribute the packet to all attached receivers:
Lock();
for (int i = 0; i < MAXRECEIVERS; i++) {
if (receiver[i] && receiver[i]->WantsPid(Pid))
receiver[i]->Receive(b, TS_SIZE);
}
Unlock();
}
}
else
break;
}
CloseDvr();
}
}
......@@ -1188,10 +1186,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
Receiver->device = this;
receiver[i] = Receiver;
Unlock();
if (!active) {
active = true;
if (!Running())
Start();
}
return true;
}
}
......@@ -1218,10 +1214,8 @@ void cDevice::Detach(cReceiver *Receiver)
else if (receiver[i])
receiversLeft = true;
}
if (!receiversLeft) {
active = false;
if (!receiversLeft)
Cancel(3);
}
}
void cDevice::DetachAll(int Pid)
......@@ -1246,13 +1240,11 @@ cTSBuffer::cTSBuffer(int File, int Size, int CardIndex)
delivered = false;
ringBuffer = new cRingBufferLinear(Size, TS_SIZE, true, "TS");
ringBuffer->SetTimeouts(100, 100);
active = true;
Start();
}
cTSBuffer::~cTSBuffer()
{
active = false;
Cancel(3);
delete ringBuffer;
}
......@@ -1262,20 +1254,20 @@ void cTSBuffer::Action(void)
if (ringBuffer) {
bool firstRead = true;
cPoller Poller(f);
for (; active;) {
if (firstRead || Poller.Poll(100)) {
firstRead = false;
int r = ringBuffer->Read(f);
if (r < 0 && FATALERRNO) {
if (errno == EOVERFLOW)
esyslog("ERROR: driver buffer overflow on device %d", cardIndex);
else {
LOG_ERROR;
break;
}
}
}
}
while (Running()) {
if (firstRead || Poller.Poll(100)) {
firstRead = false;
int r = ringBuffer->Read(f);
if (r < 0 && FATALERRNO) {
if (errno == EOVERFLOW)
esyslog("ERROR: driver buffer overflow on device %d", cardIndex);
else {
LOG_ERROR;
break;
}
}
}
}
}
}
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.h 1.60 2005/07/30 09:31:53 kls Exp $
* $Id: device.h 1.61 2005/08/13 11:44:13 kls Exp $
*/
#ifndef __DEVICE_H
......@@ -233,7 +233,6 @@ public:
// PID handle facilities
private:
bool active;
virtual void Action(void);
protected:
enum ePidType { ptAudio, ptVideo, ptPcr, ptTeletext, ptDolby, ptOther };
......@@ -518,7 +517,6 @@ class cTSBuffer : public cThread {
private:
int f;
int cardIndex;
bool active;
bool delivered;
cRingBufferLinear *ringBuffer;
virtual void Action(void);
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 1.131 2005/06/19 11:00:43 kls Exp $
* $Id: dvbdevice.c 1.134 2005/08/15 14:05:23 kls Exp $
*/
#include "dvbdevice.h"
......@@ -76,7 +76,6 @@ private:
cCiHandler *ciHandler;
cChannel channel;
const char *diseqcCommands;
bool active;
bool useCa;
time_t startTime;
eTunerStatus tunerStatus;
......@@ -101,7 +100,6 @@ cDvbTuner::cDvbTuner(int Fd_Frontend, int CardIndex, fe_type_t FrontendType, cCi
frontendType = FrontendType;
ciHandler = CiHandler;
diseqcCommands = NULL;
active = false;
useCa = false;
tunerStatus = tsIdle;
startTime = time(NULL);
......@@ -113,7 +111,6 @@ cDvbTuner::cDvbTuner(int Fd_Frontend, int CardIndex, fe_type_t FrontendType, cCi
cDvbTuner::~cDvbTuner()
{
active = false;
tunerStatus = tsIdle;
newSet.Signal();
Cancel(3);
......@@ -294,8 +291,7 @@ bool cDvbTuner::SetFrontend(void)
void cDvbTuner::Action(void)
{
dvb_frontend_event event;
active = true;
while (active) {
while (Running()) {
Lock();
if (tunerStatus == tsSet) {
while (GetFrontendEvent(event))
......@@ -1056,22 +1052,6 @@ void cDvbDevice::Mute(void)
void cDvbDevice::StillPicture(const uchar *Data, int Length)
{
/* Using the VIDEO_STILLPICTURE ioctl call would be the
correct way to display a still frame, but unfortunately this
doesn't work with frames from VDR. So let's do pretty much the
same here as in DVB/driver/dvb.c's play_iframe() - I have absolutely
no idea why it works this way, but doesn't work with VIDEO_STILLPICTURE.
If anybody ever finds out what could be changed so that VIDEO_STILLPICTURE
could be used, please let me know!
kls 2002-03-23
2003-08-30: apparently the driver can't handle PES data, so Oliver Endriss
<o.endriss@gmx.de> has changed this to strip all PES headers
and send pure ES data to the driver. Seems to work just fine!
Let's drop the VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES stuff
once this has proven to work in all cases.
*/
#define VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES
#ifdef VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES
if (Data[0] == 0x00 && Data[1] == 0x00 && Data[2] == 0x01 && (Data[3] & 0xF0) == 0xE0) {
// PES data
char *buf = MALLOC(char, Length);
......@@ -1143,13 +1123,6 @@ void cDvbDevice::StillPicture(const uchar *Data, int Length)
video_still_picture sp = { (char *)Data, Length };
CHECK(ioctl(fd_video, VIDEO_STILLPICTURE, &sp));
}
#else
#define MIN_IFRAME 400000
for (int i = MIN_IFRAME / Length + 1; i > 0; i--) {
safe_write(fd_video, Data, Length);
cCondWait::SleepMs(3); // allows the buffer to be displayed in case the progress display is active
}
#endif
}
bool cDvbDevice::Poll(cPoller &Poller, int TimeoutMs)
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 1.36 2005/07/30 10:00:24 kls Exp $
* $Id: dvbplayer.c 1.38 2005/08/14 10:52:45 kls Exp $
*/
#include "dvbplayer.h"
......@@ -79,7 +79,6 @@ private:
int wanted;
int length;
bool hasData;
bool active;
cCondWait newSet;
protected:
void Action(void);
......@@ -98,13 +97,11 @@ cNonBlockingFileReader::cNonBlockingFileReader(void)
buffer = NULL;
wanted = length = 0;
hasData = false;
active = false;
Start();
}
cNonBlockingFileReader::~cNonBlockingFileReader()
{
active = false;
newSet.Signal();
Cancel(3);
free(buffer);
......@@ -147,8 +144,7 @@ int cNonBlockingFileReader::Read(int FileHandle, uchar *Buffer, int Length)
void cNonBlockingFileReader::Action(void)
{
active = true;
while (active) {
while (Running()) {
Lock();
if (!hasData && f >= 0 && buffer) {
int r = safe_read(f, buffer + length, wanted - length);
......@@ -187,8 +183,6 @@ private:
cIndexFile *index;
int replayFile;
bool eof;
bool active;
bool running;
bool firstPacket;
ePlayModes playMode;
ePlayDirs playDir;
......@@ -207,7 +201,7 @@ protected:
public:
cDvbPlayer(const char *FileName);
virtual ~cDvbPlayer();
bool Active(void) { return active; }
bool Active(void) { return cThread::Running(); }
void Pause(void);
void Play(void);
void Forward(void);
......@@ -233,8 +227,6 @@ cDvbPlayer::cDvbPlayer(const char *FileName)
backTrace = NULL;
index = NULL;
eof = false;
active = true;
running = false;
firstPacket = true;
playMode = pmPlay;
playDir = pdForward;
......@@ -353,11 +345,8 @@ void cDvbPlayer::Activate(bool On)
if (replayFile >= 0)
Start();
}
else if (active) {
running = false;
else
Cancel(9);
active = false;
}
}
void cDvbPlayer::Action(void)
......@@ -374,8 +363,7 @@ void cDvbPlayer::Action(void)
int Length = 0;
bool Sleep = false;
running = true;
while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
while (Running() && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
if (Sleep) {
cCondWait::SleepMs(3); // this keeps the CPU load low
Sleep = false;
......@@ -501,7 +489,6 @@ void cDvbPlayer::Action(void)
Sleep = true;
}
}
active = running = false;
cNonBlockingFileReader *nbfr = nonBlockingFileReader;
nonBlockingFileReader = NULL;
......
......@@ -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.109 2005/08/07 13:52:29 kls Exp $
* $Id: eit.c 1.110 2005/08/13 13:27:34 kls Exp $
*/
#include "eit.h"
......@@ -35,8 +35,6 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
if (!channel)
return; // only collect data for known channels
cEvent *rEvent = NULL;
cSchedule *pSchedule = (cSchedule *)Schedules->GetSchedule(channelID);
if (!pSchedule) {
pSchedule = new cSchedule(channelID);
......@@ -53,6 +51,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
continue;
Empty = false;
cEvent *newEvent = NULL;
cEvent *rEvent = NULL;
cEvent *pEvent = (cEvent *)pSchedule->GetEvent(SiEitEvent.getEventId(), SiEitEvent.getStartTime());
if (!pEvent) {
// If we don't have that event yet, we create a new one.
......
......@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: i18n.c 1.197 2005/08/06 16:09:44 kls Exp $
* $Id: i18n.c 1.198 2005/08/14 12:03:47 kls Exp $
*
* Translations provided by:
*
......@@ -252,6 +252,27 @@ const tI18nPhrase Phrases[] = {
"Salvestused",
"Optagelser",
},
{ "Recording info",
"Aufzeichnung",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"Tallenteen tiedot",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "Setup",
"Einstellungen",
"Nastavitve",
......
......@@ -6,7 +6,7 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
*
* $Id: lirc.c 1.11 2005/07/31 10:18:09 kls Exp $
* $Id: lirc.c 1.12 2005/08/15 12:28:10 kls Exp $
*/
#include "lirc.h"
......@@ -61,48 +61,48 @@ void cLircRemote::Action(void)
bool repeat = false;
int timeout = -1;
for (; f >= 0;) {
while (Running() && f >= 0) {
bool ready = cFile::FileReady(f, timeout);
int ret = ready ? safe_read(f, buf, sizeof(buf)) : -1;
bool ready = cFile::FileReady(f, timeout);
int ret = ready ? safe_read(f, buf, sizeof(buf)) : -1;
if (ready && ret <= 0 ) {
esyslog("ERROR: lircd connection lost");
close(f);
f = -1;
break;
}
if (ready && ret <= 0 ) {
esyslog("ERROR: lircd connection lost");
close(f);
f = -1;
break;
}
if (ready && ret > 21) {
int count;
char KeyName[LIRC_KEY_BUF];
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!
if (count == 0) {
if (strcmp(KeyName, LastKeyName) == 0 && FirstTime.Elapsed() < KEYPRESSDELAY)
continue; // skip keys coming in too fast
if (repeat)
Put(LastKeyName, false, true);
strcpy(LastKeyName, KeyName);
repeat = false;
FirstTime.Set();
timeout = -1;
}
else {
if (FirstTime.Elapsed() < REPEATDELAY)
continue; // repeat function kicks in after a short delay
repeat = true;
timeout = REPEATDELAY;
}
LastTime.Set();
Put(KeyName, repeat);
}
else if (repeat) { // the last one was a repeat, so let's generate a release
if (LastTime.Elapsed() >= REPEATDELAY) {
Put(LastKeyName, false, true);
repeat = false;
*LastKeyName = 0;
timeout = -1;
}
}
}
if (ready && ret > 21) {
int count;
char KeyName[LIRC_KEY_BUF];
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!
if (count == 0) {
if (strcmp(KeyName, LastKeyName) == 0 &&