diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-04-17 15:45:23 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-04-17 15:45:23 +0000 |
| commit | 225c99450eab2aba7aa0e8ea3d2ff73da2910d46 (patch) | |
| tree | 8abdeb3514c10a81d79f418028758e129c68be68 /lib/base/filepush.cpp | |
| parent | bf199875386cd93ad37c3a9541b5a98ada9f608c (diff) | |
| download | enigma2-225c99450eab2aba7aa0e8ea3d2ff73da2910d46.tar.gz enigma2-225c99450eab2aba7aa0e8ea3d2ff73da2910d46.zip | |
add stream-mode to filepush, which will retry on eof until stream grows
Diffstat (limited to 'lib/base/filepush.cpp')
| -rw-r--r-- | lib/base/filepush.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/base/filepush.cpp b/lib/base/filepush.cpp index 8424ae41..92c580c2 100644 --- a/lib/base/filepush.cpp +++ b/lib/base/filepush.cpp @@ -11,6 +11,8 @@ eFilePushThread::eFilePushThread(int io_prio_class, int io_prio_level) { m_stop = 0; m_sg = 0; + m_send_pvr_commit = 0; + m_stream_mode = 0; flush(); enablePVRCommit(0); CONNECT(m_messagepump.recv_msg, eFilePushThread::recvEvent); @@ -128,7 +130,19 @@ void eFilePushThread::thread() /* well check again */ continue; } + + /* in stream_mode, we are sending EOF events + over and over until somebody responds. + + in stream_mode, think of evtEOF as "buffer underrun occured". */ sendEvent(evtEOF); + + if (m_stream_mode) + { + eDebug("reached EOF, but we are in stream mode. delaying 1 second."); + sleep(1); + continue; + } #if 0 eDebug("FILEPUSH: end-of-file! (currently unhandled)"); if (!m_raw_source.lseek(0, SEEK_SET)) @@ -214,6 +228,11 @@ void eFilePushThread::enablePVRCommit(int s) m_send_pvr_commit = s; } +void eFilePushThread::setStreamMode(int s) +{ + m_stream_mode = s; +} + void eFilePushThread::setScatterGather(iFilePushScatterGather *sg) { m_sg = sg; |
