mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.1.25
- Fixed high CPU load during replay (thanks to Marcel Wiesweg for pointing out this one). - Fixed margin handling in cRingBufferLinear. - Now polling the output device in 'Transfer Mode' and retrying to put packets into the ring buffer. - Resetting the CAM slot in case communication breaks down. - Improved keyboard detection (thanks to Werner Fink). - Updated 'channels.conf.terr' (thanks to Andy Carter). - Fixed broken support for raw OSDs of plugins (thanks to Marcel Wiesweg for reporting this one). - Broken CAM connections are now restored automatically.
This commit is contained in:
parent
b09aaa00a5
commit
b6e4637356
@ -217,6 +217,7 @@ Werner Fink <werner@suse.de>
|
|||||||
contains Dolby Digital data
|
contains Dolby Digital data
|
||||||
for improving thread locking in the ring buffer to avoid possible race conditions
|
for improving thread locking in the ring buffer to avoid possible race conditions
|
||||||
under heavy load
|
under heavy load
|
||||||
|
for improving keyboard detection
|
||||||
|
|
||||||
Rolf Hakenes <hakenes@hippomi.de>
|
Rolf Hakenes <hakenes@hippomi.de>
|
||||||
for providing 'libdtv' and adapting the EIT mechanisms to it
|
for providing 'libdtv' and adapting the EIT mechanisms to it
|
||||||
@ -539,3 +540,7 @@ Teemu Rantanen <tvr@iki.fi>
|
|||||||
|
|
||||||
Jan Ekholm <chakie@infa.abo.fi>
|
Jan Ekholm <chakie@infa.abo.fi>
|
||||||
for adding/improving some Swedish language OSD texts
|
for adding/improving some Swedish language OSD texts
|
||||||
|
|
||||||
|
Marcel Wiesweg <marcel.wiesweg@gmx.de>
|
||||||
|
for pointing out a problem with high CPU load during replay
|
||||||
|
for reporting broken support for raw OSDs of plugins
|
||||||
|
14
HISTORY
14
HISTORY
@ -1956,3 +1956,17 @@ Video Disk Recorder Revision History
|
|||||||
- Turning SI filtering off and on when switching channels.
|
- Turning SI filtering off and on when switching channels.
|
||||||
- Timers are now processed even if an OSD menu is open (except for menus that
|
- Timers are now processed even if an OSD menu is open (except for menus that
|
||||||
explicitly handle timers).
|
explicitly handle timers).
|
||||||
|
|
||||||
|
2003-02-16: Version 1.1.25
|
||||||
|
|
||||||
|
- Fixed high CPU load during replay (thanks Marcel Wiesweg for pointing out this
|
||||||
|
one).
|
||||||
|
- Fixed margin handling in cRingBufferLinear.
|
||||||
|
- Now polling the output device in 'Transfer Mode' and retrying to put packets
|
||||||
|
into the ring buffer.
|
||||||
|
- Resetting the CAM slot in case communication breaks down.
|
||||||
|
- Improved keyboard detection (thanks to Werner Fink).
|
||||||
|
- Updated 'channels.conf.terr' (thanks to Andy Carter).
|
||||||
|
- Fixed broken support for raw OSDs of plugins (thanks to Marcel Wiesweg for
|
||||||
|
reporting this one).
|
||||||
|
- Broken CAM connections are now restored automatically.
|
||||||
|
@ -1,43 +1,50 @@
|
|||||||
: UK channels for Crystal Palace, London
|
: UK channels for Crystal Palace, London
|
||||||
BBC ONE (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:600:601,602:602:0:4164:0:0:0
|
|
||||||
BBC TWO (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:610:611,612:0:2:4228:0:0:0
|
|
||||||
BBC THREE (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:620:621,622:0:0:4351:0:0:0
|
|
||||||
BBC NEWS 24 (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:640:641:0:0:4415:0:0:0
|
|
||||||
Ch 14 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:2840:2841,2843:0:0:8800:0:0:0
|
|
||||||
ITV 2 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:2818:2819,2821:0:0:8325:0:0:0
|
|
||||||
ITV 1 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:512:650,660:0:0:8261:0:0:0
|
|
||||||
Channel 4 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:2827:2828,2830:0:0:8384:0:0:0
|
|
||||||
five (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6017:6018,6019:0:0:12866:0:0:0
|
|
||||||
QVC (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6049:6050:0:0:13120:0:0:0
|
|
||||||
TV Travel Shop (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6161:6162:0:0:13632:0:0:0
|
|
||||||
ITV News (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6193:6194:0:0:13760:0:0:0
|
|
||||||
BBC PARLMNT (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:403:0:0:16768:0:0:0
|
|
||||||
BBC FOUR (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:201:401,402:0:0:16832:0:0:0
|
|
||||||
BBC R5 Live (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:430:0:0:17920:0:0:0
|
|
||||||
BBC 5L SportsX (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:431:0:0:17984:0:0:0
|
|
||||||
BBC 6 Music (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:432:0:0:18048:0:0:0
|
|
||||||
BBC 7 (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:433:0:0:18112:0:0:0
|
|
||||||
1Xtra BBC (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:434:0:0:18176:0:0:0
|
|
||||||
BBC Asian Net. (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:435:0:0:18240:0:0:0
|
|
||||||
701 (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:203:407:0:0:19456:0:0:0
|
701 (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:203:407:0:0:19456:0:0:0
|
||||||
702 (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:204:411:0:0:19520:0:0:0
|
702 (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:204:411,412:0:0:19520:0:0:0
|
||||||
|
BBC FOUR (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:201:401,402:0:0:16832:0:0:0
|
||||||
|
BBC NEWS 24 (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:640:641:0:0:4415:0:0:0
|
||||||
|
BBC ONE (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:600:601,602:0:0:4164:0:0:0
|
||||||
|
BBC THREE (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:620:621,622:0:0:4351:0:0:0
|
||||||
|
BBC TWO (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:610:611,612:0:2:4228:0:0:0
|
||||||
|
bid-up.tv (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6273:6274:0:0:14272:0:0:0
|
||||||
|
CBBC (TV):505833:I0C34D0M16B8T2G32Y0:T:27500:620:621,622:0:0:4671:0:0:0
|
||||||
|
Cbeebies (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:201:401,402:0:0:16960:0:0:0
|
||||||
|
Ch 14 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:2840:2841:2843:0:0:8800:0:0
|
||||||
|
Ch 32 (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:501:502,504:0:0:25984:0:0:0
|
||||||
|
Ch 44 (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:501:502,504:0:0:26048:0:0:0
|
||||||
|
Channel 4 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:2827:2828,2830:0:0:8384:0:0:0
|
||||||
|
f tn (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:301:302,304:0:0:25856:0:0:0
|
||||||
|
five (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6017:6018,6019:0:0:12866:0:0:0
|
||||||
|
ITV 1 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:512:650,660:0:0:8261:0:0:0
|
||||||
|
ITV 2 (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:2818:2819,2821:0:0:8325:0:0:0
|
||||||
|
ITV News (TV):481833:I0C23D0M64B8T2G32Y0:T:27500:2850:2851:0:0:8581:0:0:0
|
||||||
|
QVC (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6049:6050:0:0:13120:0:0:0
|
||||||
Sky News (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:101:102,104:0:0:22080:0:0:0
|
Sky News (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:101:102,104:0:0:22080:0:0:0
|
||||||
Sky Spts News (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:201:202,204:0:0:22144:0:0:0
|
Sky Spts News (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:201:202,204:0:0:22144:0:0:0
|
||||||
Sky Travel (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:301:302,304:0:0:22208:0:0:0
|
Sky Travel (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:301:302,304:0:0:22208:0:0:0
|
||||||
UKHistory (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:401:402,404:0:0:22272:0:0:0
|
|
||||||
THE HITS (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:101:102:0:0:25664:0:0:0
|
THE HITS (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:101:102:0:0:25664:0:0:0
|
||||||
TMF (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:201:202,204:0:0:25728:0:0:0
|
TMF (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:201:202,204:0:0:25728:0:0:0
|
||||||
UKHomeStyle (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:301:302,306:0:0:25792:0:0:0
|
TV Travel Shop (TV):561833:I0C23D0M64B8T2G32Y0:T:27500:6161:6162:0:0:13632:0:0:0
|
||||||
f tn (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:301:302,304:0:0:25856:0:0:0
|
UKBrightIdeas (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:301:302,304:0:0:25792:0:0:0
|
||||||
Ch 44 (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:501:502,504:0:0:26048:0:0:0
|
UKHistory (TV):578166:I0C34D0M16B8T2G32Y0:T:27500:401:402,404:0:0:22272:0:0:0
|
||||||
Smash Hits! (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1201:0:0:26240:0:0:0
|
1Xtra BBC (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:434:0:0:18176:0:0:0
|
||||||
KISS (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1101:0:0:26176:0:0:0
|
BBC 5L SportsX (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:431:0:0:17984:0:0:0
|
||||||
Kerrang! (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1301:0:0:26304:0:0:0
|
BBC 6 Music (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:432:0:0:18048:0:0:0
|
||||||
jazz fm (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1401:0:0:26368:0:0:0
|
BBC 7 (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:433:0:0:18112:0:0:0
|
||||||
oneword (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1501:0:0:26432:0:0:0
|
BBC Asian Net. (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:435:0:0:18240:0:0:0
|
||||||
|
BBC PARLMNT (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:403:0:0:16768:0:0:0
|
||||||
|
BBC R5 Live (RADIO):529833:I0C34D0M16B8T2G32Y0:T:27500:0:430:0:0:17920:0:0:0
|
||||||
|
BBC Radio 1 (RADIO):561833:I0C23D0M64B8T2G32Y0:T:27500:0:6210:0:0:14336:0:0:0
|
||||||
|
BBC Radio 2 (RADIO):561833:I0C23D0M64B8T2G32Y0:T:27500:0:6226:0:0:14400:0:0:0
|
||||||
|
BBC Radio 3 (RADIO):561833:I0C23D0M64B8T2G32Y0:T:27500:0:6242:0:0:14464:0:0:0
|
||||||
|
BBC Radio 4 (RADIO):561833:I0C23D0M64B8T2G32Y0:T:27500:0:6258:0:0:14528:0:0:0
|
||||||
BBC World Sv (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1601:0:0:26496:0:0:0
|
BBC World Sv (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1601:0:0:26496:0:0:0
|
||||||
Ch 22 (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:501:502,504:0:0:26048:0:0:1
|
Ch 15 (RADIO):561833:I0C23D0M64B8T2G32Y0:T:27500:0:660:0:0:14208:0:0:0
|
||||||
Ch 32 (TV):537833:I0C34D0M16B8T2G32Y0:T:27500:501:502,504:0:0:25984:0:0:0
|
jazz fm (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1401:0:0:26368:0:0:0
|
||||||
|
Kerrang! (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1301:0:0:26304:0:0:0
|
||||||
|
KISS (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1101:0:0:26176:0:0:0
|
||||||
|
oneword (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1501:0:0:26432:0:0:0
|
||||||
|
Smash Hits! (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1201:0:0:26240:0:0:0
|
||||||
: DVB-T Berlin Germany
|
: DVB-T Berlin Germany
|
||||||
PRO 7:658000:I0C23D0M16B8T8G8Y0:T:27500:305:306;307:0:0:16403:0:0:0
|
PRO 7:658000:I0C23D0M16B8T8G8Y0:T:27500:305:306;307:0:0:16403:0:0:0
|
||||||
SAT 1:658000:I0C23D0M16B8T8G8Y0:T:27500:385:386:0:0:16408:0:0:0
|
SAT 1:658000:I0C23D0M16B8T8G8Y0:T:27500:385:386:0:0:16408:0:0:0
|
||||||
|
20
ci.c
20
ci.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: ci.c 1.5 2003/02/09 14:47:57 kls Exp $
|
* $Id: ci.c 1.7 2003/02/16 11:20:55 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* XXX TODO
|
/* XXX TODO
|
||||||
@ -1423,8 +1423,9 @@ int cCiHandler::CloseAllSessions(int Slot)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cCiHandler::Process(void)
|
bool cCiHandler::Process(void)
|
||||||
{
|
{
|
||||||
|
bool result = true;
|
||||||
cMutexLock MutexLock(&mutex);
|
cMutexLock MutexLock(&mutex);
|
||||||
for (int Slot = 0; Slot < numSlots; Slot++) {
|
for (int Slot = 0; Slot < numSlots; Slot++) {
|
||||||
tc = tpl->Process(Slot);
|
tc = tpl->Process(Slot);
|
||||||
@ -1453,19 +1454,20 @@ void cCiHandler::Process(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (CloseAllSessions(Slot)) {
|
||||||
if (!CloseAllSessions(Slot)) {
|
tpl->ResetSlot(Slot);
|
||||||
if (tpl->ModuleReady(Slot)) {
|
result = false;
|
||||||
dbgprotocol("Module ready in slot %d\n", Slot);
|
}
|
||||||
tpl->NewConnection(Slot);
|
else if (tpl->ModuleReady(Slot)) {
|
||||||
}
|
dbgprotocol("Module ready in slot %d\n", Slot);
|
||||||
}
|
tpl->NewConnection(Slot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < MAX_CI_SESSION; i++) {
|
for (int i = 0; i < MAX_CI_SESSION; i++) {
|
||||||
if (sessions[i])
|
if (sessions[i])
|
||||||
sessions[i]->Process();
|
sessions[i]->Process();
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cCiHandler::EnterMenu(int Slot)
|
bool cCiHandler::EnterMenu(int Slot)
|
||||||
|
4
ci.h
4
ci.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: ci.h 1.2 2003/02/09 11:44:00 kls Exp $
|
* $Id: ci.h 1.3 2003/02/16 10:55:21 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CI_H
|
#ifndef __CI_H
|
||||||
@ -95,7 +95,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
~cCiHandler();
|
~cCiHandler();
|
||||||
static cCiHandler *CreateCiHandler(const char *FileName);
|
static cCiHandler *CreateCiHandler(const char *FileName);
|
||||||
void Process(void);
|
bool Process(void);
|
||||||
bool EnterMenu(int Slot);
|
bool EnterMenu(int Slot);
|
||||||
cCiMenu *GetMenu(void);
|
cCiMenu *GetMenu(void);
|
||||||
cCiEnquiry *GetEnquiry(void);
|
cCiEnquiry *GetEnquiry(void);
|
||||||
|
4
config.h
4
config.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.h 1.148 2003/02/08 10:25:44 kls Exp $
|
* $Id: config.h 1.149 2003/02/15 11:01:04 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
@ -19,7 +19,7 @@
|
|||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
#define VDRVERSION "1.1.24"
|
#define VDRVERSION "1.1.25"
|
||||||
|
|
||||||
#define MAXPRIORITY 99
|
#define MAXPRIORITY 99
|
||||||
#define MAXLIFETIME 99
|
#define MAXLIFETIME 99
|
||||||
|
74
dvbdevice.c
74
dvbdevice.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbdevice.c 1.44 2003/02/09 12:41:14 kls Exp $
|
* $Id: dvbdevice.c 1.46 2003/02/16 15:10:39 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -65,7 +65,7 @@ static int DvbOpen(const char *Name, int n, int Mode, bool ReportError = false)
|
|||||||
|
|
||||||
class cDvbTuner : public cThread {
|
class cDvbTuner : public cThread {
|
||||||
private:
|
private:
|
||||||
enum eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked };
|
enum eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked, tsCam };
|
||||||
int fd_frontend;
|
int fd_frontend;
|
||||||
int cardIndex;
|
int cardIndex;
|
||||||
fe_type_t frontendType;
|
fe_type_t frontendType;
|
||||||
@ -73,8 +73,8 @@ private:
|
|||||||
cChannel channel;
|
cChannel channel;
|
||||||
const char *diseqcCommands;
|
const char *diseqcCommands;
|
||||||
bool active;
|
bool active;
|
||||||
|
time_t startTime;
|
||||||
eTunerStatus tunerStatus;
|
eTunerStatus tunerStatus;
|
||||||
bool caSet;
|
|
||||||
cMutex mutex;
|
cMutex mutex;
|
||||||
cCondVar newSet;
|
cCondVar newSet;
|
||||||
bool SetFrontend(void);
|
bool SetFrontend(void);
|
||||||
@ -96,7 +96,7 @@ cDvbTuner::cDvbTuner(int Fd_Frontend, int CardIndex, fe_type_t FrontendType, cCi
|
|||||||
diseqcCommands = NULL;
|
diseqcCommands = NULL;
|
||||||
active = false;
|
active = false;
|
||||||
tunerStatus = tsIdle;
|
tunerStatus = tsIdle;
|
||||||
caSet = false;
|
startTime = time(NULL);
|
||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,10 @@ void cDvbTuner::Set(const cChannel *Channel, bool Tune)
|
|||||||
channel = *Channel;
|
channel = *Channel;
|
||||||
if (Tune)
|
if (Tune)
|
||||||
tunerStatus = tsSet;
|
tunerStatus = tsSet;
|
||||||
caSet = false;
|
else if (tunerStatus == tsCam)
|
||||||
|
tunerStatus = tsTuned;
|
||||||
|
if (Channel->Ca())
|
||||||
|
startTime = time(NULL);
|
||||||
newSet.Broadcast();
|
newSet.Broadcast();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +241,6 @@ bool cDvbTuner::SetFrontend(void)
|
|||||||
|
|
||||||
void cDvbTuner::Action(void)
|
void cDvbTuner::Action(void)
|
||||||
{
|
{
|
||||||
time_t StartTime = time(NULL);
|
|
||||||
dsyslog("tuner thread started on device %d (pid=%d)", cardIndex + 1, getpid());
|
dsyslog("tuner thread started on device %d (pid=%d)", cardIndex + 1, getpid());
|
||||||
active = true;
|
active = true;
|
||||||
while (active) {
|
while (active) {
|
||||||
@ -251,36 +253,46 @@ void cDvbTuner::Action(void)
|
|||||||
if (status & FE_HAS_LOCK)
|
if (status & FE_HAS_LOCK)
|
||||||
tunerStatus = tsLocked;
|
tunerStatus = tsLocked;
|
||||||
}
|
}
|
||||||
dvb_frontend_event event;
|
if (tunerStatus != tsIdle) {
|
||||||
if (ioctl(fd_frontend, FE_GET_EVENT, &event) == 0) {
|
dvb_frontend_event event;
|
||||||
if (tunerStatus != tsIdle && event.status & FE_REINIT) {
|
if (ioctl(fd_frontend, FE_GET_EVENT, &event) == 0) {
|
||||||
tunerStatus = tsSet;
|
if (event.status & FE_REINIT) {
|
||||||
esyslog("ERROR: frontend %d was reinitialized - re-tuning", cardIndex);
|
tunerStatus = tsSet;
|
||||||
continue;
|
esyslog("ERROR: frontend %d was reinitialized - re-tuning", cardIndex);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (tunerStatus >= tsLocked) {
|
||||||
if (ciHandler) {
|
if (ciHandler) {
|
||||||
ciHandler->Process();
|
if (ciHandler->Process()) {
|
||||||
if (!caSet) {//XXX TODO update in case the CA descriptors have changed
|
if (tunerStatus != tsCam) {//XXX TODO update in case the CA descriptors have changed
|
||||||
uchar buffer[2048];
|
uchar buffer[2048];
|
||||||
int length = cSIProcessor::GetCaDescriptors(channel.Source(), channel.Frequency(), channel.Sid(), sizeof(buffer), buffer);
|
int length = cSIProcessor::GetCaDescriptors(channel.Source(), channel.Frequency(), channel.Sid(), sizeof(buffer), buffer);
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
cCiCaPmt CaPmt(channel.Sid());
|
cCiCaPmt CaPmt(channel.Sid());
|
||||||
CaPmt.AddCaDescriptor(length, buffer);
|
CaPmt.AddCaDescriptor(length, buffer);
|
||||||
if (channel.Vpid())
|
if (channel.Vpid())
|
||||||
CaPmt.AddPid(channel.Vpid());
|
CaPmt.AddPid(channel.Vpid());
|
||||||
if (channel.Apid1())
|
if (channel.Apid1())
|
||||||
CaPmt.AddPid(channel.Apid1());
|
CaPmt.AddPid(channel.Apid1());
|
||||||
if (channel.Apid2())
|
if (channel.Apid2())
|
||||||
CaPmt.AddPid(channel.Apid2());
|
CaPmt.AddPid(channel.Apid2());
|
||||||
if (channel.Dpid1())
|
if (channel.Dpid1())
|
||||||
CaPmt.AddPid(channel.Dpid1());
|
CaPmt.AddPid(channel.Dpid1());
|
||||||
caSet = ciHandler->SetCaPmt(CaPmt);
|
if (ciHandler->SetCaPmt(CaPmt)) {
|
||||||
|
tunerStatus = tsCam;
|
||||||
|
startTime = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tunerStatus = tsLocked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// in the beginning we loop more often to let the CAM connection start up fast
|
// in the beginning we loop more often to let the CAM connection start up fast
|
||||||
newSet.TimedWait(mutex, (ciHandler && (time(NULL) - StartTime < 20)) ? 100 : 1000);
|
newSet.TimedWait(mutex, (ciHandler && (time(NULL) - startTime < 20)) ? 100 : 1000);
|
||||||
}
|
}
|
||||||
dsyslog("tuner thread ended on device %d (pid=%d)", cardIndex + 1, getpid());
|
dsyslog("tuner thread ended on device %d (pid=%d)", cardIndex + 1, getpid());
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbplayer.c 1.17 2003/01/19 15:43:58 kls Exp $
|
* $Id: dvbplayer.c 1.18 2003/02/15 10:38:59 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbplayer.h"
|
#include "dvbplayer.h"
|
||||||
@ -420,8 +420,6 @@ void cDvbPlayer::Action(void)
|
|||||||
running = true;
|
running = true;
|
||||||
while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available())) {
|
while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available())) {
|
||||||
cPoller Poller;
|
cPoller Poller;
|
||||||
if (!readFrame)
|
|
||||||
Poller.Add(replayFile, false);
|
|
||||||
if (DevicePoll(Poller, 100)) {
|
if (DevicePoll(Poller, 100)) {
|
||||||
|
|
||||||
LOCK_THREAD;
|
LOCK_THREAD;
|
||||||
@ -532,7 +530,7 @@ void cDvbPlayer::Action(void)
|
|||||||
backTrace->Add(playFrame->Index(), playFrame->Count());
|
backTrace->Add(playFrame->Index(), playFrame->Count());
|
||||||
ringBuffer->Drop(playFrame);
|
ringBuffer->Drop(playFrame);
|
||||||
playFrame = NULL;
|
playFrame = NULL;
|
||||||
p = 0;
|
p = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
15
ringbuffer.c
15
ringbuffer.c
@ -7,7 +7,7 @@
|
|||||||
* Parts of this file were inspired by the 'ringbuffy.c' from the
|
* Parts of this file were inspired by the 'ringbuffy.c' from the
|
||||||
* LinuxDVB driver (see linuxtv.org).
|
* LinuxDVB driver (see linuxtv.org).
|
||||||
*
|
*
|
||||||
* $Id: ringbuffer.c 1.13 2003/01/26 19:47:10 kls Exp $
|
* $Id: ringbuffer.c 1.14 2003/02/15 13:21:50 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ringbuffer.h"
|
#include "ringbuffer.h"
|
||||||
@ -34,14 +34,14 @@ cRingBuffer::~cRingBuffer()
|
|||||||
void cRingBuffer::WaitForPut(void)
|
void cRingBuffer::WaitForPut(void)
|
||||||
{
|
{
|
||||||
putMutex.Lock();
|
putMutex.Lock();
|
||||||
readyForPut.Wait(putMutex);
|
readyForPut.TimedWait(putMutex, 1000);
|
||||||
putMutex.Unlock();
|
putMutex.Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRingBuffer::WaitForGet(void)
|
void cRingBuffer::WaitForGet(void)
|
||||||
{
|
{
|
||||||
getMutex.Lock();
|
getMutex.Lock();
|
||||||
readyForGet.Wait(getMutex);
|
readyForGet.TimedWait(getMutex, 10);
|
||||||
getMutex.Unlock();
|
getMutex.Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ int cRingBufferLinear::Put(const uchar *Data, int Count)
|
|||||||
Lock();
|
Lock();
|
||||||
int rest = Size() - head;
|
int rest = Size() - head;
|
||||||
int diff = tail - head;
|
int diff = tail - head;
|
||||||
int free = (diff > 0) ? diff - 1 : Size() + diff - (tail < margin ? -(margin - tail) : margin) - 1;
|
int free = ((tail < margin) ? rest : (diff > 0) ? diff : Size() + diff - margin) - 1;
|
||||||
if (statistics) {
|
if (statistics) {
|
||||||
int fill = Size() - free - 1 + Count;
|
int fill = Size() - free - 1 + Count;
|
||||||
if (fill >= Size())
|
if (fill >= Size())
|
||||||
@ -136,6 +136,8 @@ int cRingBufferLinear::Put(const uchar *Data, int Count)
|
|||||||
Count = 0;
|
Count = 0;
|
||||||
Unlock();
|
Unlock();
|
||||||
EnableGet();
|
EnableGet();
|
||||||
|
if (Count == 0)
|
||||||
|
WaitForPut();
|
||||||
}
|
}
|
||||||
return Count;
|
return Count;
|
||||||
}
|
}
|
||||||
@ -147,7 +149,7 @@ const uchar *cRingBufferLinear::Get(int &Count)
|
|||||||
if (getThreadPid < 0)
|
if (getThreadPid < 0)
|
||||||
getThreadPid = getpid();
|
getThreadPid = getpid();
|
||||||
int rest = Size() - tail;
|
int rest = Size() - tail;
|
||||||
if (tail > Size() - margin && head < tail) {
|
if (rest < margin && head < tail) {
|
||||||
int t = margin - rest;
|
int t = margin - rest;
|
||||||
memcpy(buffer + t, buffer + tail, rest);
|
memcpy(buffer + t, buffer + tail, rest);
|
||||||
tail = t;
|
tail = t;
|
||||||
@ -169,10 +171,13 @@ const uchar *cRingBufferLinear::Get(int &Count)
|
|||||||
void cRingBufferLinear::Del(int Count)
|
void cRingBufferLinear::Del(int Count)
|
||||||
{
|
{
|
||||||
if (Count > 0 && Count <= lastGet) {
|
if (Count > 0 && Count <= lastGet) {
|
||||||
|
Lock();
|
||||||
tail += Count;
|
tail += Count;
|
||||||
lastGet -= Count;
|
lastGet -= Count;
|
||||||
if (tail >= Size())
|
if (tail >= Size())
|
||||||
tail = margin;
|
tail = margin;
|
||||||
|
Unlock();
|
||||||
|
EnablePut();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
esyslog("ERROR: invalid Count in cRingBufferLinear::Del: %d", Count);
|
esyslog("ERROR: invalid Count in cRingBufferLinear::Del: %d", Count);
|
||||||
|
34
transfer.c
34
transfer.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: transfer.c 1.9 2003/01/26 09:59:35 kls Exp $
|
* $Id: transfer.c 1.10 2003/02/15 14:12:41 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
@ -50,9 +50,16 @@ void cTransfer::Activate(bool On)
|
|||||||
void cTransfer::Receive(uchar *Data, int Length)
|
void cTransfer::Receive(uchar *Data, int Length)
|
||||||
{
|
{
|
||||||
if (IsAttached()) {
|
if (IsAttached()) {
|
||||||
int p = ringBuffer->Put(Data, Length);
|
int i = 0;
|
||||||
if (p != Length && active)
|
while (active && Length > 0) {
|
||||||
esyslog("ERROR: ring buffer overflow (%d bytes dropped)", Length - p);
|
if (i++ > 10) {
|
||||||
|
esyslog("ERROR: ring buffer overflow (%d bytes dropped)", Length);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
int p = ringBuffer->Put(Data, Length);
|
||||||
|
Length -= p;
|
||||||
|
Data += p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,14 +97,17 @@ void cTransfer::Action(void)
|
|||||||
if (p) {
|
if (p) {
|
||||||
StripAudioPackets(p, Result, audioTrack);
|
StripAudioPackets(p, Result, audioTrack);
|
||||||
while (Result > 0 && active) {
|
while (Result > 0 && active) {
|
||||||
int w = PlayVideo(p, Result);
|
cPoller Poller;
|
||||||
if (w > 0) {
|
if (DevicePoll(Poller, 100)) {
|
||||||
p += w;
|
int w = PlayVideo(p, Result);
|
||||||
Result -= w;
|
if (w > 0) {
|
||||||
}
|
p += w;
|
||||||
else if (w < 0 && FATALERRNO) {
|
Result -= w;
|
||||||
LOG_ERROR;
|
}
|
||||||
break;
|
else if (w < 0 && FATALERRNO) {
|
||||||
|
LOG_ERROR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
vdr.c
6
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.cadsoft.de/people/kls/vdr
|
* The project's page is at http://www.cadsoft.de/people/kls/vdr
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 1.143 2003/02/09 13:13:42 kls Exp $
|
* $Id: vdr.c 1.145 2003/02/16 10:34:24 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
|||||||
// Save terminal settings:
|
// Save terminal settings:
|
||||||
|
|
||||||
struct termios savedTm;
|
struct termios savedTm;
|
||||||
bool HasStdin = tcgetpgrp(STDIN_FILENO) == getpid() && tcgetattr(STDIN_FILENO, &savedTm) == 0;
|
bool HasStdin = (tcgetpgrp(STDIN_FILENO) == getpid() || getppid() != (pid_t)1) && tcgetattr(STDIN_FILENO, &savedTm) == 0;
|
||||||
|
|
||||||
// Initiate locale:
|
// Initiate locale:
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CAM control:
|
// CAM control:
|
||||||
if (!Interface->IsOpen())
|
if (!Menu && !Interface->IsOpen())
|
||||||
Menu = CamControl();
|
Menu = CamControl();
|
||||||
// User Input:
|
// User Input:
|
||||||
cOsdObject *Interact = Menu ? Menu : cControl::Control();
|
cOsdObject *Interact = Menu ? Menu : cControl::Control();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user