|
@@ -418,7 +418,7 @@ if ("function" === typeof importScripts) {
|
|
|
console.log("metaverse----core, pts: %s, isIDR: %s, length: %s",
|
|
|
mediaArray[index].pts,
|
|
|
mediaArray[index].isIDR,
|
|
|
- mediaArray[index].media.length
|
|
|
+ mediaArray[index].media.length,
|
|
|
);
|
|
|
// var loginfo = 'pts: %s, isIDR: %s, length: %s', mediaArray[index].pts, mediaArray[index].isIDR, mediaArray[index].media.length
|
|
|
|
|
@@ -477,6 +477,7 @@ if ("function" === typeof importScripts) {
|
|
|
console.log("[xmedia] %s ------------ 006", mediaArray[index].pts);
|
|
|
// no media
|
|
|
if (mediaArray[index].meta != null) {
|
|
|
+ console.log("Work-IT2 掉帧3")
|
|
|
this.checkPktOrderInConsumer(index);
|
|
|
console.log("[xmedia] %s ------------ 007", mediaArray[index].pts);
|
|
|
// Still frame
|
|
@@ -487,7 +488,9 @@ if ("function" === typeof importScripts) {
|
|
|
meta: mediaArray[index].meta,
|
|
|
metadata: mediaArray[index].metadata,
|
|
|
});
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ console.log("Work-IT2 掉帧4")
|
|
|
console.log("[xmedia] %s ------------ 008", mediaArray[index].pts);
|
|
|
// Lost_rcv++
|
|
|
// console.log("lost_rcv++: this.skipFrameUntilI = true")
|
|
@@ -512,7 +515,7 @@ if ("function" === typeof importScripts) {
|
|
|
while (this.getNumOfPktToBeDec() > 0) {
|
|
|
index = this.readPtr;
|
|
|
if (this.slotHasMedia(index)) {
|
|
|
- // dropMedia until IDR // \u6765\u4E0D\u53CA\u89E3\u7801\u4E22\u5E27
|
|
|
+ // dropMedia until IDR // 来不及解码丢帧
|
|
|
this.packetsDrop += 1;
|
|
|
if (untilIDR) {
|
|
|
if (mediaArray[index].isIDR == true) {
|
|
@@ -586,7 +589,8 @@ if ("function" === typeof importScripts) {
|
|
|
try {
|
|
|
this.procBufItem(this.readPtr);
|
|
|
} catch (error) {
|
|
|
- console.log("[xmedia] 掉帧", error);
|
|
|
+ //console.log("[xmedia] 掉帧", error);
|
|
|
+ console.log("Work-IT2 掉帧2")
|
|
|
}
|
|
|
|
|
|
// if (this.getNumOfPktToBeDec() > this.prevBufNum) {
|
|
@@ -681,14 +685,14 @@ if ("function" === typeof importScripts) {
|
|
|
t: MessageEvent.UpdateStats,
|
|
|
mediaBytesReceived: self.decoder.mediaBytesReceived,
|
|
|
metaBytesReceived: self.decoder.metaBytesReceived,
|
|
|
- packetsLost: self.decoder.packetsLost, // \u7F51\u7EDC\u4E22\u5E27
|
|
|
- packetsDrop: self.decoder.packetsDrop, // \u6765\u4E0D\u53CA\u89E3\u7801\u4E22\u5E27
|
|
|
+ packetsLost: self.decoder.packetsLost, // 网络丢帧
|
|
|
+ packetsDrop: self.decoder.packetsDrop, // 来不及解码丢帧
|
|
|
framesReceived: self.decoder.receivedMedia,
|
|
|
framesDecoded: self.decoder.receivedYUV,
|
|
|
framesRendered: self.decoder.receivedEmit,
|
|
|
framesReturned: framesReturned,
|
|
|
// framesAwait: leastReceivePts - lastProcessPts,
|
|
|
- framesAwait: self.decoder.getNumOfPktToBeDec(), // \u7B49\u5F85\u89E3\u7801\u7684\u5E27
|
|
|
+ framesAwait: self.decoder.getNumOfPktToBeDec(), // 等待解码的帧
|
|
|
decodeTimePerFrame: dtpf,
|
|
|
decodeTimeMaxFrame: dtmf,
|
|
|
sendOutBuffer: send_out_buffer,
|