MCPcopy Create free account
hub / github.com/deepch/RTSPtoWebRTC / RunIFNotRun

Method RunIFNotRun

config.go:55–65  ·  view source on GitHub ↗
(uuid string)

Source from the content-addressed store, hash-verified

53}
54
55func (element *ConfigST) RunIFNotRun(uuid string) {
56 element.mutex.Lock()
57 defer element.mutex.Unlock()
58 if tmp, ok := element.Streams[uuid]; ok {
59 if tmp.OnDemand && !tmp.RunLock {
60 tmp.RunLock = true
61 element.Streams[uuid] = tmp
62 go RTSPWorkerLoop(uuid, tmp.URL, tmp.OnDemand, tmp.DisableAudio, tmp.Debug)
63 }
64 }
65}
66
67func (element *ConfigST) RunUnlock(uuid string) {
68 element.mutex.Lock()

Callers 3

HTTPAPIServerStreamCodecFunction · 0.80

Calls 1

RTSPWorkerLoopFunction · 0.85

Tested by

no test coverage detected