diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-04-21 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-04-21 18:00:00 +0200 |
commit | cfac68ee8458c6b51e638dd787d931bd5baad57a (patch) | |
tree | 20e5840f818a567a675b099272f42e6c7d51d751 /dvbapi.c | |
parent | c9a5d8ea5328e4a8bcb0c3423b825c02cb0c3b27 (diff) | |
download | vdr-patch-lnbsharing-cfac68ee8458c6b51e638dd787d931bd5baad57a.tar.gz vdr-patch-lnbsharing-cfac68ee8458c6b51e638dd787d931bd5baad57a.tar.bz2 |
Version 1.0.1vdr-1.0.1
- Added some DVB-T channels for Berlin (Germany) to channels.conf.terr (thanks to
Andreas Roedl).
- Implemented enhanced string editing with upper-/lowercase, insert/overwrite
and delete (thanks to Sergei Haller).
- Fixed color palette handling on "big endian" systems (thanks to Jean Martin
for pointing out this one).
- Updated the "Blue Movie" channels to the new "Premiere Erotik" (thanks to
Thilo Wunderlich). NOTE: this adds a new channel to 'channels.conf', so that
any timers referencing a channel with a number higher than 102 should be
checked and adapted if necessary (this only applies if you are using the default
'channels.conf').
- Improved thread locking in the ring buffer to avoid possible race conditions
under heavy load (thanks to Werner Fink).
- Fixed a crash when selecting the "Jump" function directly after setting an
editing mark (thanks to Steffen Koch for reporting and Stefan Huelswitt for
fixing this one).
- Fixed some missing ',' in i18n.c (thanks to Matthias Hilbig).
- Fixed a possible endless loop in shifting recordings between DVB cards (thanks
to Stefan Huelswitt for reporting this one).
- Updated the Premiere World Formula 1 channels in 'channels.conf' (thanks to Mel
Schächner).
- No longer setting PIDs 0x1FFF, which apparently fixes problems with CAMs and
AC3 sound only working the first time (thanks to Stefan Huelswitt).
- Now encoding '.' at the end of a directory name in case of VFAT=1, since Windows
can't handle these (thanks to Simon Dean for reporting this one).
Diffstat (limited to 'dvbapi.c')
-rw-r--r-- | dvbapi.c | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbapi.c 1.170 2002/04/07 09:35:51 kls Exp $ + * $Id: dvbapi.c 1.173 2002/04/21 11:55:48 kls Exp $ */ #include "dvbapi.h" @@ -533,6 +533,8 @@ void cRecordBuffer::Input(void) int w = Put(p, r); p += w; r -= w; + if (r > 0) + usleep(1); // this keeps the CPU load low } t = time(NULL); } @@ -1810,21 +1812,24 @@ bool cDvbApi::SetPrimaryDvbApi(int n) return false; } -int cDvbApi::CanShift(int Ca, int Priority) +int cDvbApi::CanShift(int Ca, int Priority, int UsedCards) { // Test whether a recording on this DVB device can be shifted to another one // in order to perform a new recording with the given Ca and Priority on this device: int ShiftLevel = -1; // default means this device can't be shifted + if (UsedCards & (1 << CardIndex()) != 0) + return ShiftLevel; // otherwise we would get into a loop if (Recording()) { if (ProvidesCa(Ca) // this device provides the requested Ca && (Ca != this->Ca() // the requested Ca is different from the one currently used... || Priority > this->Priority())) { // ...or the request comes from a higher priority cDvbApi *d = NULL; int Provides[MAXDVBAPI]; + UsedCards |= (1 << CardIndex()); for (int i = 0; i < NumDvbApis; i++) { if ((Provides[i] = dvbApi[i]->ProvidesCa(this->Ca())) != 0) { // this device is basicly able to do the job if (dvbApi[i] != this) { // it is not _this_ device - int sl = dvbApi[i]->CanShift(this->Ca(), Priority); // this is the original Priority! + int sl = dvbApi[i]->CanShift(this->Ca(), Priority, UsedCards); // this is the original Priority! if (sl >= 0 && (ShiftLevel < 0 || sl < ShiftLevel)) { d = dvbApi[i]; ShiftLevel = sl; @@ -2301,16 +2306,17 @@ bool cDvbApi::SetPid(int fd, dmxPesType_t PesType, int Pid, dmxOutput_t Output) { if (Pid) { CHECK(ioctl(fd, DMX_STOP)); - dmxPesFilterParams pesFilterParams; - pesFilterParams.pid = Pid; - pesFilterParams.input = DMX_IN_FRONTEND; - pesFilterParams.output = Output; - pesFilterParams.pesType = PesType; - pesFilterParams.flags = DMX_IMMEDIATE_START; - if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) { - if (Pid != 0x1FFF) + if (Pid != 0x1FFF) { + dmxPesFilterParams pesFilterParams; + pesFilterParams.pid = Pid; + pesFilterParams.input = DMX_IN_FRONTEND; + pesFilterParams.output = Output; + pesFilterParams.pesType = PesType; + pesFilterParams.flags = DMX_IMMEDIATE_START; + if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) { LOG_ERROR; - return false; + return false; + } } } return true; |