diff --git a/HISTORY b/HISTORY index 536ea289..27b98972 100644 --- a/HISTORY +++ b/HISTORY @@ -1670,3 +1670,9 @@ Video Disk Recorder Revision History - Fixed a crash when learning the keys of several remote controls and pressing buttons of those that have already been learned (thanks to Oliver Endriss for reporting this one). + +2002-11-01: Version 1.1.15 + +- Completely switched to the new CVS HEAD version of the linux-dvb driver. + The NEWSTRUCT compile time switch is now obsolete. The required driver is now + the CVS HEAD version dated 2002-11-01 or later. diff --git a/Makefile b/Makefile index 7e44971c..7f2bc2d7 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Makefile 1.49 2002/10/19 15:46:08 kls Exp $ +# $Id: Makefile 1.50 2002/11/01 10:07:35 kls Exp $ .DELETE_ON_ERROR: @@ -23,12 +23,7 @@ PLUGINDIR= ./PLUGINS VIDEODIR = /video -ifdef NEWSTRUCT INCLUDES = -I$(DVBDIR)/include -DEFINES += -DNEWSTRUCT -else -INCLUDES = -I$(DVBDIR)/ost/include -endif DTVLIB = $(DTVDIR)/libdtv.a diff --git a/PLUGINS/src/hello/HISTORY b/PLUGINS/src/hello/HISTORY index 10d905e2..61893d02 100644 --- a/PLUGINS/src/hello/HISTORY +++ b/PLUGINS/src/hello/HISTORY @@ -30,3 +30,9 @@ VDR Plugin 'hello' Revision History 2002-10-26: Version 0.0.7 - Fixed a typo. + +2002-11-01: Version 0.0.8 + +- Completely switched to the new CVS HEAD version of the linux-dvb driver. + The NEWSTRUCT compile time switch is now obsolete. The required driver is now + the CVS HEAD version dated 2002-11-01 or later. diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile index 445cff5e..52a695a1 100644 --- a/PLUGINS/src/hello/Makefile +++ b/PLUGINS/src/hello/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.5 2002/09/21 08:38:39 kls Exp $ +# $Id: Makefile 1.6 2002/11/01 10:15:37 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -15,12 +15,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri ### The directory environment: -ifdef NEWSTRUCT DVBDIR = ../../../../DVB/include -DEFINES += -DNEWSTRUCT -else -DVBDIR = ../../../../DVB/ost/include -endif VDRDIR = ../../.. VDRINC = $(VDRDIR)/include LIBDIR = ../../lib diff --git a/PLUGINS/src/hello/hello.c b/PLUGINS/src/hello/hello.c index 5073e300..6583285e 100644 --- a/PLUGINS/src/hello/hello.c +++ b/PLUGINS/src/hello/hello.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hello.c 1.8 2002/10/26 14:34:48 kls Exp $ + * $Id: hello.c 1.9 2002/11/01 10:16:53 kls Exp $ */ #include @@ -12,7 +12,7 @@ #include #include "i18n.h" -static const char *VERSION = "0.0.7"; +static const char *VERSION = "0.0.8"; static const char *DESCRIPTION = "A friendly greeting"; static const char *MAINMENUENTRY = "Hello"; diff --git a/PLUGINS/src/status/HISTORY b/PLUGINS/src/status/HISTORY index b66f6540..45d0fe5c 100644 --- a/PLUGINS/src/status/HISTORY +++ b/PLUGINS/src/status/HISTORY @@ -16,3 +16,9 @@ VDR Plugin 'status' Revision History 2002-10-26: Version 0.0.4 - Fixed a typo. + +2002-11-01: Version 0.0.5 + +- Completely switched to the new CVS HEAD version of the linux-dvb driver. + The NEWSTRUCT compile time switch is now obsolete. The required driver is now + the CVS HEAD version dated 2002-11-01 or later. diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile index f08f22cc..a9676c11 100644 --- a/PLUGINS/src/status/Makefile +++ b/PLUGINS/src/status/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.3 2002/09/21 08:38:39 kls Exp $ +# $Id: Makefile 1.4 2002/11/01 10:15:44 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -15,12 +15,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri ### The directory environment: -ifdef NEWSTRUCT DVBDIR = ../../../../DVB/include -DEFINES += -DNEWSTRUCT -else -DVBDIR = ../../../../DVB/ost/include -endif VDRDIR = ../../.. VDRINC = $(VDRDIR)/include LIBDIR = ../../lib diff --git a/PLUGINS/src/status/status.c b/PLUGINS/src/status/status.c index 15a3ee96..12e64b7b 100644 --- a/PLUGINS/src/status/status.c +++ b/PLUGINS/src/status/status.c @@ -3,13 +3,13 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: status.c 1.4 2002/10/26 14:34:53 kls Exp $ + * $Id: status.c 1.5 2002/11/01 10:16:59 kls Exp $ */ #include #include -static const char *VERSION = "0.0.4"; +static const char *VERSION = "0.0.5"; static const char *DESCRIPTION = "Status monitor test"; static const char *MAINMENUENTRY = NULL; diff --git a/channels.c b/channels.c index e142a28f..4f1bcec3 100644 --- a/channels.c +++ b/channels.c @@ -4,15 +4,11 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 1.5 2002/10/20 11:50:47 kls Exp $ + * $Id: channels.c 1.6 2002/11/01 10:26:45 kls Exp $ */ #include "channels.h" -#ifdef NEWSTRUCT #include -#else -#include -#endif #include // IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d' @@ -32,9 +28,7 @@ const tChannelParameterMap BandwidthValues[] = { { 6, BANDWIDTH_6_MHZ }, { 7, BANDWIDTH_7_MHZ }, { 8, BANDWIDTH_8_MHZ }, -#ifdef NEWSTRUCT { 999, BANDWIDTH_AUTO }, -#endif { -1 } }; @@ -43,17 +37,11 @@ const tChannelParameterMap CoderateValues[] = { { 12, FEC_1_2 }, { 23, FEC_2_3 }, { 34, FEC_3_4 }, -#ifdef NEWSTRUCT { 45, FEC_4_5 }, -#endif { 56, FEC_5_6 }, -#ifdef NEWSTRUCT { 67, FEC_6_7 }, -#endif { 78, FEC_7_8 }, -#ifdef NEWSTRUCT { 89, FEC_8_9 }, -#endif { 999, FEC_AUTO }, { -1 } }; @@ -65,18 +53,14 @@ const tChannelParameterMap ModulationValues[] = { { 64, QAM_64 }, { 128, QAM_128 }, { 256, QAM_256 }, -#ifdef NEWSTRUCT { 999, QAM_AUTO }, -#endif { -1 } }; const tChannelParameterMap TransmissionValues[] = { { 2, TRANSMISSION_MODE_2K }, { 8, TRANSMISSION_MODE_8K }, -#ifdef NEWSTRUCT { 999, TRANSMISSION_MODE_AUTO }, -#endif { -1 } }; @@ -85,9 +69,7 @@ const tChannelParameterMap GuardValues[] = { { 8, GUARD_INTERVAL_1_8 }, { 16, GUARD_INTERVAL_1_16 }, { 32, GUARD_INTERVAL_1_32 }, -#ifdef NEWSTRUCT { 999, GUARD_INTERVAL_AUTO }, -#endif { -1 } }; @@ -96,9 +78,7 @@ const tChannelParameterMap HierarchyValues[] = { { 1, HIERARCHY_1 }, { 2, HIERARCHY_2 }, { 4, HIERARCHY_4 }, -#ifdef NEWSTRUCT { 999, HIERARCHY_AUTO }, -#endif { -1 } }; @@ -160,16 +140,15 @@ cChannel::cChannel(void) sid = 0; number = 0; groupSep = false; - //XXX polarization = 'v'; inversion = INVERSION_AUTO; - bandwidth = BANDWIDTH_8_MHZ; - coderateH = FEC_AUTO;//XXX FEC_2_3 - coderateL = FEC_1_2;//XXX - modulation = QAM_64; - transmission = TRANSMISSION_MODE_2K; - guard = GUARD_INTERVAL_1_32; - hierarchy = HIERARCHY_NONE; + bandwidth = BANDWIDTH_AUTO; + coderateH = FEC_AUTO; + coderateL = FEC_AUTO; + modulation = QAM_AUTO; + transmission = TRANSMISSION_MODE_AUTO; + guard = GUARD_INTERVAL_AUTO; + hierarchy = HIERARCHY_AUTO; } cChannel::cChannel(const cChannel *Channel) @@ -187,24 +166,20 @@ cChannel::cChannel(const cChannel *Channel) ca = Channel ? Channel->ca : 0; sid = Channel ? Channel->sid : 0; groupSep = Channel ? Channel->groupSep : false; - //XXX polarization = Channel ? Channel->polarization : 'v'; inversion = Channel ? Channel->inversion : INVERSION_AUTO; - bandwidth = Channel ? Channel->bandwidth : BANDWIDTH_8_MHZ; - coderateH = Channel ? Channel->coderateH : FEC_AUTO;//XXX FEC_2_3 - coderateL = Channel ? Channel->coderateL : FEC_1_2;//XXX - modulation = Channel ? Channel->modulation : QAM_64; - transmission = Channel ? Channel->transmission : TRANSMISSION_MODE_2K; - guard = Channel ? Channel->guard : GUARD_INTERVAL_1_32; - hierarchy = Channel ? Channel->hierarchy : HIERARCHY_NONE; + bandwidth = Channel ? Channel->bandwidth : BANDWIDTH_AUTO; + coderateH = Channel ? Channel->coderateH : FEC_AUTO; + coderateL = Channel ? Channel->coderateL : FEC_AUTO; + modulation = Channel ? Channel->modulation : QAM_AUTO; + transmission = Channel ? Channel->transmission : TRANSMISSION_MODE_AUTO; + guard = Channel ? Channel->guard : GUARD_INTERVAL_AUTO; + hierarchy = Channel ? Channel->hierarchy : HIERARCHY_AUTO; } static int PrintParameter(char *p, char Name, int Value) { - //XXX return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0; - //XXX let's store 999 for the moment, until we generally switch to the NEWSTRUCT - //XXX driver (where the defaults will all be AUTO) - return Value >= 0 && (Value != 999 || (Name != 'I' && Name != 'C')) ? sprintf(p, "%c%d", Name, Value) : 0; + return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0; } const char *cChannel::ParametersToString(void) @@ -233,17 +208,8 @@ static const char *ParseParameter(const char *s, int &Value, const tChannelParam errno = 0; int n = strtol(s, &p, 10); if (!errno && p != s) { - //XXX let's tolerate 999 for the moment, until we generally switch to the NEWSTRUCT - //XXX driver (where the defaults will all be AUTO) - //XXX Value = MapToDriver(n, Map); - //XXX if (Value >= 0) - //XXX return p; - int v = MapToDriver(n, Map); - if (v >= 0) { - Value = v; - return p; - } - else if (v == 999) + Value = MapToDriver(n, Map); + if (Value >= 0) return p; } } diff --git a/config.h b/config.h index 0cac7b9d..22eb9ecd 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.137 2002/10/19 15:43:31 kls Exp $ + * $Id: config.h 1.138 2002/11/01 09:27:17 kls Exp $ */ #ifndef __CONFIG_H @@ -20,7 +20,7 @@ #include "eit.h" #include "tools.h" -#define VDRVERSION "1.1.14" +#define VDRVERSION "1.1.15" #define MAXPRIORITY 99 #define MAXLIFETIME 99 diff --git a/dvbdevice.c b/dvbdevice.c index a1a8913d..cef8ddac 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 1.30 2002/10/26 11:37:03 kls Exp $ + * $Id: dvbdevice.c 1.31 2002/11/01 10:05:27 kls Exp $ */ #include "dvbdevice.h" @@ -18,17 +18,10 @@ extern "C" { } #include #include -#ifdef NEWSTRUCT #include #include #include #include -#else -#include -#include -#include -#include -#endif #include #include #include "channels.h" @@ -40,7 +33,6 @@ extern "C" { #include "transfer.h" #define DEV_VIDEO "/dev/video" -#ifdef NEWSTRUCT #define DEV_DVB_ADAPTER "/dev/dvb/adapter" #define DEV_DVB_OSD "osd" #define DEV_DVB_FRONTEND "frontend" @@ -48,24 +40,11 @@ extern "C" { #define DEV_DVB_DEMUX "demux" #define DEV_DVB_VIDEO "video" #define DEV_DVB_AUDIO "audio" -#else -#define DEV_DVB_OSD "/dev/ost/osd" -#define DEV_DVB_FRONTEND "/dev/ost/frontend" -#define DEV_DVB_SEC "/dev/ost/sec" -#define DEV_DVB_DVR "/dev/ost/dvr" -#define DEV_DVB_DEMUX "/dev/ost/demux" -#define DEV_DVB_VIDEO "/dev/ost/video" -#define DEV_DVB_AUDIO "/dev/ost/audio" -#endif static const char *DvbName(const char *Name, int n) { static char buffer[PATH_MAX]; -#ifdef NEWSTRUCT snprintf(buffer, sizeof(buffer), "%s%d/%s%d", DEV_DVB_ADAPTER, n, Name, 0); -#else - snprintf(buffer, sizeof(buffer), "%s%d", Name, n); -#endif return buffer; } @@ -80,11 +59,7 @@ static int DvbOpen(const char *Name, int n, int Mode, bool ReportError = false) cDvbDevice::cDvbDevice(int n) { -#ifdef NEWSTRUCT frontendType = fe_type_t(-1); // don't know how else to initialize this - there is no FE_UNKNOWN -#else - frontendType = FrontendType(-1); // don't know how else to initialize this - there is no FE_UNKNOWN -#endif siProcessor = NULL; spuDecoder = NULL; playMode = pmNone; @@ -99,12 +74,6 @@ cDvbDevice::cDvbDevice(int n) fd_video = DvbOpen(DEV_DVB_VIDEO, n, O_RDWR | O_NONBLOCK); fd_audio = DvbOpen(DEV_DVB_AUDIO, n, O_RDWR | O_NONBLOCK); -#ifndef NEWSTRUCT - // Devices that are only present on DVB-S cards: - - fd_sec = DvbOpen(DEV_DVB_SEC, n, O_RDWR); -#endif - // The DVR device (will be opened and closed as needed): fd_dvr = -1; @@ -116,11 +85,7 @@ cDvbDevice::cDvbDevice(int n) // We only check the devices that must be present - the others will be checked before accessing them://XXX if (fd_frontend >= 0) { -#ifdef NEWSTRUCT dvb_frontend_info feinfo; -#else - FrontendInfo feinfo; -#endif siProcessor = new cSIProcessor(DvbName(DEV_DVB_DEMUX, n)); if (ioctl(fd_frontend, FE_GET_INFO, &feinfo) >= 0) frontendType = feinfo.type; @@ -312,20 +277,12 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9) } // ptAudio ptVideo ptTeletext ptDolby ptOther -#ifdef NEWSTRUCT dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER }; -#else -dmxPesType_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER }; -#endif bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On) { if (Handle->pid) { -#ifdef NEWSTRUCT dmx_pes_filter_params pesFilterParams; -#else - dmxPesFilterParams pesFilterParams; -#endif memset(&pesFilterParams, 0, sizeof(pesFilterParams)); if (On) { if (Handle->handle < 0) { @@ -336,11 +293,7 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On) pesFilterParams.pid = Handle->pid; pesFilterParams.input = DMX_IN_FRONTEND; pesFilterParams.output = (Type <= ptTeletext && Handle->used <= 1) ? DMX_OUT_DECODER : DMX_OUT_TS_TAP; -#ifdef NEWSTRUCT pesFilterParams.pes_type= PesTypes[Type < ptOther ? Type : ptOther]; -#else - pesFilterParams.pesType = PesTypes[Type < ptOther ? Type : ptOther]; -#endif pesFilterParams.flags = DMX_IMMEDIATE_START; if (ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams) < 0) { LOG_ERROR; @@ -353,11 +306,7 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On) pesFilterParams.pid = 0x1FFF; pesFilterParams.input = DMX_IN_FRONTEND; pesFilterParams.output = DMX_OUT_DECODER; -#ifdef NEWSTRUCT pesFilterParams.pes_type= PesTypes[Type]; -#else - pesFilterParams.pesType = PesTypes[Type]; -#endif pesFilterParams.flags = DMX_IMMEDIATE_START; CHECK(ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams)); close(Handle->handle); @@ -491,11 +440,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) if (DoTune) { -#ifdef NEWSTRUCT dvb_frontend_parameters Frontend; -#else - FrontendParameters Frontend; -#endif memset(&Frontend, 0, sizeof(Frontend)); @@ -508,14 +453,9 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) cDiseqc *diseqc = Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization()); if (diseqc) { if (diseqc->Commands() && (!diseqcCommands || strcmp(diseqcCommands, diseqc->Commands()) != 0)) { -#ifndef NEWSTRUCT - int SecTone = SEC_TONE_OFF; - int SecVolt = SEC_VOLTAGE_13; -#endif cDiseqc::eDiseqcActions da; for (bool Start = true; (da = diseqc->Execute(Start)) != cDiseqc::daNone; Start = false) { switch (da) { -#ifdef NEWSTRUCT case cDiseqc::daNone: break; case cDiseqc::daToneOff: CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_OFF)); break; case cDiseqc::daToneOn: CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_ON)); break; @@ -534,49 +474,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) } } break; -#else - // This may not work very good with the old driver. - // Let's try to emulate the NEWSTRUCT driver's behaviour as good as possible... - case cDiseqc::daNone: break; - case cDiseqc::daToneOff: CHECK(ioctl(fd_sec, SEC_SET_TONE, SecTone = SEC_TONE_OFF)); break; - case cDiseqc::daToneOn: CHECK(ioctl(fd_sec, SEC_SET_TONE, SecTone = SEC_TONE_ON)); break; - case cDiseqc::daVoltage13: CHECK(ioctl(fd_sec, SEC_SET_VOLTAGE, SecVolt = SEC_VOLTAGE_13)); break; - case cDiseqc::daVoltage18: CHECK(ioctl(fd_sec, SEC_SET_VOLTAGE, SecVolt = SEC_VOLTAGE_18)); break; - case cDiseqc::daMiniA: - case cDiseqc::daMiniB: { - secCmdSequence scmds; - memset(&scmds, 0, sizeof(scmds)); - scmds.voltage = SecVolt; - scmds.miniCommand = (da == cDiseqc::daMiniA) ? SEC_MINI_A : SEC_MINI_B; - scmds.continuousTone = SecTone; - CHECK(ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds)); - } - break; - case cDiseqc::daCodes: { - int n = 0; - uchar *codes = diseqc->Codes(n); - if (codes && n >= 3 && codes[0] == 0xE0) { - secCommand scmd; - memset(&scmd, 0, sizeof(scmd)); - scmd.type = SEC_CMDTYPE_DISEQC; - scmd.u.diseqc.addr = codes[1]; - scmd.u.diseqc.cmd = codes[2]; - scmd.u.diseqc.numParams = n - 3; - memcpy(scmd.u.diseqc.params, &codes[3], min(n - 3, int(sizeof(scmd.u.diseqc.params)))); - - secCmdSequence scmds; - memset(&scmds, 0, sizeof(scmds)); - scmds.voltage = SecVolt; - scmds.miniCommand = SEC_MINI_NONE; - scmds.continuousTone = SecTone; - scmds.numCommands = 1; - scmds.commands = &scmd; - - CHECK(ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds)); - } - } - break; -#endif } } diseqcCommands = diseqc->Commands(); @@ -600,56 +497,31 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) tone = SEC_TONE_ON; } int volt = (Channel->Polarization() == 'v' || Channel->Polarization() == 'V') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18; -#ifdef NEWSTRUCT CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, volt)); CHECK(ioctl(fd_frontend, FE_SET_TONE, tone)); -#else - secCmdSequence scmds; - memset(&scmds, 0, sizeof(scmds)); - scmds.voltage = volt; - scmds.miniCommand = SEC_MINI_NONE; - scmds.continuousTone = tone; - CHECK(ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds)); -#endif } -#ifdef NEWSTRUCT Frontend.frequency = frequency * 1000UL; Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion()); Frontend.u.qpsk.symbol_rate = Channel->Srate() * 1000UL; Frontend.u.qpsk.fec_inner = fe_code_rate_t(Channel->CoderateH()); -#else - Frontend.Frequency = frequency * 1000UL; - Frontend.Inversion = SpectralInversion(Channel->Inversion()); - Frontend.u.qpsk.SymbolRate = Channel->Srate() * 1000UL; - Frontend.u.qpsk.FEC_inner = CodeRate(Channel->CoderateH()); -#endif } break; case FE_QAM: { // DVB-C // Frequency and symbol rate: -#ifdef NEWSTRUCT Frontend.frequency = FrequencyToHz(Channel->Frequency()); Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion()); Frontend.u.qam.symbol_rate = Channel->Srate() * 1000UL; Frontend.u.qam.fec_inner = fe_code_rate_t(Channel->CoderateH()); Frontend.u.qam.modulation = fe_modulation_t(Channel->Modulation()); -#else - Frontend.Frequency = FrequencyToHz(Channel->Frequency()); - Frontend.Inversion = SpectralInversion(Channel->Inversion()); - Frontend.u.qam.SymbolRate = Channel->Srate() * 1000UL; - Frontend.u.qam.FEC_inner = CodeRate(Channel->CoderateH()); - Frontend.u.qam.QAM = Modulation(Channel->Modulation()); -#endif } break; case FE_OFDM: { // DVB-T // Frequency and OFDM paramaters: -#ifdef NEWSTRUCT Frontend.frequency = FrequencyToHz(Channel->Frequency()); Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion()); Frontend.u.ofdm.bandwidth = fe_bandwidth_t(Channel->Bandwidth()); @@ -659,17 +531,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) Frontend.u.ofdm.transmission_mode = fe_transmit_mode_t(Channel->Transmission()); Frontend.u.ofdm.guard_interval = fe_guard_interval_t(Channel->Guard()); Frontend.u.ofdm.hierarchy_information = fe_hierarchy_t(Channel->Hierarchy()); -#else - Frontend.Frequency = FrequencyToHz(Channel->Frequency()); - Frontend.Inversion = SpectralInversion(Channel->Inversion()); - Frontend.u.ofdm.bandWidth = BandWidth(Channel->Bandwidth()); - Frontend.u.ofdm.HP_CodeRate = CodeRate(Channel->CoderateH()); - Frontend.u.ofdm.LP_CodeRate = CodeRate(Channel->CoderateL()); - Frontend.u.ofdm.Constellation = Modulation(Channel->Modulation()); - Frontend.u.ofdm.TransmissionMode = TransmitMode(Channel->Transmission()); - Frontend.u.ofdm.guardInterval = GuardInterval(Channel->Guard()); - Frontend.u.ofdm.HierarchyInformation = Hierarchy(Channel->Hierarchy()); -#endif } break; default: @@ -677,7 +538,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) return false; } -#ifdef NEWSTRUCT // Discard stale events: for (;;) { @@ -685,7 +545,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) if (ioctl(fd_frontend, FE_GET_EVENT, &event) < 0) break; } -#endif // Tuning: @@ -693,7 +552,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) // Wait for channel lock: -#ifdef NEWSTRUCT fe_status_t status = fe_status_t(0); for (int i = 0; i < 100; i++) { CHECK(ioctl(fd_frontend, FE_READ_STATUS, &status)); @@ -707,23 +565,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) cThread::RaisePanic(); return false; } -#else - if (cFile::FileReady(fd_frontend, 5000)) { - FrontendEvent event; - if (ioctl(fd_frontend, FE_GET_EVENT, &event) >= 0) { - if (event.type != FE_COMPLETION_EV) { - esyslog("ERROR: channel %d not sync'ed on DVB card %d!", Channel->Number(), CardIndex() + 1); - if (LiveView && IsPrimaryDevice()) - cThread::RaisePanic(); - return false; - } - } - else - esyslog("ERROR in frontend get event (channel %d, card %d): %m", Channel->Number(), CardIndex() + 1); - } - else - esyslog("ERROR: timeout while tuning on DVB card %d", CardIndex() + 1); -#endif source = Channel->Source(); frequency = Channel->Frequency(); @@ -757,11 +598,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) void cDvbDevice::SetVolumeDevice(int Volume) { if (HasDecoder()) { -#ifdef NEWSTRUCT audio_mixer_t am; -#else - audioMixer_t am; -#endif am.volume_left = am.volume_right = Volume; CHECK(ioctl(fd_audio, AUDIO_SET_MIXER, &am)); } @@ -991,11 +828,7 @@ bool cDvbDevice::GetTSPacket(uchar *&Data) return true; } else if (FATALERRNO) { -#ifdef NEWSTRUCT if (errno == EOVERFLOW) -#else - if (errno == EBUFFEROVERFLOW) // this error code is not defined in the library -#endif esyslog("ERROR: DVB driver buffer overflow on device %d", CardIndex() + 1); else { LOG_ERROR; diff --git a/dvbdevice.h b/dvbdevice.h index 8784c74e..46f1d106 100644 --- a/dvbdevice.h +++ b/dvbdevice.h @@ -4,17 +4,13 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.h 1.15 2002/10/26 11:35:04 kls Exp $ + * $Id: dvbdevice.h 1.16 2002/11/01 10:05:41 kls Exp $ */ #ifndef __DVBDEVICE_H #define __DVBDEVICE_H -#ifdef NEWSTRUCT #include -#else -#include -#endif #include "device.h" #include "dvbspu.h" #include "eit.h" @@ -31,13 +27,8 @@ public: // Initializes the DVB devices. // Must be called before accessing any DVB functions. private: -#ifdef NEWSTRUCT fe_type_t frontendType; int fd_osd, fd_frontend, fd_audio, fd_video, fd_dvr; -#else - FrontendType frontendType; - int fd_osd, fd_frontend, fd_sec, fd_audio, fd_video, fd_dvr; -#endif int OsdDeviceHandle(void) const { return fd_osd; } protected: virtual void MakePrimaryDevice(bool On); diff --git a/dvbosd.h b/dvbosd.h index e35aab6d..cbc7901f 100644 --- a/dvbosd.h +++ b/dvbosd.h @@ -4,17 +4,13 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbosd.h 1.15 2002/08/09 16:16:48 kls Exp $ + * $Id: dvbosd.h 1.16 2002/11/01 10:05:47 kls Exp $ */ #ifndef __DVBOSD_H #define __DVBOSD_H -#ifdef NEWSTRUCT #include -#else -#include -#endif #include "dvbdevice.h" #include "osdbase.h" diff --git a/eit.c b/eit.c index 40ae8741..b608fc46 100644 --- a/eit.c +++ b/eit.c @@ -16,18 +16,14 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: eit.c 1.57 2002/10/13 09:29:05 kls Exp $ + * $Id: eit.c 1.58 2002/11/01 10:05:56 kls Exp $ ***************************************************************************/ #include "eit.h" #include #include #include -#ifdef NEWSTRUCT #include -#else -#include -#endif #include #include #include @@ -1196,11 +1192,7 @@ void cSIProcessor::Action() table identifer tid */ bool cSIProcessor::AddFilter(u_char pid, u_char tid) { -#ifdef NEWSTRUCT dmx_sct_filter_params sctFilterParams; -#else - dmxSctFilterParams sctFilterParams; -#endif memset(&sctFilterParams, 0, sizeof(sctFilterParams)); sctFilterParams.pid = pid; sctFilterParams.timeout = 0; diff --git a/newplugin b/newplugin index b18e7c56..4032b4f0 100755 --- a/newplugin +++ b/newplugin @@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: newplugin 1.9 2002/10/26 14:32:12 kls Exp $ +# $Id: newplugin 1.10 2002/11/01 10:06:32 kls Exp $ $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin \n"; @@ -70,12 +70,7 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{ ### The directory environment: -ifdef NEWSTRUCT DVBDIR = ../../../../DVB/include -DEFINES += -DNEWSTRUCT -else -DVBDIR = ../../../../DVB/ost/include -endif VDRDIR = ../../.. VDRINC = \$(VDRDIR)/include LIBDIR = ../../lib diff --git a/remux.h b/remux.h index 83126187..638a3f9e 100644 --- a/remux.h +++ b/remux.h @@ -4,18 +4,14 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remux.h 1.8 2002/10/12 13:30:24 kls Exp $ + * $Id: remux.h 1.9 2002/11/01 10:06:46 kls Exp $ */ #ifndef __REMUX_H #define __REMUX_H #include //XXX FIXME: DVB/linux/dvb/dmx.h should include itself!!! -#ifdef NEWSTRUCT #include -#else -#include -#endif #include "tools.h" // Picture types: