eDebug("skipmode ratio is %lld:90000, bitrate is %d bit/s", m_cue->m_skipmode_ratio, bitrate);
/* i agree that this might look a bit like black magic. */
m_skipmode_n = 512*1024; /* must be 1 iframe at least. */
- m_skipmode_m = bitrate / 8 / 90000 * m_cue->m_skipmode_ratio;
+ m_skipmode_m = bitrate / 8 / 90000 * m_cue->m_skipmode_ratio / 8;
eDebug("resolved to: %d %d", m_skipmode_m, m_skipmode_n);
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)