diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-06-13 09:57:56 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-06-13 09:57:56 +0000 |
| commit | 2e0270746af934180499931f95ed91c444c8233e (patch) | |
| tree | 8a3347e3ba191a05067d2ad43b23c221d9cc9fff /lib/dvb | |
| parent | 86470f194147f01561a0d371eb8eb8977eccaa93 (diff) | |
| download | enigma2-2e0270746af934180499931f95ed91c444c8233e.tar.gz enigma2-2e0270746af934180499931f95ed91c444c8233e.zip | |
after DECLARE_REF now all is private.. not public
dont export AddRef, Release, ptrref and grabRef to python
some cleanups
Diffstat (limited to 'lib/dvb')
| -rw-r--r-- | lib/dvb/db.h | 4 | ||||
| -rw-r--r-- | lib/dvb/decoder.h | 11 | ||||
| -rw-r--r-- | lib/dvb/demux.h | 2 | ||||
| -rw-r--r-- | lib/dvb/dvb.cpp | 23 | ||||
| -rw-r--r-- | lib/dvb/dvb.h | 10 | ||||
| -rw-r--r-- | lib/dvb/dvbtime.h | 2 | ||||
| -rw-r--r-- | lib/dvb/esection.h | 3 | ||||
| -rw-r--r-- | lib/dvb/frontend.h | 40 | ||||
| -rw-r--r-- | lib/dvb/list.h | 1 | ||||
| -rw-r--r-- | lib/dvb/radiotext.h | 2 | ||||
| -rw-r--r-- | lib/dvb/scan.h | 3 | ||||
| -rw-r--r-- | lib/dvb/sec.h | 2 |
12 files changed, 50 insertions, 53 deletions
diff --git a/lib/dvb/db.h b/lib/dvb/db.h index 0947b345..512f81e4 100644 --- a/lib/dvb/db.h +++ b/lib/dvb/db.h @@ -10,8 +10,8 @@ class ServiceDescriptionSection; class eDVBDB: public iDVBChannelList { + DECLARE_REF(eDVBDB); static eDVBDB *instance; -DECLARE_REF(eDVBDB); friend class eDVBDBQuery; friend class eDVBDBBouquetQuery; friend class eDVBDBSatellitesQuery; @@ -75,7 +75,7 @@ public: // we have to add a possibility to invalidate here. class eDVBDBQueryBase: public iDVBChannelListQuery { -DECLARE_REF(eDVBDBQueryBase); + DECLARE_REF(eDVBDBQueryBase); protected: ePtr<eDVBDB> m_db; ePtr<eDVBChannelQuery> m_query; diff --git a/lib/dvb/decoder.h b/lib/dvb/decoder.h index 409a4421..7dfe3834 100644 --- a/lib/dvb/decoder.h +++ b/lib/dvb/decoder.h @@ -8,7 +8,7 @@ class eSocketNotifier; class eDVBAudio: public iObject { -DECLARE_REF(eDVBAudio); + DECLARE_REF(eDVBAudio); private: ePtr<eDVBDemux> m_demux; int m_fd, m_fd_demux, m_dev, m_is_freezed; @@ -36,7 +36,7 @@ public: class eDVBVideo: public iObject, public Object { -DECLARE_REF(eDVBVideo); + DECLARE_REF(eDVBVideo); private: ePtr<eDVBDemux> m_demux; int m_fd, m_fd_demux, m_dev; @@ -71,7 +71,7 @@ public: class eDVBPCR: public iObject { -DECLARE_REF(eDVBPCR); + DECLARE_REF(eDVBPCR); private: ePtr<eDVBDemux> m_demux; int m_fd_demux; @@ -89,7 +89,7 @@ public: class eDVBTText: public iObject { -DECLARE_REF(eDVBTText); + DECLARE_REF(eDVBTText); private: ePtr<eDVBDemux> m_demux; int m_fd_demux; @@ -102,10 +102,11 @@ public: class eTSMPEGDecoder: public Object, public iTSMPEGDecoder { + DECLARE_REF(eTSMPEGDecoder); +private: static int m_pcm_delay; static int m_ac3_delay; static int m_audio_channel; -DECLARE_REF(eTSMPEGDecoder); std::string m_radio_pic; ePtr<eDVBDemux> m_demux; ePtr<eDVBAudio> m_audio; diff --git a/lib/dvb/demux.h b/lib/dvb/demux.h index e3759331..3541974e 100644 --- a/lib/dvb/demux.h +++ b/lib/dvb/demux.h @@ -47,7 +47,6 @@ private: class eDVBSectionReader: public iDVBSectionReader, public Object { DECLARE_REF(eDVBSectionReader); -private: int fd; Signal1<void, const __u8*> read; ePtr<eDVBDemux> demux; @@ -67,7 +66,6 @@ public: class eDVBPESReader: public iDVBPESReader, public Object { DECLARE_REF(eDVBPESReader); -private: int m_fd; Signal2<void, const __u8*, int> m_read; ePtr<eDVBDemux> m_demux; diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index f5ca483e..23a9d5a9 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -320,10 +320,11 @@ RESULT eDVBResourceManager::allocateFrontendByIndex(ePtr<eDVBAllocatedFrontend> if (!i->m_inuse && i->m_frontend->getSlotID() == slot_index) { // check if another slot linked to this is in use - eDVBRegisteredFrontend *satpos_depends_to_fe = - (eDVBRegisteredFrontend*) i->m_frontend->m_data[eDVBFrontend::SATPOS_DEPENDS_PTR]; - if ( (long)satpos_depends_to_fe != -1 ) + long tmp; + i->m_frontend->getData(eDVBFrontend::SATPOS_DEPENDS_PTR, tmp); + if ( tmp != -1 ) { + eDVBRegisteredFrontend *satpos_depends_to_fe = (eDVBRegisteredFrontend *)tmp; if (satpos_depends_to_fe->m_inuse) { eDebug("another satpos depending frontend is in use.. so allocateFrontendByIndex not possible!"); @@ -333,29 +334,29 @@ RESULT eDVBResourceManager::allocateFrontendByIndex(ePtr<eDVBAllocatedFrontend> } else // check linked tuners { - eDVBRegisteredFrontend *next = - (eDVBRegisteredFrontend *) i->m_frontend->m_data[eDVBFrontend::LINKED_NEXT_PTR]; - while ( (long)next != -1 ) + i->m_frontend->getData(eDVBFrontend::LINKED_NEXT_PTR, tmp); + while ( tmp != -1 ) { + eDVBRegisteredFrontend *next = (eDVBRegisteredFrontend *) tmp; if (next->m_inuse) { eDebug("another linked frontend is in use.. so allocateFrontendByIndex not possible!"); err = errAllSourcesBusy; goto alloc_fe_by_id_not_possible; } - next = (eDVBRegisteredFrontend *)next->m_frontend->m_data[eDVBFrontend::LINKED_NEXT_PTR]; + next->m_frontend->getData(eDVBFrontend::LINKED_NEXT_PTR, tmp); } - eDVBRegisteredFrontend *prev = (eDVBRegisteredFrontend *) - i->m_frontend->m_data[eDVBFrontend::LINKED_PREV_PTR]; - while ( (long)prev != -1 ) + i->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp); + while ( tmp != -1 ) { + eDVBRegisteredFrontend *prev = (eDVBRegisteredFrontend *) tmp; if (prev->m_inuse) { eDebug("another linked frontend is in use.. so allocateFrontendByIndex not possible!"); err = errAllSourcesBusy; goto alloc_fe_by_id_not_possible; } - prev = (eDVBRegisteredFrontend *)prev->m_frontend->m_data[eDVBFrontend::LINKED_PREV_PTR]; + prev->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp); } } fe = new eDVBAllocatedFrontend(i); diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h index d2148bc9..2fca347d 100644 --- a/lib/dvb/dvb.h +++ b/lib/dvb/dvb.h @@ -23,13 +23,13 @@ class eDVBRegisteredFrontend: public iObject, public Object { DECLARE_REF(eDVBRegisteredFrontend); eTimer *disable; - Signal0<void> stateChanged; void closeFrontend() { if (!m_inuse && m_frontend->closeFrontend()) // frontend busy disable->start(60000, true); // retry close in 60secs } public: + Signal0<void> stateChanged; eDVBRegisteredFrontend(eDVBFrontend *fe, iDVBAdapter *adap) :disable(new eTimer(eApp)), m_adapter(adap), m_frontend(fe), m_inuse(0) { @@ -62,7 +62,7 @@ public: struct eDVBRegisteredDemux { -DECLARE_REF(eDVBRegisteredDemux); + DECLARE_REF(eDVBRegisteredDemux); public: iDVBAdapter *m_adapter; ePtr<eDVBDemux> m_demux; @@ -72,7 +72,7 @@ public: class eDVBAllocatedFrontend { -DECLARE_REF(eDVBAllocatedFrontend); + DECLARE_REF(eDVBAllocatedFrontend); public: eDVBAllocatedFrontend(eDVBRegisteredFrontend *fe); @@ -87,7 +87,7 @@ private: class eDVBAllocatedDemux { -DECLARE_REF(eDVBAllocatedDemux); + DECLARE_REF(eDVBAllocatedDemux); public: eDVBAllocatedDemux(eDVBRegisteredDemux *demux); @@ -112,7 +112,7 @@ public: class eDVBAdapterLinux: public iDVBAdapter { -DECLARE_REF(eDVBAdapterLinux); + DECLARE_REF(eDVBAdapterLinux); public: eDVBAdapterLinux(int nr); diff --git a/lib/dvb/dvbtime.h b/lib/dvb/dvbtime.h index debbbff9..ffcfaa41 100644 --- a/lib/dvb/dvbtime.h +++ b/lib/dvb/dvbtime.h @@ -46,6 +46,7 @@ public: class eDVBLocalTimeHandler: public Object { + DECLARE_REF(eDVBLocalTimeHandler); struct channel_data { TDT *tdt; @@ -54,7 +55,6 @@ class eDVBLocalTimeHandler: public Object int m_prevChannelState; }; friend class TDT; - DECLARE_REF(eDVBLocalTimeHandler) std::map<iDVBChannel*, channel_data> m_knownChannels; std::map<eDVBChannelID,int> m_timeOffsetMap; ePtr<eConnection> m_chanAddedConn; diff --git a/lib/dvb/esection.h b/lib/dvb/esection.h index 98d53b48..5dc84ec6 100644 --- a/lib/dvb/esection.h +++ b/lib/dvb/esection.h @@ -6,8 +6,7 @@ class eGTable: public iObject, public Object { -DECLARE_REF(eGTable); -private: + DECLARE_REF(eGTable); ePtr<iDVBSectionReader> m_reader; eDVBTableSpec m_table; diff --git a/lib/dvb/frontend.h b/lib/dvb/frontend.h index ac681bbe..bbfd174d 100644 --- a/lib/dvb/frontend.h +++ b/lib/dvb/frontend.h @@ -41,6 +41,25 @@ class eSecCommandList; class eDVBFrontend: public iDVBFrontend, public Object { +public: + enum { + CSW, // state of the committed switch + UCSW, // state of the uncommitted switch + TONEBURST, // current state of toneburst switch + NEW_ROTOR_CMD, // prev sent rotor cmd + NEW_ROTOR_POS, // new rotor position (not validated) + ROTOR_CMD, // completed rotor cmd (finalized) + ROTOR_POS, // current rotor position + LINKED_PREV_PTR, // prev double linked list (for linked FEs) + LINKED_NEXT_PTR, // next double linked list (for linked FEs) + SATPOS_DEPENDS_PTR, // pointer to FE with configured rotor (with twin/quattro lnb) + FREQ_OFFSET, // current frequency offset + CUR_VOLTAGE, // current voltage + CUR_TONE, // current continuous tone + NUM_DATA_ENTRIES + }; + Signal1<void,iDVBFrontend*> m_stateChanged; +private: DECLARE_REF(eDVBFrontend); bool m_enabled; int m_type; @@ -54,10 +73,8 @@ class eDVBFrontend: public iDVBFrontend, public Object int m_secfd; char m_sec_filename[128]; #endif - FRONTENDPARAMETERS parm; int m_state; - Signal1<void,iDVBFrontend*> m_stateChanged; ePtr<iDVBSatelliteEquipmentControl> m_sec; eSocketNotifier *m_sn; int m_tuning; @@ -66,23 +83,6 @@ class eDVBFrontend: public iDVBFrontend, public Object eSecCommandList m_sec_sequence; - enum { - CSW, // state of the committed switch - UCSW, // state of the uncommitted switch - TONEBURST, // current state of toneburst switch - NEW_ROTOR_CMD, // prev sent rotor cmd - NEW_ROTOR_POS, // new rotor position (not validated) - ROTOR_CMD, // completed rotor cmd (finalized) - ROTOR_POS, // current rotor position - LINKED_PREV_PTR, // prev double linked list (for linked FEs) - LINKED_NEXT_PTR, // next double linked list (for linked FEs) - SATPOS_DEPENDS_PTR, // pointer to FE with configured rotor (with twin/quattro lnb) - FREQ_OFFSET, // current frequency offset - CUR_VOLTAGE, // current voltage - CUR_TONE, // current continuous tone - NUM_DATA_ENTRIES - }; - long m_data[NUM_DATA_ENTRIES]; int m_idleInputpower[2]; // 13V .. 18V @@ -95,7 +95,6 @@ class eDVBFrontend: public iDVBFrontend, public Object void timeout(); void tuneLoop(); // called by m_tuneTimer void setFrontend(); - int readInputpower(); bool setSecSequencePos(int steps); void setRotorData(int pos, int cmd); static int PriorityOrder; @@ -103,6 +102,7 @@ public: eDVBFrontend(int adap, int fe, int &ok); virtual ~eDVBFrontend(); + int readInputpower(); RESULT getFrontendType(int &type); RESULT tune(const iDVBFrontendParameters &where); RESULT prepare_sat(const eDVBFrontendParametersSatellite &, unsigned int timeout); diff --git a/lib/dvb/list.h b/lib/dvb/list.h index 80ad20e8..80faca1f 100644 --- a/lib/dvb/list.h +++ b/lib/dvb/list.h @@ -4,7 +4,6 @@ class eDVBTransponderList: iDVBChannelList { DECLARE_REF(eDVBTransponderList); -private: std::map<eDVBChannelID, ePtr<iDVBFrontendParameters> > channels; public: virtual RESULT getChannelFrontendData(const eDVBChannelID &id, ePtr<iDVBFrontendParameters> &parm)=0; diff --git a/lib/dvb/radiotext.h b/lib/dvb/radiotext.h index 8c354ff1..634352f7 100644 --- a/lib/dvb/radiotext.h +++ b/lib/dvb/radiotext.h @@ -15,11 +15,11 @@ class eDVBRdsDecoder: public iObject, public ePESParser, public Object unsigned char qdar[60*1024]; //60 kB for holding Rass qdar archive unsigned short crc16, crc; long part, parts, partcnt; - enum { RadioTextChanged, RtpTextChanged, RassInteractivePicMaskChanged, RecvRassSlidePic }; unsigned char rass_picture_mask[5]; // 40 bits... (10 * 4 pictures) void addToPictureMask(int id); void removeFromPictureMask(int id); public: + enum { RadioTextChanged, RtpTextChanged, RassInteractivePicMaskChanged, RecvRassSlidePic }; eDVBRdsDecoder(iDVBDemux *demux); ~eDVBRdsDecoder(); int start(int pid); diff --git a/lib/dvb/scan.h b/lib/dvb/scan.h index 6dcbe707..68e21a5d 100644 --- a/lib/dvb/scan.h +++ b/lib/dvb/scan.h @@ -11,8 +11,7 @@ class eDVBScan: public Object, public iObject { -DECLARE_REF(eDVBScan); -private: + DECLARE_REF(eDVBScan); /* chid helper functions: */ /* heuristically determine if onid/tsid is valid */ diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index 2241e00e..18935b97 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -243,6 +243,7 @@ class eDVBRegisteredFrontend; class eDVBSatelliteEquipmentControl: public iDVBSatelliteEquipmentControl { + DECLARE_REF(eDVBSatelliteEquipmentControl); public: enum { DELAY_AFTER_CONT_TONE=0, // delay after continuous tone change @@ -280,7 +281,6 @@ private: public: #ifndef SWIG eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends); - DECLARE_REF(eDVBSatelliteEquipmentControl); RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id, unsigned int tunetimeout); int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *, int frontend_id); bool currentLNBValid() { return m_lnbidx > -1 && m_lnbidx < (int)(sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters)); } |
