eDebug("FE_READ_SIGNAL_STRENGTH failed (%m)");
return strength;
}
- case Locked:
+ case locked:
{
#if HAVE_DVB_API_VERSION < 3
FrontendStatus status=0;
eDebug("FE_READ_STATUS failed (%m)");
return !!(status&FE_HAS_LOCK);
}
- case Synced:
+ case synced:
{
#if HAVE_DVB_API_VERSION < 3
FrontendStatus status=0;
eDebug("FE_READ_STATUS failed (%m)");
return !!(status&FE_HAS_SYNC);
}
+ case frontendNumber:
+ return m_fe;
}
return 0;
}
}
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));
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;
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);
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;
from GUIComponent import GUIComponent
-from enigma import eLabel, eSlider, iFrontendStatusInformation
+from enigma import eLabel, eSlider, iFrontendInformation
from math import log
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
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
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
{
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;
};
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);
return m_is_pvr || m_timeshift_active;
}
-RESULT eDVBServicePlay::frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr)
+RESULT eDVBServicePlay::frontendInfo(ePtr<iFrontendInformation> &ptr)
{
ptr = this;
return 0;
}
}
-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;
return fe->readFrontendData(w);
}
-PyObject *eDVBServicePlay::getFrontendData(bool original)
+PyObject *eDVBServiceBase::getFrontendData(bool original)
{
PyObject *ret=0;
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
{
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);
int getCurrentChannel();
RESULT selectChannel(int i);
- // iFrontendStatusInformation
- int getFrontendInfo(int w);
- PyObject *getFrontendData(bool);
-
// iSubserviceList
int getNumberOfSubservices();
RESULT getSubservice(eServiceReference &subservice, unsigned int n);
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);
}
return 0;
}
+
+RESULT eDVBServiceRecord::frontendInfo(ePtr<iFrontendInformation> &ptr)
+{
+ ptr = this;
+ return 0;
+}
#include <lib/service/servicedvb.h>
-class eDVBServiceRecord: public iRecordableService, public Object
+class eDVBServiceRecord: public eDVBServiceBase,
+ public iRecordableService, public Object
{
DECLARE_REF(eDVBServiceRecord);
public:
eDVBServiceRecord(const eServiceReferenceDVB &ref);
eServiceReferenceDVB m_ref;
- eDVBServicePMTHandler m_service_handler;
void serviceEvent(int event);
ePtr<iDVBTSRecorder> m_record;
int doPrepare();
int doRecord();
+ RESULT frontendInfo(ePtr<iFrontendInformation> &ptr);
};
#endif
// 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; }