|
vdr 2.6.4
|
#include "dvbdevice.h"#include <ctype.h>#include <errno.h>#include <limits.h>#include <linux/dvb/dmx.h>#include <linux/dvb/frontend.h>#include <sys/ioctl.h>#include <sys/mman.h>#include "channels.h"#include "diseqc.h"#include "dvbci.h"#include "menuitems.h"#include "sourceparams.h"Go to the source code of this file.
Classes | |
| class | cDvbFrontend |
| class | cDvbTuner |
| class | cDvbSourceParam |
Macros | |
| #define | BANDWIDTH_HZ_AUTO 0 |
| #define | DVBS_TUNE_TIMEOUT 9000 |
| #define | DVBS_LOCK_TIMEOUT 2000 |
| #define | DVBC_TUNE_TIMEOUT 9000 |
| #define | DVBC_LOCK_TIMEOUT 2000 |
| #define | DVBT_TUNE_TIMEOUT 9000 |
| #define | DVBT_LOCK_TIMEOUT 2000 |
| #define | ATSC_TUNE_TIMEOUT 9000 |
| #define | ATSC_LOCK_TIMEOUT 2000 |
| #define | SCR_RANDOM_TIMEOUT 500 |
| #define | TSBUFFERSIZE MEGABYTE(16) |
| #define | DVB_SYSTEM_1 0 |
| #define | DVB_SYSTEM_2 1 |
| #define | ST(s) if (strchr(s, Type) && (strchr(s, '0' + system + 1) || strchr(s, '*'))) |
| #define | MAXFRONTENDCMDS 16 |
| #define | SETCMD(c, d) |
| #define | TUNER_POLL_TIMEOUT 10 |
| #define | REF_S1(q1) (mod == QPSK) ? q1 : 0 |
| #define | REF_S2(q1, q2, q3, q4) (mod == QPSK) ? q1 : (mod == PSK_8) ? q2 : (mod == APSK_16) ? q3 : (mod == APSK_32) ? q4 : 0 |
| #define | REF_T1(q1, q2, q3) (mod == QPSK) ? q1 : (mod == QAM_16) ? q2 : (mod == QAM_64) ? q3 : 0 |
| #define | REF_T2(q1, q2, q3, q4) (mod == QPSK) ? q1 : (mod == QAM_16) ? q2 : (mod == QAM_64) ? q3 : (mod == QAM_256) ? q4 : 0 |
| #define | REF_C1(q1, q2, q3, q4, q5) (mod == QAM_16) ? q1 : (mod == QAM_32) ? q2 : (mod == QAM_64) ? q3 : (mod == QAM_128) ? q4 : (mod == QAM_256) ? q5: 0 |
| #define | IGNORE_BER 1 |
| #define | BER_ERROR_FREE (1000*1000*1000) |
| #define | LOCK_THRESHOLD 5 |
| #define | ST(s) if (strchr(s, type)) |
| #define | RB_NUM_SECTIONS 8 |
Functions | |
| int | UserIndex (int Value, const tDvbParameterMap *Map) |
| int | DriverIndex (int Value, const tDvbParameterMap *Map) |
| int | MapToUser (int Value, const tDvbParameterMap *Map, const char **String) |
| const char * | MapToUserString (int Value, const tDvbParameterMap *Map) |
| int | MapToDriver (int Value, const tDvbParameterMap *Map) |
| static const char * | GetDeliverySystemName (int Index) |
| static int | GetRequiredDeliverySystem (const cChannel *Channel, const cDvbTransponderParameters *Dtp) |
| int | dB1000toPercent (int dB1000, int Low, int High) |
| int | StrengthToSSI (const cChannel *Channel, int Strength, int FeModulation, int FeCoderateH, int FeFec) |
| int | SignalToSQI (const cChannel *Channel, int Signal, int Ber, int FeModulation, int FeCoderateH, int FeFec) |
| static unsigned int | FrequencyToHz (unsigned int f) |
| cString | DvbName (const char *Name, int Adapter, int Frontend) |
| int | DvbOpen (const char *Name, int Adapter, int Frontend, int Mode, bool ReportError) |
Variables | |
| static int | DvbApiVersion = 0x0000 |
| const tDvbParameterMap | PilotValues [] |
| const tDvbParameterMap | InversionValues [] |
| const tDvbParameterMap | BandwidthValues [] |
| const tDvbParameterMap | CoderateValues [] |
| const tDvbParameterMap | ModulationValues [] |
| const tDvbParameterMap | SystemValuesSat [] |
| const tDvbParameterMap | SystemValuesTerr [] |
| const tDvbParameterMap | TransmissionValues [] |
| const tDvbParameterMap | GuardValues [] |
| const tDvbParameterMap | HierarchyValues [] |
| const tDvbParameterMap | RollOffValues [] |
| const char * | DeliverySystemNames [] |
| static const int | DeliverySystemNamesMax = sizeof(DeliverySystemNames) / sizeof(DeliverySystemNames[0]) - 2 |
| cList< cDvbDeviceProbe > | DvbDeviceProbes |
| #define ATSC_LOCK_TIMEOUT 2000 |
Definition at line 35 of file dvbdevice.c.
| #define ATSC_TUNE_TIMEOUT 9000 |
Definition at line 34 of file dvbdevice.c.
| #define BANDWIDTH_HZ_AUTO 0 |
Definition at line 26 of file dvbdevice.c.
| #define BER_ERROR_FREE (1000*1000*1000) |
Definition at line 1083 of file dvbdevice.c.
| #define DVB_SYSTEM_1 0 |
Definition at line 101 of file dvbdevice.c.
| #define DVB_SYSTEM_2 1 |
Definition at line 102 of file dvbdevice.c.
| #define DVBC_LOCK_TIMEOUT 2000 |
Definition at line 31 of file dvbdevice.c.
| #define DVBC_TUNE_TIMEOUT 9000 |
Definition at line 30 of file dvbdevice.c.
| #define DVBS_LOCK_TIMEOUT 2000 |
Definition at line 29 of file dvbdevice.c.
| #define DVBS_TUNE_TIMEOUT 9000 |
Definition at line 28 of file dvbdevice.c.
| #define DVBT_LOCK_TIMEOUT 2000 |
Definition at line 33 of file dvbdevice.c.
| #define DVBT_TUNE_TIMEOUT 9000 |
Definition at line 32 of file dvbdevice.c.
| #define IGNORE_BER 1 |
Definition at line 1082 of file dvbdevice.c.
| #define LOCK_THRESHOLD 5 |
Definition at line 1290 of file dvbdevice.c.
| #define MAXFRONTENDCMDS 16 |
Definition at line 336 of file dvbdevice.c.
| #define RB_NUM_SECTIONS 8 |
Definition at line 2145 of file dvbdevice.c.
| #define REF_C1 | ( | q1, | |
| q2, | |||
| q3, | |||
| q4, | |||
| q5 | |||
| ) | (mod == QAM_16) ? q1 : (mod == QAM_32) ? q2 : (mod == QAM_64) ? q3 : (mod == QAM_128) ? q4 : (mod == QAM_256) ? q5: 0 |
Definition at line 1006 of file dvbdevice.c.
| #define REF_S1 | ( | q1 | ) | (mod == QPSK) ? q1 : 0 |
Definition at line 1002 of file dvbdevice.c.
| #define REF_S2 | ( | q1, | |
| q2, | |||
| q3, | |||
| q4 | |||
| ) | (mod == QPSK) ? q1 : (mod == PSK_8) ? q2 : (mod == APSK_16) ? q3 : (mod == APSK_32) ? q4 : 0 |
Definition at line 1003 of file dvbdevice.c.
| #define REF_T1 | ( | q1, | |
| q2, | |||
| q3 | |||
| ) | (mod == QPSK) ? q1 : (mod == QAM_16) ? q2 : (mod == QAM_64) ? q3 : 0 |
Definition at line 1004 of file dvbdevice.c.
| #define REF_T2 | ( | q1, | |
| q2, | |||
| q3, | |||
| q4 | |||
| ) | (mod == QPSK) ? q1 : (mod == QAM_16) ? q2 : (mod == QAM_64) ? q3 : (mod == QAM_256) ? q4 : 0 |
Definition at line 1005 of file dvbdevice.c.
| #define SCR_RANDOM_TIMEOUT 500 |
Definition at line 37 of file dvbdevice.c.
| #define SETCMD | ( | c, | |
| d | |||
| ) |
Definition at line 337 of file dvbdevice.c.
| #define ST | ( | s | ) | if (strchr(s, Type) && (strchr(s, '0' + system + 1) || strchr(s, '*'))) |
| #define ST | ( | s | ) | if (strchr(s, type)) |
| #define TSBUFFERSIZE MEGABYTE(16) |
Definition at line 39 of file dvbdevice.c.
| #define TUNER_POLL_TIMEOUT 10 |
Definition at line 514 of file dvbdevice.c.
| int dB1000toPercent | ( | int | dB1000, |
| int | Low, | ||
| int | High | ||
| ) |
Definition at line 987 of file dvbdevice.c.
Referenced by SignalToSQI(), and StrengthToSSI().
| int DriverIndex | ( | int | Value, |
| const tDvbParameterMap * | Map | ||
| ) |
Definition at line 167 of file dvbdevice.c.
References tDvbParameterMap::driverValue, and tDvbParameterMap::userValue.
Referenced by MapToUser(), MapToUserString(), and cMenuEditMapItem::ProcessKey().
| cString DvbName | ( | const char * | Name, |
| int | Adapter, | ||
| int | Frontend | ||
| ) |
Definition at line 1876 of file dvbdevice.c.
References DEV_DVB_ADAPTER, DEV_DVB_BASE, and cString::sprintf().
Referenced by cDvbTuner::cDvbTuner(), DvbOpen(), cDvbDevice::Exists(), cDvbDevice::Initialize(), cDvbDevice::OpenFilter(), and cDvbDevice::Probe().
| int DvbOpen | ( | const char * | Name, |
| int | Adapter, | ||
| int | Frontend, | ||
| int | Mode, | ||
| bool | ReportError | ||
| ) |
Definition at line 1881 of file dvbdevice.c.
References DvbName(), and LOG_ERROR_STR.
Referenced by cDvbDevice::cDvbDevice(), cDvbHdFfDevice::cDvbHdFfDevice(), cDvbSdFfDevice::cDvbSdFfDevice(), cDvbHdFfDevice::GrabImage(), cDvbFrontend::Open(), cDvbDevice::OpenDvr(), cDvbDevice::SetPid(), cDvbHdFfDevice::SetPid(), cDvbSdFfDevice::SetPid(), cDvbHdFfDevice::SetPlayMode(), and cDvbSdFfDevice::SetPlayMode().
|
static |
Definition at line 1464 of file dvbdevice.c.
Referenced by cDvbTuner::SetFrontend().
|
static |
Definition at line 329 of file dvbdevice.c.
References DeliverySystemNames, and DeliverySystemNamesMax.
Referenced by cDvbDevice::DeviceType(), and cDvbFrontend::QueryDeliverySystems().
|
static |
Definition at line 516 of file dvbdevice.c.
References DVB_SYSTEM_1, esyslog, cChannel::IsAtsc(), cChannel::IsCable(), cChannel::IsSat(), cChannel::IsTerr(), cChannel::Name(), cChannel::Number(), SYS_DVBT2, and cDvbTransponderParameters::System().
Referenced by cDvbTuner::ProvidesFrontend(), and cDvbTuner::SetFrontend().
| int MapToDriver | ( | int | Value, |
| const tDvbParameterMap * | Map | ||
| ) |
Definition at line 197 of file dvbdevice.c.
References tDvbParameterMap::driverValue, and UserIndex().
Referenced by cDvbTransponderParameters::ParseParameter().
| int MapToUser | ( | int | Value, |
| const tDvbParameterMap * | Map, | ||
| const char ** | String | ||
| ) |
Definition at line 178 of file dvbdevice.c.
References DriverIndex(), tr, and tDvbParameterMap::userValue.
Referenced by cMenuEditMapItem::Set(), and cDvbTransponderParameters::ToString().
| const char * MapToUserString | ( | int | Value, |
| const tDvbParameterMap * | Map | ||
| ) |
Definition at line 189 of file dvbdevice.c.
References DriverIndex(), and tDvbParameterMap::userString.
Referenced by cDvbFrontend::QueryDeliverySystems().
| int SignalToSQI | ( | const cChannel * | Channel, |
| int | Signal, | ||
| int | Ber, | ||
| int | FeModulation, | ||
| int | FeCoderateH, | ||
| int | FeFec | ||
| ) |
Definition at line 1085 of file dvbdevice.c.
References BER_ERROR_FREE, cDvbTransponderParameters::CoderateH(), dB1000toPercent(), dsyslog, DVB_SYSTEM_1, cChannel::IsCable(), cChannel::IsSat(), cChannel::IsTerr(), cDvbTransponderParameters::Modulation(), cChannel::Parameters(), REF_C1, REF_S1, REF_S2, REF_T1, REF_T2, and cDvbTransponderParameters::System().
Referenced by cDvbTuner::GetSignalQuality().
| int StrengthToSSI | ( | const cChannel * | Channel, |
| int | Strength, | ||
| int | FeModulation, | ||
| int | FeCoderateH, | ||
| int | FeFec | ||
| ) |
Definition at line 1008 of file dvbdevice.c.
References cDvbTransponderParameters::CoderateH(), dB1000toPercent(), DVB_SYSTEM_1, cChannel::IsCable(), cChannel::IsSat(), cChannel::IsTerr(), cDvbTransponderParameters::Modulation(), cChannel::Parameters(), REF_C1, REF_T1, REF_T2, and cDvbTransponderParameters::System().
Referenced by cDvbTuner::GetSignalStrength().
| int UserIndex | ( | int | Value, |
| const tDvbParameterMap * | Map | ||
| ) |
Definition at line 156 of file dvbdevice.c.
References tDvbParameterMap::userValue.
Referenced by MapToDriver().
| const tDvbParameterMap BandwidthValues[] |
Definition at line 57 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap CoderateValues[] |
Definition at line 68 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const char* DeliverySystemNames[] |
Definition at line 303 of file dvbdevice.c.
Referenced by GetDeliverySystemName().
|
static |
Definition at line 327 of file dvbdevice.c.
Referenced by GetDeliverySystemName().
|
static |
Definition at line 24 of file dvbdevice.c.
Referenced by cDvbFrontend::QueryDeliverySystems(), and cDvbTuner::SetFrontend().
| cList<cDvbDeviceProbe> DvbDeviceProbes |
Definition at line 2375 of file dvbdevice.c.
Referenced by cDvbDeviceProbe::cDvbDeviceProbe(), cDvbDevice::Probe(), and cDvbDeviceProbe::~cDvbDeviceProbe().
| const tDvbParameterMap GuardValues[] |
Definition at line 127 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap HierarchyValues[] |
Definition at line 139 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap InversionValues[] |
Definition at line 50 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap ModulationValues[] |
Definition at line 84 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), cDvbFrontend::QueryDeliverySystems(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap PilotValues[] |
Definition at line 43 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap RollOffValues[] |
Definition at line 148 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap SystemValuesSat[] |
Definition at line 104 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().
| const tDvbParameterMap SystemValuesTerr[] |
Definition at line 110 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem().
| const tDvbParameterMap TransmissionValues[] |
Definition at line 116 of file dvbdevice.c.
Referenced by cDvbSourceParam::GetOsdItem(), cDvbTransponderParameters::Parse(), and cDvbTransponderParameters::ToString().