mirror of
https://github.com/bluenviron/mediamtx.git
synced 2026-01-23 11:59:51 -08:00
accept durations expressed as days (i.e. '1d') (#4094)
This commit is contained in:
parent
8cbbbc05c3
commit
b49acb1e00
53 changed files with 378 additions and 257 deletions
|
|
@ -42,8 +42,8 @@ type conn struct {
|
|||
parentCtx context.Context
|
||||
isTLS bool
|
||||
rtspAddress string
|
||||
readTimeout conf.StringDuration
|
||||
writeTimeout conf.StringDuration
|
||||
readTimeout conf.Duration
|
||||
writeTimeout conf.Duration
|
||||
runOnConnect string
|
||||
runOnConnectRestart bool
|
||||
runOnDisconnect string
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ type serverParent interface {
|
|||
// Server is a RTMP server.
|
||||
type Server struct {
|
||||
Address string
|
||||
ReadTimeout conf.StringDuration
|
||||
WriteTimeout conf.StringDuration
|
||||
ReadTimeout conf.Duration
|
||||
WriteTimeout conf.Duration
|
||||
IsTLS bool
|
||||
ServerCert string
|
||||
ServerKey string
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ func TestServerPublish(t *testing.T) {
|
|||
|
||||
s := &Server{
|
||||
Address: "127.0.0.1:1935",
|
||||
ReadTimeout: conf.StringDuration(10 * time.Second),
|
||||
WriteTimeout: conf.StringDuration(10 * time.Second),
|
||||
ReadTimeout: conf.Duration(10 * time.Second),
|
||||
WriteTimeout: conf.Duration(10 * time.Second),
|
||||
IsTLS: encrypt == "tls",
|
||||
ServerCert: serverCertFpath,
|
||||
ServerKey: serverKeyFpath,
|
||||
|
|
@ -220,8 +220,8 @@ func TestServerRead(t *testing.T) {
|
|||
|
||||
s := &Server{
|
||||
Address: "127.0.0.1:1935",
|
||||
ReadTimeout: conf.StringDuration(10 * time.Second),
|
||||
WriteTimeout: conf.StringDuration(10 * time.Second),
|
||||
ReadTimeout: conf.Duration(10 * time.Second),
|
||||
WriteTimeout: conf.Duration(10 * time.Second),
|
||||
IsTLS: encrypt == "tls",
|
||||
ServerCert: serverCertFpath,
|
||||
ServerKey: serverKeyFpath,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue