Beispiel #1
0
 protected void pes(ByteBuffer pesBuffer, long start, int pesLen, int stream) {
   if (!mediaStream(stream)) return;
   PESPacket pesHeader = readPESHeader(pesBuffer, start);
   int leading = 0;
   if (predFileStart != start) {
     leading += (int) (start - predFileStart);
   }
   predFileStart = start + pesLen;
   savePESMeta(stream, MPSIndex.makePESToken(leading, pesLen, pesBuffer.remaining()));
   getAnalyser(stream).pkt(pesBuffer, pesHeader);
 }
Beispiel #2
0
 protected void pes(ByteBuffer pesBuffer, long start, int pesLen, int stream) {
   if (!mediaStream(stream)) return;
   Logger.debug(String.format("PES: %08x, %d", start, pesLen));
   PESPacket pesHeader = readPESHeader(pesBuffer, start);
   int leadingTsPkt = 0; // pesBuffer.position();
   if (predFileStartInTsPkt != start) {
     leadingTsPkt = (int) (start / 188 - predFileStartInTsPkt);
   }
   predFileStartInTsPkt = (start + pesLen) / 188;
   int tsPktInPes = (int) (predFileStartInTsPkt - start / 188);
   savePESMeta(stream, MPSIndex.makePESToken(leadingTsPkt, tsPktInPes, pesBuffer.remaining()));
   getAnalyser(stream).pkt(pesBuffer, pesHeader);
 }