mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
streamsrc mutex.
This commit is contained in:
parent
527b1f08f8
commit
8e80ef2c69
@ -39,6 +39,7 @@ func streamSrcNew(enabled bool, codecPipeline map[string]string, video_id string
|
||||
pushedData := map[string]prometheus.Summary{}
|
||||
pipelinesCounter := map[string]prometheus.Counter{}
|
||||
pipelinesActive := map[string]prometheus.Gauge{}
|
||||
|
||||
for codecName, pipeline := range codecPipeline {
|
||||
codec, ok := codec.ParseStr(codecName)
|
||||
if !ok {
|
||||
@ -103,6 +104,9 @@ func (manager *StreamSrcManagerCtx) shutdown() {
|
||||
}
|
||||
|
||||
func (manager *StreamSrcManagerCtx) Codec() codec.RTPCodec {
|
||||
manager.pipelineMu.Lock()
|
||||
defer manager.pipelineMu.Unlock()
|
||||
|
||||
return manager.codec
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user