+#if 0
+ if (m_timebase_change)
+ {
+ eDebug("timebase change: %d", m_timebase_change);
+ int offset;
+ for (offset = 0; offset < len; offset += 188)
+ {
+ unsigned char *pkt = (unsigned char*)_data + offset;
+ if (pkt[1] & 0x40) /* pusi */
+ {
+ if (pkt[3] & 0x20) // adaption field present?
+ pkt += pkt[4] + 4 + 1; /* skip adaption field and header */
+ else
+ pkt += 4; /* skip header */
+ if (pkt[0] || pkt[1] || (pkt[2] != 1))
+ {
+ eWarning("broken startcode");
+ continue;
+ }
+
+ pts_t pts = 0;
+
+ if (pkt[7] & 0x80) // PTS present?
+ {
+ pts = ((unsigned long long)(pkt[ 9]&0xE)) << 29;
+ pts |= ((unsigned long long)(pkt[10]&0xFF)) << 22;
+ pts |= ((unsigned long long)(pkt[11]&0xFE)) << 14;
+ pts |= ((unsigned long long)(pkt[12]&0xFF)) << 7;
+ pts |= ((unsigned long long)(pkt[13]&0xFE)) >> 1;
+
+#if 0
+ off_t off = 0;
+ RESULT r = m_tstools.fixupPTS(off, pts);
+ if (r)
+ eWarning("fixup PTS while trickmode playback failed.\n");
+#endif
+
+ int sec = pts / 90000;
+ int frm = pts % 90000;
+ int min = sec / 60;
+ sec %= 60;
+ int hr = min / 60;
+ min %= 60;
+ int d = hr / 24;
+ hr %= 24;
+
+// eDebug("original, fixed pts: %016llx %d:%02d:%02d:%02d:%05d", pts, d, hr, min, sec, frm);
+
+ pts += 0x80000000LL;
+ pts *= m_timebase_change;
+ pts >>= 16;
+
+ sec = pts / 90000;
+ frm = pts % 90000;
+ min = sec / 60;
+ sec %= 60;
+ hr = min / 60;
+ min %= 60;
+ d = hr / 24;
+ hr %= 24;
+
+// eDebug("new pts (after timebase change): %016llx %d:%02d:%02d:%02d:%05d", pts, d, hr, min, sec, frm);
+
+ pkt[9] &= ~0xE;
+ pkt[10] = 0;
+ pkt[11] &= ~1;
+ pkt[12] = 0;
+ pkt[13] &= ~1;
+
+ pkt[9] |= (pts >> 29) & 0xE;
+ pkt[10] |= (pts >> 22) & 0xFF;
+ pkt[11] |= (pts >> 14) & 0xFE;
+ pkt[12] |= (pts >> 7) & 0xFF;
+ pkt[13] |= (pts << 1) & 0xFE;
+ }
+ }
+ }
+ }
+#endif
+
+#if 1 /* not yet */