git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
port tuxbox plugins plugin to the new plugin interface
[enigma2.git]
/
lib
/
dvb
/
dvb.cpp
diff --git
a/lib/dvb/dvb.cpp
b/lib/dvb/dvb.cpp
index 11b1285a702d7cbec6dd6b8ed41137bbe0db1d56..a126aae719969d51df087b4676d0ba540d1a6ff2 100644
(file)
--- 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;
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!");
if (getCurrentPosition(m_cue->m_decoding_demux, now, 1))
{
eDebug("seekTo: getCurrentPosition failed!");
@@
-997,15
+1005,19
@@
RESULT eDVBChannel::getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos, in
return -1;
pts_t now;
return -1;
pts_t now;
+
int r;
int r;
- /* TODO: this is a gross hack. */
- r = decoding_demux->getSTC(now, mode ? 128 : 0);
-
- if (r)
+
+ if (mode == 0) /* demux */
{
{
- eDebug("demux getSTC failed");
- return -1;
- }
+ r = decoding_demux->getSTC(now, 0);
+ if (r)
+ {
+ eDebug("demux getSTC failed");
+ return -1;
+ }
+ } else
+ now = pos; /* fixup supplied */
off_t off = 0; /* TODO: fixme */
r = m_tstools.fixupPTS(off, now);
off_t off = 0; /* TODO: fixme */
r = m_tstools.fixupPTS(off, now);
@@
-1088,9
+1100,10
@@
void eCueSheet::setSkipmode(const pts_t &ratio)
m_event(evtSkipmode);
}
m_event(evtSkipmode);
}
-void eCueSheet::setDecodingDemux(iDVBDemux *demux)
+void eCueSheet::setDecodingDemux(iDVBDemux *demux
, iTSMPEGDecoder *decoder
)
{
m_decoding_demux = demux;
{
m_decoding_demux = demux;
+ m_decoder = decoder;
}
RESULT eCueSheet::connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection)
}
RESULT eCueSheet::connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection)