|
|
|
@ -187,7 +187,7 @@ func TestEnvironment(t *testing.T) {
@@ -187,7 +187,7 @@ func TestEnvironment(t *testing.T) {
|
|
|
|
|
require.Equal(t, &conf.PathConf{ |
|
|
|
|
Regexp: regexp.MustCompile("^.*$"), |
|
|
|
|
Source: "record", |
|
|
|
|
SourceProtocol: "udp", |
|
|
|
|
SourceProtocol: "automatic", |
|
|
|
|
SourceOnDemandStartTimeout: 10 * time.Second, |
|
|
|
|
SourceOnDemandCloseAfter: 10 * time.Second, |
|
|
|
|
ReadUser: "testuser", |
|
|
|
@ -201,7 +201,10 @@ func TestEnvironment(t *testing.T) {
@@ -201,7 +201,10 @@ func TestEnvironment(t *testing.T) {
|
|
|
|
|
require.Equal(t, &conf.PathConf{ |
|
|
|
|
Source: "rtsp://testing", |
|
|
|
|
SourceProtocol: "tcp", |
|
|
|
|
SourceProtocolParsed: gortsplib.StreamProtocolTCP, |
|
|
|
|
SourceProtocolParsed: func() *gortsplib.StreamProtocol { |
|
|
|
|
v := gortsplib.StreamProtocolTCP |
|
|
|
|
return &v |
|
|
|
|
}(), |
|
|
|
|
SourceOnDemand: true, |
|
|
|
|
SourceOnDemandStartTimeout: 10 * time.Second, |
|
|
|
|
SourceOnDemandCloseAfter: 10 * time.Second, |
|
|
|
@ -222,7 +225,7 @@ func TestEnvironmentNoFile(t *testing.T) {
@@ -222,7 +225,7 @@ func TestEnvironmentNoFile(t *testing.T) {
|
|
|
|
|
require.Equal(t, true, ok) |
|
|
|
|
require.Equal(t, &conf.PathConf{ |
|
|
|
|
Source: "rtsp://testing", |
|
|
|
|
SourceProtocol: "udp", |
|
|
|
|
SourceProtocol: "automatic", |
|
|
|
|
SourceOnDemandStartTimeout: 10 * time.Second, |
|
|
|
|
SourceOnDemandCloseAfter: 10 * time.Second, |
|
|
|
|
RunOnDemandStartTimeout: 10 * time.Second, |
|
|
|
|