mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed inconsistent behavior in case only certain devices are used (selected by the '-D' option)
This commit is contained in:
parent
e8ae4afd09
commit
c2634a7ccf
4
HISTORY
4
HISTORY
@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History
|
|||||||
Senzel).
|
Senzel).
|
||||||
- Official release.
|
- Official release.
|
||||||
|
|
||||||
2019-05-27: Version 2.4.1
|
2019-05-28: Version 2.4.1
|
||||||
|
|
||||||
- Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported
|
- Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported
|
||||||
by Johann Friedrichs).
|
by Johann Friedrichs).
|
||||||
@ -9412,3 +9412,5 @@ Video Disk Recorder Revision History
|
|||||||
- Increased PLAYERBUFSIZE to (MAXFRAMESIZE * 5) to avoid stuttering replay under heavy
|
- Increased PLAYERBUFSIZE to (MAXFRAMESIZE * 5) to avoid stuttering replay under heavy
|
||||||
system load, and to better document that this buffer size is related to the maximum
|
system load, and to better document that this buffer size is related to the maximum
|
||||||
frame size.
|
frame size.
|
||||||
|
- Fixed inconsistent behavior in case only certain devices are used (selected by the '-D'
|
||||||
|
option).
|
||||||
|
10
ci.c
10
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 4.25 2019/05/06 11:47:42 kls Exp $
|
* $Id: ci.c 4.26 2019/05/28 15:01:29 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ci.h"
|
#include "ci.h"
|
||||||
@ -2233,14 +2233,14 @@ bool cCamSlot::Assign(cDevice *Device, bool Query)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cCamSlot::Devices(cVector<int> &CardIndexes)
|
bool cCamSlot::Devices(cVector<int> &DeviceNumbers)
|
||||||
{
|
{
|
||||||
cMutexLock MutexLock(&mutex);
|
cMutexLock MutexLock(&mutex);
|
||||||
if (mtdHandler)
|
if (mtdHandler)
|
||||||
return mtdHandler->Devices(CardIndexes);
|
return mtdHandler->Devices(DeviceNumbers);
|
||||||
if (assignedDevice)
|
if (assignedDevice)
|
||||||
CardIndexes.Append(assignedDevice->CardIndex());
|
DeviceNumbers.Append(assignedDevice->DeviceNumber());
|
||||||
return CardIndexes.Size() > 0;
|
return DeviceNumbers.Size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cCamSlot::NewConnection(void)
|
void cCamSlot::NewConnection(void)
|
||||||
|
8
ci.h
8
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 4.13 2019/03/19 14:58:00 kls Exp $
|
* $Id: ci.h 4.14 2019/05/28 14:58:08 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CI_H
|
#ifndef __CI_H
|
||||||
@ -331,9 +331,9 @@ public:
|
|||||||
///< class function.
|
///< class function.
|
||||||
cDevice *Device(void) { return assignedDevice; }
|
cDevice *Device(void) { return assignedDevice; }
|
||||||
///< Returns the device this CAM slot is currently assigned to.
|
///< Returns the device this CAM slot is currently assigned to.
|
||||||
bool Devices(cVector<int> &CardIndexes);
|
bool Devices(cVector<int> &DeviceNumbers);
|
||||||
///< Adds the card indexes of any devices that currently use this CAM to
|
///< Adds the numbers of any devices that currently use this CAM to
|
||||||
///< the given CardIndexes. This can be more than one in case of MTD.
|
///< the given DeviceNumbers. This can be more than one in case of MTD.
|
||||||
///< Returns true if the array is not empty.
|
///< Returns true if the array is not empty.
|
||||||
bool WantsTsData(void) const { return caPidReceiver != NULL; }
|
bool WantsTsData(void) const { return caPidReceiver != NULL; }
|
||||||
///< Returns true if this CAM slot wants to receive the TS data through
|
///< Returns true if this CAM slot wants to receive the TS data through
|
||||||
|
32
device.c
32
device.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: device.c 4.29 2019/05/06 13:10:36 kls Exp $
|
* $Id: device.c 4.30 2019/05/28 14:50:11 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -75,9 +75,9 @@ cDevice::cDevice(void)
|
|||||||
:patPmtParser(true)
|
:patPmtParser(true)
|
||||||
{
|
{
|
||||||
cardIndex = nextCardIndex++;
|
cardIndex = nextCardIndex++;
|
||||||
dsyslog("new device number %d", CardIndex() + 1);
|
dsyslog("new device number %d (card index %d)", numDevices + 1, CardIndex() + 1);
|
||||||
|
|
||||||
SetDescription("device %d receiver", CardIndex() + 1);
|
SetDescription("device %d receiver", numDevices + 1);
|
||||||
|
|
||||||
mute = false;
|
mute = false;
|
||||||
volume = Setup.CurrentVolume;
|
volume = Setup.CurrentVolume;
|
||||||
@ -230,11 +230,11 @@ static int GetClippedNumProvidedSystems(int AvailableBits, cDevice *Device)
|
|||||||
int MaxNumProvidedSystems = (1 << AvailableBits) - 1;
|
int MaxNumProvidedSystems = (1 << AvailableBits) - 1;
|
||||||
int NumProvidedSystems = Device->NumProvidedSystems();
|
int NumProvidedSystems = Device->NumProvidedSystems();
|
||||||
if (NumProvidedSystems > MaxNumProvidedSystems) {
|
if (NumProvidedSystems > MaxNumProvidedSystems) {
|
||||||
esyslog("ERROR: device %d supports %d modulation systems but cDevice::GetDevice() currently only supports %d delivery systems which should be fixed", Device->CardIndex() + 1, NumProvidedSystems, MaxNumProvidedSystems);
|
esyslog("ERROR: device %d supports %d modulation systems but cDevice::GetDevice() currently only supports %d delivery systems which should be fixed", Device->DeviceNumber() + 1, NumProvidedSystems, MaxNumProvidedSystems);
|
||||||
NumProvidedSystems = MaxNumProvidedSystems;
|
NumProvidedSystems = MaxNumProvidedSystems;
|
||||||
}
|
}
|
||||||
else if (NumProvidedSystems <= 0) {
|
else if (NumProvidedSystems <= 0) {
|
||||||
esyslog("ERROR: device %d reported an invalid number (%d) of supported delivery systems - assuming 1", Device->CardIndex() + 1, NumProvidedSystems);
|
esyslog("ERROR: device %d reported an invalid number (%d) of supported delivery systems - assuming 1", Device->DeviceNumber() + 1, NumProvidedSystems);
|
||||||
NumProvidedSystems = 1;
|
NumProvidedSystems = 1;
|
||||||
}
|
}
|
||||||
return NumProvidedSystems;
|
return NumProvidedSystems;
|
||||||
@ -272,7 +272,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView
|
|||||||
if (NumUsableSlots && SlotPriority[j] > MAXPRIORITY)
|
if (NumUsableSlots && SlotPriority[j] > MAXPRIORITY)
|
||||||
continue; // there is no CAM available in this slot
|
continue; // there is no CAM available in this slot
|
||||||
for (int i = 0; i < numDevices; i++) {
|
for (int i = 0; i < numDevices; i++) {
|
||||||
if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->CardIndex() + 1)
|
if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->DeviceNumber() + 1)
|
||||||
continue; // a specific card was requested, but not this one
|
continue; // a specific card was requested, but not this one
|
||||||
bool HasInternalCam = device[i]->HasInternalCam();
|
bool HasInternalCam = device[i]->HasInternalCam();
|
||||||
if (InternalCamNeeded && !HasInternalCam)
|
if (InternalCamNeeded && !HasInternalCam)
|
||||||
@ -525,7 +525,7 @@ void cDevice::GetOsdSize(int &Width, int &Height, double &PixelAspect)
|
|||||||
PixelAspect = 1.0;
|
PixelAspect = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#define PRINTPIDS(s) { char b[500]; char *q = b; q += sprintf(q, "%d %s ", CardIndex(), s); for (int i = 0; i < MAXPIDHANDLES; i++) q += sprintf(q, " %s%4d %d", i == ptOther ? "* " : "", pidHandles[i].pid, pidHandles[i].used); dsyslog("%s", b); }
|
//#define PRINTPIDS(s) { char b[500]; char *q = b; q += sprintf(q, "%d %s ", DeviceNumber() + 1, s); for (int i = 0; i < MAXPIDHANDLES; i++) q += sprintf(q, " %s%4d %d", i == ptOther ? "* " : "", pidHandles[i].pid, pidHandles[i].used); dsyslog("%s", b); }
|
||||||
#define PRINTPIDS(s)
|
#define PRINTPIDS(s)
|
||||||
|
|
||||||
bool cDevice::HasPid(int Pid) const
|
bool cDevice::HasPid(int Pid) const
|
||||||
@ -560,7 +560,7 @@ bool cDevice::AddPid(int Pid, ePidType PidType, int StreamType)
|
|||||||
// It's a special PID that may have to be switched into "tap" mode
|
// It's a special PID that may have to be switched into "tap" mode
|
||||||
PRINTPIDS("A");
|
PRINTPIDS("A");
|
||||||
if (!SetPid(&pidHandles[n], n, true)) {
|
if (!SetPid(&pidHandles[n], n, true)) {
|
||||||
esyslog("ERROR: can't set PID %d on device %d", Pid, CardIndex() + 1);
|
esyslog("ERROR: can't set PID %d on device %d", Pid, DeviceNumber() + 1);
|
||||||
if (PidType <= ptTeletext)
|
if (PidType <= ptTeletext)
|
||||||
DetachAll(Pid);
|
DetachAll(Pid);
|
||||||
DelPid(Pid, PidType);
|
DelPid(Pid, PidType);
|
||||||
@ -581,7 +581,7 @@ bool cDevice::AddPid(int Pid, ePidType PidType, int StreamType)
|
|||||||
n = a;
|
n = a;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
esyslog("ERROR: no free slot for PID %d on device %d", Pid, CardIndex() + 1);
|
esyslog("ERROR: no free slot for PID %d on device %d", Pid, DeviceNumber() + 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (n >= 0) {
|
if (n >= 0) {
|
||||||
@ -590,7 +590,7 @@ bool cDevice::AddPid(int Pid, ePidType PidType, int StreamType)
|
|||||||
pidHandles[n].used = 1;
|
pidHandles[n].used = 1;
|
||||||
PRINTPIDS("C");
|
PRINTPIDS("C");
|
||||||
if (!SetPid(&pidHandles[n], n, true)) {
|
if (!SetPid(&pidHandles[n], n, true)) {
|
||||||
esyslog("ERROR: can't set PID %d on device %d", Pid, CardIndex() + 1);
|
esyslog("ERROR: can't set PID %d on device %d", Pid, DeviceNumber() + 1);
|
||||||
if (PidType <= ptTeletext)
|
if (PidType <= ptTeletext)
|
||||||
DetachAll(Pid);
|
DetachAll(Pid);
|
||||||
DelPid(Pid, PidType);
|
DelPid(Pid, PidType);
|
||||||
@ -1758,7 +1758,7 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
|
|||||||
#ifdef WAIT_FOR_TUNER_LOCK
|
#ifdef WAIT_FOR_TUNER_LOCK
|
||||||
#define TUNER_LOCK_TIMEOUT 5000 // ms
|
#define TUNER_LOCK_TIMEOUT 5000 // ms
|
||||||
if (!HasLock(TUNER_LOCK_TIMEOUT)) {
|
if (!HasLock(TUNER_LOCK_TIMEOUT)) {
|
||||||
esyslog("ERROR: device %d has no lock, can't attach receiver!", CardIndex() + 1);
|
esyslog("ERROR: device %d has no lock, can't attach receiver!", DeviceNumber() + 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1849,11 +1849,11 @@ void cDevice::DetachAllReceivers(void)
|
|||||||
|
|
||||||
// --- cTSBuffer -------------------------------------------------------------
|
// --- cTSBuffer -------------------------------------------------------------
|
||||||
|
|
||||||
cTSBuffer::cTSBuffer(int File, int Size, int CardIndex)
|
cTSBuffer::cTSBuffer(int File, int Size, int DeviceNumber)
|
||||||
{
|
{
|
||||||
SetDescription("device %d TS buffer", CardIndex);
|
SetDescription("device %d TS buffer", DeviceNumber);
|
||||||
f = File;
|
f = File;
|
||||||
cardIndex = CardIndex;
|
deviceNumber = DeviceNumber;
|
||||||
delivered = 0;
|
delivered = 0;
|
||||||
ringBuffer = new cRingBufferLinear(Size, TS_SIZE, true, "TS");
|
ringBuffer = new cRingBufferLinear(Size, TS_SIZE, true, "TS");
|
||||||
ringBuffer->SetTimeouts(100, 100);
|
ringBuffer->SetTimeouts(100, 100);
|
||||||
@ -1878,7 +1878,7 @@ void cTSBuffer::Action(void)
|
|||||||
int r = ringBuffer->Read(f);
|
int r = ringBuffer->Read(f);
|
||||||
if (r < 0 && FATALERRNO) {
|
if (r < 0 && FATALERRNO) {
|
||||||
if (errno == EOVERFLOW)
|
if (errno == EOVERFLOW)
|
||||||
esyslog("ERROR: driver buffer overflow on device %d", cardIndex);
|
esyslog("ERROR: driver buffer overflow on device %d", deviceNumber);
|
||||||
else {
|
else {
|
||||||
LOG_ERROR;
|
LOG_ERROR;
|
||||||
break;
|
break;
|
||||||
@ -1909,7 +1909,7 @@ uchar *cTSBuffer::Get(int *Available, bool CheckAvailable)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ringBuffer->Del(Count);
|
ringBuffer->Del(Count);
|
||||||
esyslog("ERROR: skipped %d bytes to sync on TS packet on device %d", Count, cardIndex);
|
esyslog("ERROR: skipped %d bytes to sync on TS packet on device %d", Count, deviceNumber);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
delivered = TS_SIZE;
|
delivered = TS_SIZE;
|
||||||
|
6
device.h
6
device.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: device.h 4.12 2017/11/02 14:47:33 kls Exp $
|
* $Id: device.h 4.13 2019/05/28 14:47:09 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DEVICE_H
|
#ifndef __DEVICE_H
|
||||||
@ -861,12 +861,12 @@ public:
|
|||||||
class cTSBuffer : public cThread {
|
class cTSBuffer : public cThread {
|
||||||
private:
|
private:
|
||||||
int f;
|
int f;
|
||||||
int cardIndex;
|
int deviceNumber;
|
||||||
int delivered;
|
int delivered;
|
||||||
cRingBufferLinear *ringBuffer;
|
cRingBufferLinear *ringBuffer;
|
||||||
virtual void Action(void);
|
virtual void Action(void);
|
||||||
public:
|
public:
|
||||||
cTSBuffer(int File, int Size, int CardIndex);
|
cTSBuffer(int File, int Size, int DeviceNumber);
|
||||||
virtual ~cTSBuffer();
|
virtual ~cTSBuffer();
|
||||||
uchar *Get(int *Available = NULL, bool CheckAvailable = false);
|
uchar *Get(int *Available = NULL, bool CheckAvailable = false);
|
||||||
///< Returns a pointer to the first TS packet in the buffer. If Available is given,
|
///< Returns a pointer to the first TS packet in the buffer. If Available is given,
|
||||||
|
28
dvbdevice.c
28
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 4.20 2019/03/15 14:49:44 kls Exp $
|
* $Id: dvbdevice.c 4.21 2019/05/28 14:40:49 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -738,7 +738,7 @@ cString cDvbTuner::GetBondingParams(const cChannel *Channel) const
|
|||||||
Channel = &channel;
|
Channel = &channel;
|
||||||
cDvbTransponderParameters dtp(Channel->Parameters());
|
cDvbTransponderParameters dtp(Channel->Parameters());
|
||||||
if (Setup.DiSEqC) {
|
if (Setup.DiSEqC) {
|
||||||
if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, Channel->Source(), Channel->Frequency(), dtp.Polarization(), NULL))
|
if (const cDiseqc *diseqc = Diseqcs.Get(device->DeviceNumber() + 1, Channel->Source(), Channel->Frequency(), dtp.Polarization(), NULL))
|
||||||
return diseqc->Commands();
|
return diseqc->Commands();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1558,7 +1558,7 @@ bool cDvbTuner::SetFrontend(void)
|
|||||||
if (frontendType == SYS_DVBS || frontendType == SYS_DVBS2) {
|
if (frontendType == SYS_DVBS || frontendType == SYS_DVBS2) {
|
||||||
int frequency = channel.Frequency();
|
int frequency = channel.Frequency();
|
||||||
if (Setup.DiSEqC) {
|
if (Setup.DiSEqC) {
|
||||||
if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, channel.Source(), frequency, dtp.Polarization(), &scr)) {
|
if (const cDiseqc *diseqc = Diseqcs.Get(device->DeviceNumber() + 1, channel.Source(), frequency, dtp.Polarization(), &scr)) {
|
||||||
frequency -= diseqc->Lof();
|
frequency -= diseqc->Lof();
|
||||||
if (diseqc != lastDiseqc || diseqc->IsScr() || diseqc->Position() >= 0 && channel.Source() != lastSource) {
|
if (diseqc != lastDiseqc || diseqc->IsScr() || diseqc->Position() >= 0 && channel.Source() != lastSource) {
|
||||||
if (IsBondedMaster()) {
|
if (IsBondedMaster()) {
|
||||||
@ -1939,8 +1939,10 @@ bool cDvbDevice::Initialize(void)
|
|||||||
while ((f = AdapterDir.Next()) != NULL) {
|
while ((f = AdapterDir.Next()) != NULL) {
|
||||||
if (strstr(f->d_name, DEV_DVB_FRONTEND) == f->d_name) {
|
if (strstr(f->d_name, DEV_DVB_FRONTEND) == f->d_name) {
|
||||||
int Frontend = strtol(f->d_name + strlen(DEV_DVB_FRONTEND), NULL, 10);
|
int Frontend = strtol(f->d_name + strlen(DEV_DVB_FRONTEND), NULL, 10);
|
||||||
if (access(DvbName(DEV_DVB_DEMUX, Adapter, Frontend), F_OK) == 0) // we only create devices for actual demuxes
|
if (access(DvbName(DEV_DVB_DEMUX, Adapter, Frontend), F_OK) == 0) { // we only create devices for actual demuxes
|
||||||
|
dsyslog("detected /dev/dvb/adapter%d/frontend%d", Adapter, Frontend);
|
||||||
Nodes.Append(strdup(cString::sprintf("%2d %2d", Adapter, Frontend)));
|
Nodes.Append(strdup(cString::sprintf("%2d %2d", Adapter, Frontend)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1962,8 +1964,10 @@ bool cDvbDevice::Initialize(void)
|
|||||||
if (Probe(Adapter, Frontend))
|
if (Probe(Adapter, Frontend))
|
||||||
Used++;
|
Used++;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
dsyslog("skipped /dev/dvb/adapter%d/frontend%d", Adapter, Frontend);
|
||||||
NextCardIndex(1); // skips this one
|
NextCardIndex(1); // skips this one
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2037,18 +2041,18 @@ bool cDvbDevice::Bond(cDvbDevice *Device)
|
|||||||
if (dvbTuner && Device->dvbTuner && dvbTuner->Bond(Device->dvbTuner)) {
|
if (dvbTuner && Device->dvbTuner && dvbTuner->Bond(Device->dvbTuner)) {
|
||||||
bondedDevice = Device->bondedDevice ? Device->bondedDevice : Device;
|
bondedDevice = Device->bondedDevice ? Device->bondedDevice : Device;
|
||||||
Device->bondedDevice = this;
|
Device->bondedDevice = this;
|
||||||
dsyslog("device %d bonded with device %d", CardIndex() + 1, bondedDevice->CardIndex() + 1);
|
dsyslog("device %d bonded with device %d", DeviceNumber() + 1, bondedDevice->DeviceNumber() + 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
esyslog("ERROR: can't bond device %d with device %d (only DVB-S(2) devices can be bonded)", CardIndex() + 1, Device->CardIndex() + 1);
|
esyslog("ERROR: can't bond device %d with device %d (only DVB-S(2) devices can be bonded)", DeviceNumber() + 1, Device->DeviceNumber() + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
esyslog("ERROR: can't bond device %d with itself", CardIndex() + 1);
|
esyslog("ERROR: can't bond device %d with itself", DeviceNumber() + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
esyslog("ERROR: device %d already bonded with device %d, can't bond with device %d", CardIndex() + 1, bondedDevice->CardIndex() + 1, Device->CardIndex() + 1);
|
esyslog("ERROR: device %d already bonded with device %d, can't bond with device %d", DeviceNumber() + 1, bondedDevice->DeviceNumber() + 1, Device->DeviceNumber() + 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2058,7 +2062,7 @@ void cDvbDevice::UnBond(void)
|
|||||||
if (cDvbDevice *d = bondedDevice) {
|
if (cDvbDevice *d = bondedDevice) {
|
||||||
if (dvbTuner)
|
if (dvbTuner)
|
||||||
dvbTuner->UnBond();
|
dvbTuner->UnBond();
|
||||||
dsyslog("device %d unbonded from device %d", CardIndex() + 1, bondedDevice->CardIndex() + 1);
|
dsyslog("device %d unbonded from device %d", DeviceNumber() + 1, bondedDevice->DeviceNumber() + 1);
|
||||||
while (d->bondedDevice != this)
|
while (d->bondedDevice != this)
|
||||||
d = d->bondedDevice;
|
d = d->bondedDevice;
|
||||||
if (d == bondedDevice)
|
if (d == bondedDevice)
|
||||||
@ -2174,7 +2178,7 @@ bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const
|
|||||||
return false; // requires modulation system which frontend doesn't provide
|
return false; // requires modulation system which frontend doesn't provide
|
||||||
cDvbTransponderParameters dtp(Channel->Parameters());
|
cDvbTransponderParameters dtp(Channel->Parameters());
|
||||||
if (!cSource::IsSat(Channel->Source()) ||
|
if (!cSource::IsSat(Channel->Source()) ||
|
||||||
(!Setup.DiSEqC || Diseqcs.Get(CardIndex() + 1, Channel->Source(), Channel->Frequency(), dtp.Polarization(), NULL)))
|
(!Setup.DiSEqC || Diseqcs.Get(DeviceNumber() + 1, Channel->Source(), Channel->Frequency(), dtp.Polarization(), NULL)))
|
||||||
return DeviceHooksProvidesTransponder(Channel);
|
return DeviceHooksProvidesTransponder(Channel);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2298,7 +2302,7 @@ bool cDvbDevice::OpenDvr(void)
|
|||||||
CloseDvr();
|
CloseDvr();
|
||||||
fd_dvr = DvbOpen(DEV_DVB_DVR, adapter, frontend, O_RDONLY | O_NONBLOCK, true);
|
fd_dvr = DvbOpen(DEV_DVB_DVR, adapter, frontend, O_RDONLY | O_NONBLOCK, true);
|
||||||
if (fd_dvr >= 0)
|
if (fd_dvr >= 0)
|
||||||
tsBuffer = new cTSBuffer(fd_dvr, MEGABYTE(5), CardIndex() + 1);
|
tsBuffer = new cTSBuffer(fd_dvr, MEGABYTE(5), DeviceNumber() + 1);
|
||||||
return fd_dvr >= 0;
|
return fd_dvr >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
menu.c
16
menu.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: menu.c 4.79 2019/03/18 16:14:06 kls Exp $
|
* $Id: menu.c 4.80 2019/05/28 15:24:43 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -3892,16 +3892,16 @@ bool cMenuSetupCAMItem::Changed(void)
|
|||||||
else if (camSlot->IsActivating())
|
else if (camSlot->IsActivating())
|
||||||
// TRANSLATORS: note the leading blank!
|
// TRANSLATORS: note the leading blank!
|
||||||
Activating = tr(" (activating)");
|
Activating = tr(" (activating)");
|
||||||
cVector<int> CardIndexes;
|
cVector<int> DeviceNumbers;
|
||||||
for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) {
|
for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) {
|
||||||
if (CamSlot == camSlot || CamSlot->MasterSlot() == camSlot)
|
if (CamSlot == camSlot || CamSlot->MasterSlot() == camSlot)
|
||||||
CamSlot->Devices(CardIndexes);
|
CamSlot->Devices(DeviceNumbers);
|
||||||
}
|
}
|
||||||
if (CardIndexes.Size() > 0) {
|
if (DeviceNumbers.Size() > 0) {
|
||||||
AssignedDevice = cString::sprintf(" %s", tr("@ device"));
|
AssignedDevice = cString::sprintf(" %s", tr("@ device"));
|
||||||
CardIndexes.Sort(CompareInts);
|
DeviceNumbers.Sort(CompareInts);
|
||||||
for (int i = 0; i < CardIndexes.Size(); i++)
|
for (int i = 0; i < DeviceNumbers.Size(); i++)
|
||||||
AssignedDevice = cString::sprintf("%s %d", *AssignedDevice, CardIndexes[i] + 1);
|
AssignedDevice = cString::sprintf("%s %d", *AssignedDevice, DeviceNumbers[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cString buffer = cString::sprintf(" %d %s%s%s", camSlot->SlotNumber(), CamName, *AssignedDevice, Activating);
|
cString buffer = cString::sprintf(" %d %s%s%s", camSlot->SlotNumber(), CamName, *AssignedDevice, Activating);
|
||||||
@ -5231,7 +5231,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
|
|||||||
if (!timer) {
|
if (!timer) {
|
||||||
timer = new cTimer(true, Pause);
|
timer = new cTimer(true, Pause);
|
||||||
Timers->Add(timer);
|
Timers->Add(timer);
|
||||||
instantId = cString::sprintf(cDevice::NumDevices() > 1 ? "%s - %d" : "%s", timer->Channel()->Name(), device->CardIndex() + 1);
|
instantId = cString::sprintf(cDevice::NumDevices() > 1 ? "%s - %d" : "%s", timer->Channel()->Name(), device->DeviceNumber() + 1);
|
||||||
}
|
}
|
||||||
timer->SetPending(true);
|
timer->SetPending(true);
|
||||||
timer->SetRecording(true);
|
timer->SetRecording(true);
|
||||||
|
8
mtd.c
8
mtd.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: mtd.c 1.13 2019/05/05 13:56:46 kls Exp $
|
* $Id: mtd.c 1.14 2019/05/28 14:59:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mtd.h"
|
#include "mtd.h"
|
||||||
@ -127,11 +127,11 @@ bool cMtdHandler::IsActivating(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cMtdHandler::Devices(cVector<int> &CardIndexes)
|
bool cMtdHandler::Devices(cVector<int> &DeviceNumbers)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < camSlots.Size(); i++)
|
for (int i = 0; i < camSlots.Size(); i++)
|
||||||
camSlots[i]->Devices(CardIndexes);
|
camSlots[i]->Devices(DeviceNumbers);
|
||||||
return CardIndexes.Size() > 0;
|
return DeviceNumbers.Size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cMtdHandler::UnAssignAll(void)
|
void cMtdHandler::UnAssignAll(void)
|
||||||
|
8
mtd.h
8
mtd.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: mtd.h 1.8 2017/05/01 09:19:21 kls Exp $
|
* $Id: mtd.h 1.9 2019/05/28 15:00:10 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MTD_H
|
#ifndef __MTD_H
|
||||||
@ -136,9 +136,9 @@ public:
|
|||||||
///< Tells all active MTD CAM slots to cancel activation.
|
///< Tells all active MTD CAM slots to cancel activation.
|
||||||
bool IsActivating(void);
|
bool IsActivating(void);
|
||||||
///< Returns true if any of the active MTD CAM slots is currently activating.
|
///< Returns true if any of the active MTD CAM slots is currently activating.
|
||||||
bool Devices(cVector<int> &CardIndexes);
|
bool Devices(cVector<int> &DeviceNumbers);
|
||||||
///< Adds the card indexes of the devices of any active MTD CAM slots to
|
///< Adds the numbers of the devices of any active MTD CAM slots to
|
||||||
///< the given CardIndexes.
|
///< the given DeviceNumbers.
|
||||||
///< Returns true if the array is not empty.
|
///< Returns true if the array is not empty.
|
||||||
void UnAssignAll(void);
|
void UnAssignAll(void);
|
||||||
///< Unassigns all MTD CAM slots from their devices.
|
///< Unassigns all MTD CAM slots from their devices.
|
||||||
|
@ -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: sections.c 3.1 2015/01/14 11:35:53 kls Exp $
|
* $Id: sections.c 4.1 2019/05/28 14:09:04 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sections.h"
|
#include "sections.h"
|
||||||
@ -44,7 +44,7 @@ cSectionHandler::cSectionHandler(cDevice *Device)
|
|||||||
{
|
{
|
||||||
shp = new cSectionHandlerPrivate;
|
shp = new cSectionHandlerPrivate;
|
||||||
device = Device;
|
device = Device;
|
||||||
SetDescription("device %d section handler", device->CardIndex() + 1);
|
SetDescription("device %d section handler", device->DeviceNumber() + 1);
|
||||||
statusCount = 0;
|
statusCount = 0;
|
||||||
on = false;
|
on = false;
|
||||||
waitForLock = false;
|
waitForLock = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user