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!");
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)
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 */
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;
pts_t m_skipmode_ratio;
Signal1<void,int> m_event;
ePtr<iDVBDemux> m_decoding_demux;
+ ePtr<iTSMPEGDecoder> m_decoder;
};
class iDVBPVRChannel: public iDVBChannel
if (m_decode_demux)
m_decode_demux->getMPEGDecoder(m_decoder);
if (m_cue)
- m_cue->setDecodingDemux(m_decode_demux);
+ m_cue->setDecodingDemux(m_decode_demux, m_decoder);
}
if (m_decoder)