}
}
+int eDVBTSTools::getOffset(off_t &offset, pts_t &pts)
+{
+ if (m_use_streaminfo)
+ {
+ offset = m_streaminfo.getAccessPoint(pts);
+ return 0;
+ } else
+ {
+ int bitrate = calcBitrate(); /* in bits/s */
+ if (bitrate <= 0)
+ return -1;
+
+ offset = (pts * (pts_t)bitrate) / 8ULL / 90000ULL;
+ offset -= offset % 188;
+
+ return 0;
+ }
+}
+
+int eDVBTSTools::getNextAccessPoint(pts_t &ts, const pts_t &start, int direction)
+{
+ if (m_use_streaminfo)
+ return m_streaminfo.getNextAccessPoint(ts, start, direction);
+ else
+ {
+ eDebug("can't get next access point without streaminfo");
+ return -1;
+ }
+}
+
void eDVBTSTools::calcBegin()
{
if (m_fd < 0)