mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
automatically remux oversized RTP/H264 packets; drop parameter ReadBufferSize
This commit is contained in:
12
server.go
12
server.go
@@ -15,11 +15,6 @@ import (
|
||||
"github.com/aler9/gortsplib/pkg/liberrors"
|
||||
)
|
||||
|
||||
const (
|
||||
serverReadBufferSize = 4096
|
||||
serverUDPKernelReadBufferSize = 0x80000 // same as gstreamer's rtspsrc
|
||||
)
|
||||
|
||||
func extractPort(address string) (int, error) {
|
||||
_, tmp, err := net.SplitHostPort(address)
|
||||
if err != nil {
|
||||
@@ -115,10 +110,6 @@ type Server struct {
|
||||
// that are particularly relevant when using UDP.
|
||||
// It defaults to 256.
|
||||
ReadBufferCount int
|
||||
// read buffer size.
|
||||
// This must be touched only when the server reports errors about buffer sizes.
|
||||
// It defaults to 2048.
|
||||
ReadBufferSize int
|
||||
// write buffer count.
|
||||
// It allows to queue packets before sending them.
|
||||
// It defaults to 256.
|
||||
@@ -174,9 +165,6 @@ func (s *Server) Start() error {
|
||||
if s.ReadBufferCount == 0 {
|
||||
s.ReadBufferCount = 256
|
||||
}
|
||||
if s.ReadBufferSize == 0 {
|
||||
s.ReadBufferSize = 2048
|
||||
}
|
||||
if s.WriteBufferCount == 0 {
|
||||
s.WriteBufferCount = 256
|
||||
}
|
||||
|
Reference in New Issue
Block a user