mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-30 15:02:00 -08:00
simplify Path.HasStaticSource() (#3876)
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_highlevel (push) Has been cancelled
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_highlevel (push) Has been cancelled
This commit is contained in:
parent
cf9484a96e
commit
a532779e33
1 changed files with 1 additions and 11 deletions
|
|
@ -578,17 +578,7 @@ func (pconf *Path) Equal(other *Path) bool {
|
|||
|
||||
// HasStaticSource checks whether the path has a static source.
|
||||
func (pconf Path) HasStaticSource() bool {
|
||||
return strings.HasPrefix(pconf.Source, "rtsp://") ||
|
||||
strings.HasPrefix(pconf.Source, "rtsps://") ||
|
||||
strings.HasPrefix(pconf.Source, "rtmp://") ||
|
||||
strings.HasPrefix(pconf.Source, "rtmps://") ||
|
||||
strings.HasPrefix(pconf.Source, "http://") ||
|
||||
strings.HasPrefix(pconf.Source, "https://") ||
|
||||
strings.HasPrefix(pconf.Source, "udp://") ||
|
||||
strings.HasPrefix(pconf.Source, "srt://") ||
|
||||
strings.HasPrefix(pconf.Source, "whep://") ||
|
||||
strings.HasPrefix(pconf.Source, "wheps://") ||
|
||||
pconf.Source == "rpiCamera"
|
||||
return pconf.Source != "publisher" && pconf.Source != "redirect"
|
||||
}
|
||||
|
||||
// HasOnDemandStaticSource checks whether the path has a on demand static source.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue