diff options
author | Klaus Schmidinger <Klaus (dot) Schmidinger (at) tvdr (dot) de> | 2010-03-14 11:56:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <Klaus (dot) Schmidinger (at) tvdr (dot) de> | 2010-03-14 11:56:00 +0100 |
commit | 1eb12b4973033212b39a53249d8fb452e6914a8a (patch) | |
tree | d805f297262d6f1051b959a3d6a29c73e2be08e2 /dvbdevice.c | |
parent | 5ce592e54a4aa741444afae8eb80dff47bc355fd (diff) | |
download | vdr-patch-lnbsharing-1eb12b4973033212b39a53249d8fb452e6914a8a.tar.gz vdr-patch-lnbsharing-1eb12b4973033212b39a53249d8fb452e6914a8a.tar.bz2 |
Version 1.7.14vdr-1.7.14
- Fixed handling empty strings in cSource::FromString().
- Assigned the source character 'I' to "IPTV" (suggested by Rolf Ahrenberg).
- Assigned the source character 'V' to "Analog Video" (suggested by Lars Hanisch).
This obsoletes the ANALOGTV patch.
- Added support for ATSC devices (thanks to Alex Lasnier).
This obsoletes the ATSC patch.
- The "Source" item in the "Edit channel" menu now wraps around the list of sources
(suggested by Halim Sahin).
- Fixed editing channel parameters.
- The new setup option "Recording/Delete timeshift recording" controls whether a timeshift
recording is automatically deleted after viewing it.
This obsoletes the DELTIMESHIFTREC patch.
Note that the meaning of the values for this option is different from the DELTIMESHIFTREC
patch: 0 means timeshift recordings are not automatically deleted (the default behavior
as in previous versions), while 1 means to ask the user whether the recording shall be
deleted.
- Added cChannel::IsSourceType() to test if a channel's source is of a given type.
- Changed the polarization characters in cDvbSourceParam::GetOsdItem() to uppercase.
- The full timer file name is now displayed if it ends with "TITLE" or "EPISODE"
(pointed out by Udo Richter).
- Fixed "attempt to drop wrong frame from ring buffer" when skipping +/- one minute
during replay.
- The new setup option "Folders in timer menu" controls whether the file names in
the timer menu are shown with their full folder path.
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 72 |
1 files changed, 43 insertions, 29 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 73f5261..75e0ca8 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 2.29 2010/02/21 17:10:35 kls Exp $ + * $Id: dvbdevice.c 2.32 2010/03/07 13:58:24 kls Exp $ */ #include "dvbdevice.h" @@ -27,6 +27,8 @@ #define DVBC_LOCK_TIMEOUT 2000 //ms #define DVBT_TUNE_TIMEOUT 9000 //ms #define DVBT_LOCK_TIMEOUT 2000 //ms +#define ATSC_TUNE_TIMEOUT 9000 //ms +#define ATSC_LOCK_TIMEOUT 2000 //ms // --- DVB Parameter Maps ---------------------------------------------------- @@ -184,17 +186,17 @@ cString cDvbTransponderParameters::ToString(char Type) const char buffer[64]; char *q = buffer; *q = 0; - ST(" S ") q += sprintf(q, "%c", polarization); - ST(" T") q += PrintParameter(q, 'B', MapToUser(bandwidth, BandwidthValues)); - ST("CST") q += PrintParameter(q, 'C', MapToUser(coderateH, CoderateValues)); - ST(" T") q += PrintParameter(q, 'D', MapToUser(coderateL, CoderateValues)); - ST(" T") q += PrintParameter(q, 'G', MapToUser(guard, GuardValues)); - ST("CST") q += PrintParameter(q, 'I', MapToUser(inversion, InversionValues)); - ST("CST") q += PrintParameter(q, 'M', MapToUser(modulation, ModulationValues)); - ST(" S ") q += PrintParameter(q, 'O', MapToUser(rollOff, RollOffValues)); - ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues)); - ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues)); - ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues)); + ST(" S ") q += sprintf(q, "%c", polarization); + ST(" T") q += PrintParameter(q, 'B', MapToUser(bandwidth, BandwidthValues)); + ST(" CST") q += PrintParameter(q, 'C', MapToUser(coderateH, CoderateValues)); + ST(" T") q += PrintParameter(q, 'D', MapToUser(coderateL, CoderateValues)); + ST(" T") q += PrintParameter(q, 'G', MapToUser(guard, GuardValues)); + ST("ACST") q += PrintParameter(q, 'I', MapToUser(inversion, InversionValues)); + ST("ACST") q += PrintParameter(q, 'M', MapToUser(modulation, ModulationValues)); + ST(" S ") q += PrintParameter(q, 'O', MapToUser(rollOff, RollOffValues)); + ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues)); + ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues)); + ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues)); return buffer; } @@ -486,6 +488,16 @@ bool cDvbTuner::SetFrontend(void) tuneTimeout = DVBT_TUNE_TIMEOUT; lockTimeout = DVBT_LOCK_TIMEOUT; } + else if (frontendType == SYS_ATSC) { + // ATSC + SETCMD(DTV_DELIVERY_SYSTEM, frontendType); + SETCMD(DTV_FREQUENCY, FrequencyToHz(channel.Frequency())); + SETCMD(DTV_INVERSION, dtp.Inversion()); + SETCMD(DTV_MODULATION, dtp.Modulation()); + + tuneTimeout = ATSC_TUNE_TIMEOUT; + lockTimeout = ATSC_LOCK_TIMEOUT; + } else { esyslog("ERROR: attempt to set channel with unknown DVB frontend type"); return false; @@ -564,7 +576,7 @@ void cDvbTuner::Action(void) class cDvbSourceParam : public cSourceParam { private: int param; - cChannel data; + int srate; cDvbTransponderParameters dtp; public: cDvbSourceParam(char Source, const char *Description); @@ -577,19 +589,19 @@ cDvbSourceParam::cDvbSourceParam(char Source, const char *Description) :cSourceParam(Source, Description) { param = 0; + srate = 0; } void cDvbSourceParam::SetData(cChannel *Channel) { - data = *Channel; - dtp.Parse(data.Parameters()); + srate = Channel->Srate(); + dtp.Parse(Channel->Parameters()); param = 0; } void cDvbSourceParam::GetData(cChannel *Channel) { - data.SetTransponderData(Channel->Source(), Channel->Frequency(), data.Srate(), dtp.ToString(Source()), true); - *Channel = data; + Channel->SetTransponderData(Channel->Source(), Channel->Frequency(), srate, dtp.ToString(Source()), true); } cOsdItem *cDvbSourceParam::GetOsdItem(void) @@ -598,18 +610,18 @@ cOsdItem *cDvbSourceParam::GetOsdItem(void) #undef ST #define ST(s) if (strchr(s, type)) switch (param++) { - case 0: ST(" S ") return new cMenuEditChrItem( tr("Polarization"), &dtp.polarization, "hvlr"); else return GetOsdItem(); - case 1: ST(" S ") return new cMenuEditMapItem( tr("System"), &dtp.system, SystemValues); else return GetOsdItem(); - case 2: ST("CS ") return new cMenuEditIntItem( tr("Srate"), &data.srate); else return GetOsdItem(); - case 3: ST("CST") return new cMenuEditMapItem( tr("Inversion"), &dtp.inversion, InversionValues); else return GetOsdItem(); - case 4: ST("CST") return new cMenuEditMapItem( tr("CoderateH"), &dtp.coderateH, CoderateValues); else return GetOsdItem(); - case 5: ST(" T") return new cMenuEditMapItem( tr("CoderateL"), &dtp.coderateL, CoderateValues); else return GetOsdItem(); - case 6: ST("CST") return new cMenuEditMapItem( tr("Modulation"), &dtp.modulation, ModulationValues); else return GetOsdItem(); - case 7: ST(" T") return new cMenuEditMapItem( tr("Bandwidth"), &dtp.bandwidth, BandwidthValues); else return GetOsdItem(); - case 8: ST(" T") return new cMenuEditMapItem( tr("Transmission"), &dtp.transmission, TransmissionValues); else return GetOsdItem(); - case 9: ST(" T") return new cMenuEditMapItem( tr("Guard"), &dtp.guard, GuardValues); else return GetOsdItem(); - case 10: ST(" T") return new cMenuEditMapItem( tr("Hierarchy"), &dtp.hierarchy, HierarchyValues); else return GetOsdItem(); - case 11: ST(" S ") return new cMenuEditMapItem( tr("Rolloff"), &dtp.rollOff, RollOffValues); else return GetOsdItem(); + case 0: ST(" S ") return new cMenuEditChrItem( tr("Polarization"), &dtp.polarization, "HVLR"); else return GetOsdItem(); + case 1: ST(" S ") return new cMenuEditMapItem( tr("System"), &dtp.system, SystemValues); else return GetOsdItem(); + case 2: ST(" CS ") return new cMenuEditIntItem( tr("Srate"), &srate); else return GetOsdItem(); + case 3: ST("ACST") return new cMenuEditMapItem( tr("Inversion"), &dtp.inversion, InversionValues); else return GetOsdItem(); + case 4: ST(" CST") return new cMenuEditMapItem( tr("CoderateH"), &dtp.coderateH, CoderateValues); else return GetOsdItem(); + case 5: ST(" T") return new cMenuEditMapItem( tr("CoderateL"), &dtp.coderateL, CoderateValues); else return GetOsdItem(); + case 6: ST("ACST") return new cMenuEditMapItem( tr("Modulation"), &dtp.modulation, ModulationValues); else return GetOsdItem(); + case 7: ST(" T") return new cMenuEditMapItem( tr("Bandwidth"), &dtp.bandwidth, BandwidthValues); else return GetOsdItem(); + case 8: ST(" T") return new cMenuEditMapItem( tr("Transmission"), &dtp.transmission, TransmissionValues); else return GetOsdItem(); + case 9: ST(" T") return new cMenuEditMapItem( tr("Guard"), &dtp.guard, GuardValues); else return GetOsdItem(); + case 10: ST(" T") return new cMenuEditMapItem( tr("Hierarchy"), &dtp.hierarchy, HierarchyValues); else return GetOsdItem(); + case 11: ST(" S ") return new cMenuEditMapItem( tr("Rolloff"), &dtp.rollOff, RollOffValues); else return GetOsdItem(); default: return NULL; } return NULL; @@ -745,6 +757,7 @@ bool cDvbDevice::Probe(int Adapter, int Frontend) bool cDvbDevice::Initialize(void) { + new cDvbSourceParam('A', "ATSC"); new cDvbSourceParam('C', "DVB-C"); new cDvbSourceParam('S', "DVB-S"); new cDvbSourceParam('T', "DVB-T"); @@ -863,6 +876,7 @@ bool cDvbDevice::ProvidesSource(int Source) const { int type = Source & cSource::st_Mask; return type == cSource::stNone + || type == cSource::stAtsc && (frontendType == SYS_ATSC) || type == cSource::stCable && (frontendType == SYS_DVBC_ANNEX_AC || frontendType == SYS_DVBC_ANNEX_B) || type == cSource::stSat && (frontendType == SYS_DVBS || frontendType == SYS_DVBS2) || type == cSource::stTerr && (frontendType == SYS_DVBT); |