X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/e39c12fcbf218f0964782a48d6e66145e1ce5039..479df2313449286767814bc0c89624fdd45d2a2d:/lib/dvb/dvb.h diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h index bb9e2689..01a0e47e 100644 --- a/lib/dvb/dvb.h +++ b/lib/dvb/dvb.h @@ -4,6 +4,7 @@ #include #include #include +#include #include class eDVBChannel; @@ -116,7 +117,7 @@ class eDVBResourceManager: public iObject RESULT allocateFrontend(const eDVBChannelID &chid, ePtr &fe); /* allocate a demux able to filter on the selected frontend. */ - RESULT allocateDemux(eDVBRegisteredFrontend *fe, ePtr &demux); + RESULT allocateDemux(eDVBRegisteredFrontend *fe, ePtr &demux, int cap); struct active_channel { @@ -158,19 +159,45 @@ public: /* allocate channel... */ RESULT allocateChannel(const eDVBChannelID &channelid, eUsePtr &channel); RESULT allocateRawChannel(eUsePtr &channel); - RESULT allocatePVRChannel(int caps); + RESULT allocatePVRChannel(eUsePtr &channel); RESULT connectChannelAdded(const Slot1 &channelAdded, ePtr &connection); RESULT connectChannelRemoved(const Slot1 &channelRemoved, ePtr &connection); RESULT connectChannelRunning(const Slot1 &channelRemoved, ePtr &connection); }; -class eDVBChannel: public iDVBChannel, public Object +class eFilePushThread; + + /* iDVBPVRChannel includes iDVBChannel. don't panic. */ +class eDVBChannel: public iDVBPVRChannel, public Object { DECLARE_REF(eDVBChannel); +public: + eDVBChannel(eDVBResourceManager *mgr, eDVBAllocatedFrontend *frontend); + virtual ~eDVBChannel(); + + /* only for managed channels - effectively tunes to the channelid. should not be used... */ + /* cannot be used for PVR channels. */ + RESULT setChannel(const eDVBChannelID &id); + eDVBChannelID getChannelID() { return m_channel_id; } + + RESULT connectStateChange(const Slot1 &stateChange, ePtr &connection); + RESULT getState(int &state); + + RESULT setCIRouting(const eDVBCIRouting &routing); + RESULT getDemux(ePtr &demux, int cap); + RESULT getFrontend(ePtr &frontend); + + /* iDVBPVRChannel */ + RESULT playFile(const char *file); + RESULT getLength(pts_t &len); + RESULT getCurrentPosition(pts_t &pos); + RESULT seekTo(pts_t &pts); + RESULT seekToPosition(int relative, const off_t &off); + private: ePtr m_frontend; - ePtr m_demux; + ePtr m_demux, m_decoder_demux; ePtr m_current_frontend_parameters; eDVBChannelID m_channel_id; @@ -183,24 +210,16 @@ private: void frontendStateChanged(iDVBFrontend*fe); ePtr m_conn_frontendStateChanged; + /* for PVR playback */ + eFilePushThread *m_pvr_thread; + int m_pvr_fd_src, m_pvr_fd_dst; + eDVBTSTools m_tstools; + + friend class eUsePtr; /* use count */ oRefCount m_use_count; void AddUse(); void ReleaseUse(); -public: - eDVBChannel(eDVBResourceManager *mgr, eDVBAllocatedFrontend *frontend, eDVBAllocatedDemux *demux); - virtual ~eDVBChannel(); - - /* only for managed channels - effectively tunes to the channelid. should not be used... */ - RESULT setChannel(const eDVBChannelID &id); - eDVBChannelID getChannelID() { return m_channel_id; } - - RESULT connectStateChange(const Slot1 &stateChange, ePtr &connection); - RESULT getState(int &state); - - RESULT setCIRouting(const eDVBCIRouting &routing); - RESULT getDemux(ePtr &demux); - RESULT getFrontend(ePtr &frontend); }; #endif