add dc backpressure to all platforms

This commit is contained in:
kulikov0 committed 2026-11-07 11:41:31 +01:00
1 parent a96e29c2e5
commit 4ad375bf00
12 files changed
+145 -46

No files matched your search

+9 -9
View File
@@ -658,16 +658,16 @@ func main() {
switch *resources {
case "moderate":
readBuf = 16384
maxDCBuf = 1 * 1024 * 1024
memLimit = 64 * 1024 * 1024
maxDCBuf = 1 << 20
memLimit = 64 << 20
case "default":
readBuf = 32768
maxDCBuf = 4 * 1024 * 1024
memLimit = 128 * 1024 * 1024
readBuf = common.DCBufSize
maxDCBuf = common.MaxDCBufSize
memLimit = 128 << 20
case "unlimited":
readBuf = common.RTPBufSize
maxDCBuf = 8 * 1024 * 1024
memLimit = 256 * 1024 * 1024
maxDCBuf = 8 << 20
memLimit = 256 << 20
case "custom":
readBuf = *customReadBuf
if readBuf == 0 {
@@ -675,11 +675,11 @@ func main() {
}
maxDCBuf = uint64(*customMaxDCBuf)
if maxDCBuf == 0 {
maxDCBuf = 8 * 1024 * 1024
maxDCBuf = 8 << 20
}
memLimit = *customMemLimit
if memLimit == 0 {
memLimit = 256 * 1024 * 1024
memLimit = 256 << 20
}
default:
log.Fatalf("[config] unknown resources mode: %s (use moderate, default, unlimited, custom)", *resources)