aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-17 16:59:54 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-17 16:59:54 +0000
commit8654739391001e76f8a6e571537f8b0f42999294 (patch)
treec568a9b84a47c69328f5004a3b64f85919cc6b97 /lib/dvb
parentb96f203b700c91e463eff20889d734119530bce0 (diff)
downloadenigma2-8654739391001e76f8a6e571537f8b0f42999294.tar.gz
enigma2-8654739391001e76f8a6e571537f8b0f42999294.zip
fix relative jumps
Diffstat (limited to 'lib/dvb')
-rw-r--r--lib/dvb/dvb.cpp15
-rw-r--r--lib/dvb/idvb.h4
2 files changed, 15 insertions, 4 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index 4a3adf55..a126aae7 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -766,8 +766,16 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off
if (relative)
{
pts_t now;
- /* we're using the decoder's timestamp here. this
- won't work for radio (ouch). */
+ if (!m_cue->m_decoder)
+ {
+ eDebug("no decoder - can't seek relative");
+ continue;
+ }
+ if (m_cue->m_decoder->getPTS(0, now))
+ {
+ eDebug("decoder getPTS failed, can't seek relative");
+ continue;
+ }
if (getCurrentPosition(m_cue->m_decoding_demux, now, 1))
{
eDebug("seekTo: getCurrentPosition failed!");
@@ -1092,9 +1100,10 @@ void eCueSheet::setSkipmode(const pts_t &ratio)
m_event(evtSkipmode);
}
-void eCueSheet::setDecodingDemux(iDVBDemux *demux)
+void eCueSheet::setDecodingDemux(iDVBDemux *demux, iTSMPEGDecoder *decoder)
{
m_decoding_demux = demux;
+ m_decoder = decoder;
}
RESULT eCueSheet::connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection)
diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h
index 2f9d7d9b..2090d188 100644
--- a/lib/dvb/idvb.h
+++ b/lib/dvb/idvb.h
@@ -426,6 +426,7 @@ public:
typedef long long pts_t;
class iFilePushScatterGather;
+class iTSMPEGDecoder;
/* note that a cue sheet describes the logical positions. thus
everything is specified in pts and not file positions */
@@ -444,7 +445,7 @@ public:
void addSourceSpan(const pts_t &begin, const pts_t &end);
void setSkipmode(const pts_t &ratio); /* 90000 is 1:1 */
- void setDecodingDemux(iDVBDemux *demux);
+ void setDecodingDemux(iDVBDemux *demux, iTSMPEGDecoder *decoder);
/* frontend and backend */
eSingleLock m_lock;
@@ -458,6 +459,7 @@ public:
pts_t m_skipmode_ratio;
Signal1<void,int> m_event;
ePtr<iDVBDemux> m_decoding_demux;
+ ePtr<iTSMPEGDecoder> m_decoder;
};
class iDVBPVRChannel: public iDVBChannel