no more hold unneeded descriptors in epgcache (lower memory consumption)
[enigma2.git] / lib / dvb / radiotext.h
1 #ifndef __lib_dvb_radiotext_h
2 #define __lib_dvb_radiotext_h
3
4 #include <lib/base/object.h>
5 #include <lib/dvb/idvb.h>
6 #include <lib/dvb/pesparse.h>
7 #include <lib/gdi/gpixmap.h>
8
9 class eDVBRadioTextParser: public iObject, public ePESParser, public Object
10 {
11         DECLARE_REF(eDVBRadioTextParser);
12         int bytesread, ptr, p1, p2, msgPtr;
13         unsigned char buf[128], message[66], leninfo, todo, state;
14         unsigned short crc16, crc;
15 public:
16         eDVBRadioTextParser(iDVBDemux *demux);
17         int start(int pid);
18         void connectUpdatedRadiotext(const Slot0<void> &slot, ePtr<eConnection> &connection);
19         const char *getCurrentText() { return msgPtr ? (const char*)message : ""; }
20 private:
21         void processPESPacket(__u8 *pkt, int len);
22         void gotAncillaryByte(__u8 data);
23         ePtr<iDVBPESReader> m_pes_reader;
24         ePtr<eConnection> m_read_connection;
25         Signal0<void> m_updated_radiotext;
26 };
27
28 #endif