aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/dvb.cpp21
-rw-r--r--lib/dvb/dvb.h1
-rw-r--r--lib/dvb/idvb.h3
3 files changed, 22 insertions, 3 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();
+}
diff --git a/lib/dvb/dvb.h b/lib/dvb/dvb.h
index f8586257..01a0e47e 100644
--- a/lib/dvb/dvb.h
+++ b/lib/dvb/dvb.h
@@ -193,6 +193,7 @@ public:
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<eDVBAllocatedFrontend> m_frontend;
diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h
index bd528f06..de481d7f 100644
--- a/lib/dvb/idvb.h
+++ b/lib/dvb/idvb.h
@@ -481,8 +481,7 @@ public:
virtual RESULT getLength(pts_t &pts) = 0;
virtual RESULT getCurrentPosition(pts_t &pos) = 0;
virtual RESULT seekTo(pts_t &pts) = 0;
-
- // seekTo ...
+ virtual RESULT seekToPosition(int relative, const off_t &pts) = 0;
};
class iDVBSectionReader;