aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/dvb.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-11-13 04:28:50 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-11-13 04:28:50 +0000
commita1579bb7cb05ea1265204103b2dd4007c8f817c5 (patch)
treeaa538637cabf928d6103eb817719baa92156100e /lib/dvb/dvb.cpp
parent6d2e4a11c8c6ac882edfaee16fe9036955150ad0 (diff)
downloadenigma2-a1579bb7cb05ea1265204103b2dd4007c8f817c5.tar.gz
enigma2-a1579bb7cb05ea1265204103b2dd4007c8f817c5.zip
add seekToPosition to DVBChannel
Diffstat (limited to 'lib/dvb/dvb.cpp')
-rw-r--r--lib/dvb/dvb.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index 13ae224c..a2a37758 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -619,11 +619,30 @@ RESULT eDVBChannel::getCurrentPosition(pts_t &pos)
RESULT eDVBChannel::seekTo(pts_t &pts)
{
+#if 0
+ eDebug("eDVBChannel: seekTo .. %llx", pts);
m_pvr_thread->pause();
if (m_decoder_demux)
m_decoder_demux->get().flush();
/* demux will also flush all decoder.. */
-// m_pvr_thread->seek(pts);
+
+ off_t r;
+
+ if (!m_tstools.getPosition(pts, r));
+ m_pvr_thread->seek(r);
+ else
+ eDebug("getPosition failed!");
m_pvr_thread->resume();
+#endif
}
+RESULT eDVBChannel::seekToPosition(int relative, const off_t &r)
+{
+ eDebug("eDVBChannel: seekToPosition .. %llx", r);
+ m_pvr_thread->pause();
+ if (m_decoder_demux)
+ m_decoder_demux->get().flush();
+ /* demux will also flush all decoder.. */
+ m_pvr_thread->seek(relative ? SEEK_CUR : SEEK_SET, r);
+ m_pvr_thread->resume();
+}