增加配置项ReadBufferSize

This commit is contained in:
dexter
2021-12-29 22:59:45 +08:00
parent 8901f4c117
commit f110513d70
2 changed files with 11 additions and 10 deletions

View File

@@ -151,7 +151,7 @@ func (client *RTSPClient) pullStream() {
f(append(clone, payload...))
}
},
ReadBufferSize: 10000,
ReadBufferSize: config.ReadBufferSize,
Transport: &client.Transport,
}
// parse URL

17
main.go
View File

@@ -13,14 +13,15 @@ import (
)
var config = struct {
ListenAddr string
UDPAddr string
RTCPAddr string
Timeout int
Reconnect bool
AutoPullList map[string]string
AutoPushList map[string]string
}{":554", ":8000", ":8001", 0, false, nil, nil}
ListenAddr string
UDPAddr string
RTCPAddr string
Timeout int
Reconnect bool
AutoPullList map[string]string
AutoPushList map[string]string
ReadBufferSize int
}{":554", ":8000", ":8001", 0, false, nil, nil, 2048}
var pconfig = PluginConfig{
Name: "RTSP",