Ver código fonte

disable PCR sync reset for now

Gil Pedersen 13 anos atrás
pai
commit
1b28d745f2
1 arquivos alterados com 5 adições e 4 exclusões
  1. 5 4
      lib/tssmooth.js

+ 5 - 4
lib/tssmooth.js

@@ -85,26 +85,27 @@ function TsSmooth(options) {
     var delta = pcrtime - self.pcrtime;
     if (delta > 100E3 || delta < 0) {
       console.error('PCR_error: '+(delta/1E6).toFixed(2)+'s missing');
-      var now = utime();
+/*      var now = utime();
       var error = now - pcrtime;
       if (Math.abs(error) > 2*1E6) {
         console.error('PCR sync reset');
         self.pcr = -1;
         pcrtime = self.pcr2time(newPCR);
-      }
+      }*/
     }
     self.pcrtime = pcrtime;
     return pcrtime;
   }
 
   Transform.call(this);
-
-  return this;
+//  Transform.call(this, {bufferSize:5*this.packetSize, highWaterMark:5*this.packetSize});
+//  Transform.call(this, {bufferSize:188*7, highWaterMark:64*1024});
 }
 util.inherits(TsSmooth, Transform);
 
 function utime() {
   var t = process.hrtime(); // based on CLOCK_MONOTONIC, and thus accommodates local drift (but apparently not suspend)
+//  console.error(t);
   return t[0] * 1E6 + t[1] / 1E3;
 }