aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/dvb/frontend.cpp12
-rw-r--r--lib/dvb/frontend.h2
-rw-r--r--lib/dvb/idvb.h2
-rw-r--r--lib/python/Components/TunerInfo.py20
-rw-r--r--lib/python/Screens/ServiceInfo.py2
-rw-r--r--lib/service/iservice.h16
-rw-r--r--lib/service/servicedvb.cpp8
-rw-r--r--lib/service/servicedvb.h22
-rw-r--r--lib/service/servicedvbrecord.cpp6
-rw-r--r--lib/service/servicedvbrecord.h5
-rw-r--r--lib/service/servicemp3.h2
11 files changed, 56 insertions, 41 deletions
diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp
index 1f1d17a7..fe7c8cdc 100644
--- a/lib/dvb/frontend.cpp
+++ b/lib/dvb/frontend.cpp
@@ -588,7 +588,7 @@ int eDVBFrontend::readFrontendData(int type)
eDebug("FE_READ_SIGNAL_STRENGTH failed (%m)");
return strength;
}
- case Locked:
+ case locked:
{
#if HAVE_DVB_API_VERSION < 3
FrontendStatus status=0;
@@ -599,7 +599,7 @@ int eDVBFrontend::readFrontendData(int type)
eDebug("FE_READ_STATUS failed (%m)");
return !!(status&FE_HAS_LOCK);
}
- case Synced:
+ case synced:
{
#if HAVE_DVB_API_VERSION < 3
FrontendStatus status=0;
@@ -610,6 +610,8 @@ int eDVBFrontend::readFrontendData(int type)
eDebug("FE_READ_STATUS failed (%m)");
return !!(status&FE_HAS_SYNC);
}
+ case frontendNumber:
+ return m_fe;
}
return 0;
}
@@ -966,8 +968,8 @@ PyObject *eDVBFrontend::readTransponderData(bool original)
}
PutToDict(ret, "tuner_state", tmp);
- PutToDict(ret, "tuner_locked", readFrontendData(Locked));
- PutToDict(ret, "tuner_synced", readFrontendData(Synced));
+ PutToDict(ret, "tuner_locked", readFrontendData(locked));
+ PutToDict(ret, "tuner_synced", readFrontendData(synced));
PutToDict(ret, "tuner_bit_error_rate", readFrontendData(bitErrorRate));
PutToDict(ret, "tuner_signal_power", readFrontendData(signalPower));
PutToDict(ret, "tuner_signal_quality", readFrontendData(signalQuality));
@@ -1170,7 +1172,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
case eSecCommand::IF_TUNER_LOCKED_GOTO:
{
eSecCommand::rotor &cmd = m_sec_sequence.current()->measure;
- if (readFrontendData(Locked))
+ if (readFrontendData(locked))
{
eDebug("[SEC] locked step %d ok", cmd.okcount);
++cmd.okcount;
diff --git a/lib/dvb/frontend.h b/lib/dvb/frontend.h
index 2c8d89e3..ce40acd0 100644
--- a/lib/dvb/frontend.h
+++ b/lib/dvb/frontend.h
@@ -102,7 +102,7 @@ public:
RESULT getData(int num, int &data);
RESULT setData(int num, int val);
- int readFrontendData(int type); // bitErrorRate, signalPower, signalQuality, Locked, Synced
+ int readFrontendData(int type); // bitErrorRate, signalPower, signalQuality, locked, synced
PyObject *readTransponderData(bool original);
int isCompatibleWith(ePtr<iDVBFrontendParameters> &feparm);
diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h
index dff543ca..8b86866e 100644
--- a/lib/dvb/idvb.h
+++ b/lib/dvb/idvb.h
@@ -411,7 +411,7 @@ public:
virtual RESULT setSecSequence(const eSecCommandList &list)=0;
#endif
enum {
- bitErrorRate, signalPower, signalQuality, Locked, Synced
+ bitErrorRate, signalPower, signalQuality, locked, synced, frontendNumber
};
virtual int readFrontendData(int type)=0;
virtual PyObject *readTransponderData(bool original)=0;
diff --git a/lib/python/Components/TunerInfo.py b/lib/python/Components/TunerInfo.py
index 53cb3d90..a7e22fb1 100644
--- a/lib/python/Components/TunerInfo.py
+++ b/lib/python/Components/TunerInfo.py
@@ -1,6 +1,6 @@
from GUIComponent import GUIComponent
-from enigma import eLabel, eSlider, iFrontendStatusInformation
+from enigma import eLabel, eSlider, iFrontendInformation
from math import log
@@ -74,26 +74,26 @@ class TunerInfo(GUIComponent):
if self.servicefkt is not None:
service = self.servicefkt()
if service is not None:
- feinfo = service.frontendStatusInfo()
+ feinfo = service.frontendInfo()
if feinfo is not None:
if what == self.SNR:
- return feinfo.getFrontendInfo(iFrontendStatusInformation.signalPower)
+ return feinfo.getFrontendInfo(iFrontendInformation.signalPower)
elif what == self.AGC:
- return feinfo.getFrontendInfo(iFrontendStatusInformation.signalQuality)
+ return feinfo.getFrontendInfo(iFrontendInformation.signalQuality)
elif what == self.BER:
- return feinfo.getFrontendInfo(iFrontendStatusInformation.bitErrorRate)
+ return feinfo.getFrontendInfo(iFrontendInformation.bitErrorRate)
elif what == self.LOCK:
- return feinfo.getFrontendInfo(iFrontendStatusInformation.LockState)
+ return feinfo.getFrontendInfo(iFrontendInformation.lockState)
elif self.frontendfkt is not None:
frontend = self.frontendfkt()
if what == self.SNR:
- return frontend.readFrontendData(iFrontendStatusInformation.signalPower)
+ return frontend.readFrontendData(iFrontendInformation.signalPower)
elif what == self.AGC:
- return frontend.readFrontendData(iFrontendStatusInformation.signalQuality)
+ return frontend.readFrontendData(iFrontendInformation.signalQuality)
elif what == self.BER:
- return frontend.readFrontendData(iFrontendStatusInformation.bitErrorRate)
+ return frontend.readFrontendData(iFrontendInformation.bitErrorRate)
elif what == self.LOCK:
- return frontend.readFrontendData(iFrontendStatusInformation.LockState)
+ return frontend.readFrontendData(iFrontendInformation.lockState)
return 0
diff --git a/lib/python/Screens/ServiceInfo.py b/lib/python/Screens/ServiceInfo.py
index a4bb4e02..c1755d4b 100644
--- a/lib/python/Screens/ServiceInfo.py
+++ b/lib/python/Screens/ServiceInfo.py
@@ -68,7 +68,7 @@ class ServiceInfo(Screen):
service = session.nav.getCurrentService()
if service is not None:
self.info = service.info()
- self.feinfo = service.frontendStatusInfo()
+ self.feinfo = service.frontendInfo()
print self.info.getInfoObject(iServiceInformation.sCAIDs);
else:
self.info = None
diff --git a/lib/service/iservice.h b/lib/service/iservice.h
index a24b8b21..ca2348ca 100644
--- a/lib/service/iservice.h
+++ b/lib/service/iservice.h
@@ -285,25 +285,26 @@ public:
TEMPLATE_TYPEDEF(ePtr<iServiceInformation>, iServiceInformationPtr);
-class iFrontendStatusInformation: public iObject
+class iFrontendInformation: public iObject
{
#ifdef SWIG
- iFrontendStatusInformation();
- ~iFrontendStatusInformation();
+ iFrontendInformation();
+ ~iFrontendInformation();
#endif
public:
enum {
bitErrorRate,
signalPower,
signalQuality,
- LockState,
- SyncState
+ lockState,
+ syncState,
+ frontendNumber
};
virtual int getFrontendInfo(int w)=0;
virtual PyObject *getFrontendData(bool original=false)=0;
};
-TEMPLATE_TYPEDEF(ePtr<iFrontendStatusInformation>, iFrontendStatusInformationPtr);
+TEMPLATE_TYPEDEF(ePtr<iFrontendInformation>, iFrontendInformationPtr);
class iPauseableService: public iObject
{
@@ -475,7 +476,7 @@ public:
virtual SWIG_VOID(RESULT) audioTracks(ePtr<iAudioTrackSelection> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) audioChannel(ePtr<iAudioChannelSelection> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) subServices(ePtr<iSubserviceList> &SWIG_OUTPUT)=0;
- virtual SWIG_VOID(RESULT) frontendStatusInfo(ePtr<iFrontendStatusInformation> &SWIG_OUTPUT)=0;
+ virtual SWIG_VOID(RESULT) frontendInfo(ePtr<iFrontendInformation> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) timeshift(ePtr<iTimeshiftService> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) cueSheet(ePtr<iCueSheet> &SWIG_OUTPUT)=0;
};
@@ -492,6 +493,7 @@ public:
virtual RESULT prepare(const char *filename, time_t begTime=-1, time_t endTime=-1, int eit_event_id=-1)=0;
virtual RESULT start()=0;
virtual RESULT stop()=0;
+ virtual SWIG_VOID(RESULT) frontendInfo(ePtr<iFrontendInformation> &SWIG_OUTPUT)=0;
};
TEMPLATE_TYPEDEF(ePtr<iRecordableService>, iRecordableServicePtr);
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index b99357c5..928690d0 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -985,7 +985,7 @@ RESULT eDVBServicePlay::isCurrentlySeekable()
return m_is_pvr || m_timeshift_active;
}
-RESULT eDVBServicePlay::frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr)
+RESULT eDVBServicePlay::frontendInfo(ePtr<iFrontendInformation> &ptr)
{
ptr = this;
return 0;
@@ -1279,10 +1279,8 @@ RESULT eDVBServicePlay::selectChannel(int i)
}
}
-int eDVBServicePlay::getFrontendInfo(int w)
+int eDVBServiceBase::getFrontendInfo(int w)
{
- if (m_is_pvr)
- return 0;
eUsePtr<iDVBChannel> channel;
if(m_service_handler.getChannel(channel))
return 0;
@@ -1292,7 +1290,7 @@ int eDVBServicePlay::getFrontendInfo(int w)
return fe->readFrontendData(w);
}
-PyObject *eDVBServicePlay::getFrontendData(bool original)
+PyObject *eDVBServiceBase::getFrontendData(bool original)
{
PyObject *ret=0;
diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h
index 79e8d540..da307324 100644
--- a/lib/service/servicedvb.h
+++ b/lib/service/servicedvb.h
@@ -56,10 +56,20 @@ private:
eBouquet *m_bouquet;
};
-class eDVBServicePlay: public iPlayableService, public iPauseableService,
+class eDVBServiceBase: public iFrontendInformation
+{
+protected:
+ eDVBServicePMTHandler m_service_handler;
+public:
+ // iFrontendInformation
+ int getFrontendInfo(int w);
+ PyObject *getFrontendData(bool);
+};
+
+class eDVBServicePlay: public eDVBServiceBase,
+ public iPlayableService, public iPauseableService,
public iSeekableService, public Object, public iServiceInformation,
public iAudioTrackSelection, public iAudioChannelSelection,
- public iFrontendStatusInformation,
public iSubserviceList, public iTimeshiftService,
public iCueSheet
{
@@ -78,7 +88,7 @@ public:
RESULT info(ePtr<iServiceInformation> &ptr);
RESULT audioChannel(ePtr<iAudioChannelSelection> &ptr);
RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr);
- RESULT frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr);
+ RESULT frontendInfo(ePtr<iFrontendInformation> &ptr);
RESULT subServices(ePtr<iSubserviceList> &ptr);
RESULT timeshift(ePtr<iTimeshiftService> &ptr);
RESULT cueSheet(ePtr<iCueSheet> &ptr);
@@ -113,10 +123,6 @@ public:
int getCurrentChannel();
RESULT selectChannel(int i);
- // iFrontendStatusInformation
- int getFrontendInfo(int w);
- PyObject *getFrontendData(bool);
-
// iSubserviceList
int getNumberOfSubservices();
RESULT getSubservice(eServiceReference &subservice, unsigned int n);
@@ -142,7 +148,7 @@ private:
int m_is_primary;
/* in timeshift mode, we essentially have two channels, and thus pmt handlers. */
- eDVBServicePMTHandler m_service_handler, m_service_handler_timeshift;
+ eDVBServicePMTHandler m_service_handler_timeshift;
eDVBServiceEITHandler m_event_handler;
eDVBServicePlay(const eServiceReference &ref, eDVBService *service);
diff --git a/lib/service/servicedvbrecord.cpp b/lib/service/servicedvbrecord.cpp
index d0da074a..4c41b5ed 100644
--- a/lib/service/servicedvbrecord.cpp
+++ b/lib/service/servicedvbrecord.cpp
@@ -276,3 +276,9 @@ int eDVBServiceRecord::doRecord()
}
return 0;
}
+
+RESULT eDVBServiceRecord::frontendInfo(ePtr<iFrontendInformation> &ptr)
+{
+ ptr = this;
+ return 0;
+}
diff --git a/lib/service/servicedvbrecord.h b/lib/service/servicedvbrecord.h
index dd00ee8f..2b93b45a 100644
--- a/lib/service/servicedvbrecord.h
+++ b/lib/service/servicedvbrecord.h
@@ -10,7 +10,8 @@
#include <lib/service/servicedvb.h>
-class eDVBServiceRecord: public iRecordableService, public Object
+class eDVBServiceRecord: public eDVBServiceBase,
+ public iRecordableService, public Object
{
DECLARE_REF(eDVBServiceRecord);
public:
@@ -24,7 +25,6 @@ private:
eDVBServiceRecord(const eServiceReferenceDVB &ref);
eServiceReferenceDVB m_ref;
- eDVBServicePMTHandler m_service_handler;
void serviceEvent(int event);
ePtr<iDVBTSRecorder> m_record;
@@ -36,6 +36,7 @@ private:
int doPrepare();
int doRecord();
+ RESULT frontendInfo(ePtr<iFrontendInformation> &ptr);
};
#endif
diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h
index c6a0df06..e430dce0 100644
--- a/lib/service/servicemp3.h
+++ b/lib/service/servicemp3.h
@@ -60,7 +60,7 @@ public:
// not implemented (yet)
RESULT audioChannel(ePtr<iAudioChannelSelection> &ptr) { ptr = 0; return -1; }
RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr) { ptr = 0; return -1; }
- RESULT frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr) { ptr = 0; return -1; }
+ RESULT frontendInfo(ePtr<iFrontendInformation> &ptr) { ptr = 0; return -1; }
RESULT subServices(ePtr<iSubserviceList> &ptr) { ptr = 0; return -1; }
RESULT timeshift(ePtr<iTimeshiftService> &ptr) { ptr = 0; return -1; }
RESULT cueSheet(ePtr<iCueSheet>& ptr) { ptr = 0; return -1; }