aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/dvb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dvb/dvb.cpp')
-rw-r--r--lib/dvb/dvb.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index f20ce8a2..6a0211ec 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -607,6 +607,17 @@ void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
}
}
+void eDVBChannel::pvrEvent(int event)
+{
+ switch (event)
+ {
+ case eFilePushThread::evtEOF:
+ eDebug("eDVBChannel: End of file!");
+ m_event(this, evtEOF);
+ break;
+ }
+}
+
void eDVBChannel::AddUse()
{
++m_use_count;
@@ -658,6 +669,12 @@ RESULT eDVBChannel::connectStateChange(const Slot1<void,iDVBChannel*> &stateChan
return 0;
}
+RESULT eDVBChannel::connectEvent(const Slot2<void,iDVBChannel*,int> &event, ePtr<eConnection> &connection)
+{
+ connection = new eConnection((iDVBChannel*)this, m_event.connect(event));
+ return 0;
+}
+
RESULT eDVBChannel::getState(int &state)
{
state = m_state;
@@ -733,6 +750,7 @@ RESULT eDVBChannel::playFile(const char *file)
m_pvr_thread = new eFilePushThread();
m_pvr_thread->start(m_pvr_fd_src, m_pvr_fd_dst);
+ CONNECT(m_pvr_thread->m_event, eDVBChannel::pvrEvent);
return 0;
}