summaryrefslogtreecommitdiff
path: root/ci.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-06-12 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-06-12 18:00:00 +0200
commita616d4b8597cfb69af7a8f0e0a96da2143970ffe (patch)
treee6c64553b643803984d2d093cbbd01ff45dd3be8 /ci.c
parentf8367110245149a1333e47118c41827288c814c3 (diff)
downloadvdr-patch-lnbsharing-a616d4b8597cfb69af7a8f0e0a96da2143970ffe.tar.gz
vdr-patch-lnbsharing-a616d4b8597cfb69af7a8f0e0a96da2143970ffe.tar.bz2
Version 1.3.26vdr-1.3.26
- Updated the Estonian OSD texts (thanks to Arthur Konovalov). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Fixed handling 'summary.vdr' files with more than two empty lines (thanks to Christian Jacobsen for reporting this one). - Improved resetting CAM connections (thanks to Marco Schlüßler). - Implemented cVideoRepacker in remux.c to make sure every PES packet contains only data from one frame (thanks to Reinhard Nissl). NOTE: currently this doesn't work with MPEG1, so if you use MPEG1 you may want to change line 1158 in remux.c to ts2pes[numTracks++] = new cTS2PES(VPid, resultBuffer, IPACKS); as it was before. - EPG events without a title now display "No title" instead of "(null)" (thanks to Rolf Ahrenberg). - A device can now detach all receivers for a given PID, as is necessary, e.g., for the bitstreamout plugin (thanks to Werner Fink). - Added the year (two digits) to recording dates in LSTR, and thus also in menus (suggested by Jan Ekholm). - Fixed the call to Channels.Unlock() in cEITScanner::Process() (thanks to Reinhard Nissl). - Fixed handling timers with a day given as MTWTF--@6, i.e. a repeating timer with first day not as full date, but just day of month (thanks to Henrik Niehaus for reporting this one). - Removed an unnecessary #include from osd.c (thanks to Wolfgang Rohdewald). - Fixed dropping EPG events that have a zero start time or duration, in case it's an NVOD event (thanks to Chris Warren). - Fixed handling page up/down in menu lists in case there are several non selectable items in a row (thanks to Udo Richter for reporting this one). - Added cOsdMenu::SetCols() to allow adjusting the menu columns. - Modified cEITScanner::Process() so that it works on systems with only budget cards or a mix of DVB-S, DVB-C or DVB-T cards.
Diffstat (limited to 'ci.c')
-rw-r--r--ci.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/ci.c b/ci.c
index ac232b9..ff5203a 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 1.23 2004/07/17 14:30:17 kls Exp $
+ * $Id: ci.c 1.24 2005/06/04 11:57:05 kls Exp $
*/
#include "ci.h"
@@ -287,6 +287,7 @@ public:
int RecvData(void);
const uint8_t *Data(int &Length);
//XXX Close()
+ void Reset(void);
};
cCiTransportConnection::cCiTransportConnection(void)
@@ -428,6 +429,11 @@ int cCiTransportConnection::Poll(void)
return ERROR;
}
+void cCiTransportConnection::Reset(void)
+{
+ Init(-1, 0, 0);
+}
+
// --- cCiTransportLayer -----------------------------------------------------
#define MAX_CI_CONNECT 16 // maximum possible value is 254
@@ -440,7 +446,7 @@ private:
public:
cCiTransportLayer(int Fd, int NumSlots);
cCiTransportConnection *NewConnection(int Slot);
- bool ResetSlot(int Slot);
+ bool ResetSlot(int Slot, bool Wait = false);
bool ModuleReady(int Slot);
cCiTransportConnection *Process(int Slot);
};
@@ -451,6 +457,7 @@ cCiTransportLayer::cCiTransportLayer(int Fd, int NumSlots)
numSlots = NumSlots;
for (int s = 0; s < numSlots; s++)
ResetSlot(s);
+ cCondWait::SleepMs(2000);
}
cCiTransportConnection *cCiTransportLayer::NewConnection(int Slot)
@@ -467,10 +474,16 @@ cCiTransportConnection *cCiTransportLayer::NewConnection(int Slot)
return NULL;
}
-bool cCiTransportLayer::ResetSlot(int Slot)
+bool cCiTransportLayer::ResetSlot(int Slot, bool Wait)
{
+ for (int i = 0; i < MAX_CI_CONNECT; i++) {
+ if (tc[i].State() != stIDLE && tc[i].Slot() == Slot)
+ tc[i].Reset();
+ }
dbgprotocol("Resetting slot %d...", Slot);
if (ioctl(fd, CA_RESET, 1 << Slot) != -1) {
+ if (Wait)
+ cCondWait::SleepMs(2000);
dbgprotocol("ok.\n");
return true;
}
@@ -1602,5 +1615,5 @@ bool cCiHandler::Reset(int Slot)
{
cMutexLock MutexLock(&mutex);
CloseAllSessions(Slot);
- return tpl->ResetSlot(Slot);
+ return tpl->ResetSlot(Slot, true);
}