feat(gateway): hexdump+ssrc of watch UDP packets
maxLen stayed 72 across 243 packets (no real H264, which is hundreds+ bytes) — only 44-72-byte RTP packets on PT 76/72/73 arrive. Add ssrc + first-32-bytes hex so we can identify exactly what Discord sends to the watch socket (control packets vs stale video), which determines whether the gap is upstream routing or whether large H264 packets are missing entirely.
This commit is contained in:
1 parent
b423d21b23
commit
9606187861
1 file changed
+10
-3
@@ -476,9 +476,12 @@ function handleUdpMessage(
|
|||||||
watch._diag = stat;
|
watch._diag = stat;
|
||||||
const diagCount = stat.video;
|
const diagCount = stat.video;
|
||||||
const dueAt = watch._diagNext ?? 0;
|
const dueAt = watch._diagNext ?? 0;
|
||||||
if (diagCount <= 3 || now >= dueAt) {
|
if (diagCount === 1 || now >= dueAt) {
|
||||||
watch._diagNext = now + 20_000;
|
watch._diagNext = now + 20_000;
|
||||||
const pts = [...stat.pts].join(",");
|
const pts = [...stat.pts].join(",");
|
||||||
|
const ssrc = msg.readUInt32BE(8);
|
||||||
|
const first = msg[0];
|
||||||
|
const flags = msg[1];
|
||||||
logger.info(
|
logger.info(
|
||||||
{
|
{
|
||||||
userId: uid,
|
userId: uid,
|
||||||
@@ -488,9 +491,13 @@ function handleUdpMessage(
|
|||||||
haveKey,
|
haveKey,
|
||||||
daveAttached: !!dave?.session,
|
daveAttached: !!dave?.session,
|
||||||
daveReady,
|
daveReady,
|
||||||
watchesSize: watches.size,
|
ssrc,
|
||||||
|
firstByte: first,
|
||||||
|
flagsByte: flags,
|
||||||
|
seq: msg.readUInt16BE(2),
|
||||||
|
hex: msg.subarray(0, 32).toString("hex"),
|
||||||
},
|
},
|
||||||
`VIDEO-PKT diag video=${stat.video} maxLen=${stat.maxLen} pts=[${pts}] haveKey=${haveKey} dave=${!!dave?.session} ready=${daveReady}`,
|
`VIDEO-PKT diag video=${stat.video} maxLen=${stat.maxLen} pts=[${pts}] haveKey=${haveKey} dave=${!!dave?.session} ready=${daveReady} ssrc=${ssrc} first=${first} flags=${flags} hex=${msg.subarray(0, 32).toString("hex")}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const decrypted = decryptVideoPacket(
|
const decrypted = decryptVideoPacket(
|
||||||
|
|||||||
Reference in new issue
Block a user