MCPcopy Index your code
hub / github.com/deepch/RTSPtoRTMP / RTSPWorkerLoop

Function RTSPWorkerLoop

stream.go:33–47  ·  view source on GitHub ↗
(name, url string, OnDemand bool)

Source from the content-addressed store, hash-verified

31}
32
33func RTSPWorkerLoop(name, url string, OnDemand bool) {
34 defer Config.RunUnlock(name)
35 for {
36 log.Println(name, "Stream Try Connect")
37 err := RTSPWorker(name, url, OnDemand)
38 if err != nil {
39 log.Println(err)
40 }
41 if OnDemand && !Config.HasViewer(name) {
42 log.Println(name, ErrorStreamExitNoViewer)
43 return
44 }
45 time.Sleep(1 * time.Second)
46 }
47}
48
49func RTSPWorker(name, url string, OnDemand bool) error {
50 keyTest := time.NewTimer(20 * time.Second)

Callers 2

serveStreamsFunction · 0.85
RunIFNotRunMethod · 0.85

Calls 3

RTSPWorkerFunction · 0.85
RunUnlockMethod · 0.80
HasViewerMethod · 0.80

Tested by

no test coverage detected