MCPcopy Index your code
hub / github.com/Monibuca/engine / AssignSubConfig

Method AssignSubConfig

plugin.go:229–241  ·  view source on GitHub ↗
(suber *Subscriber)

Source from the content-addressed store, hash-verified

227 return opt.Subscribe(streamPath, sub)
228}
229func (opt *Plugin) AssignSubConfig(suber *Subscriber) {
230 if suber.Config == nil {
231 conf, ok := opt.Config.(config.SubscribeConfig)
232 if !ok {
233 conf = EngineConfig
234 }
235 copyConfig := *conf.GetSubscribeConfig()
236 suber.Config = &copyConfig
237 }
238 if suber.ID == "" {
239 suber.ID = fmt.Sprintf("%d", uintptr(unsafe.Pointer(suber)))
240 }
241}
242
243// Subscribe 订阅一个流,如果流不存在则创建一个等待流
244func (opt *Plugin) Subscribe(streamPath string, sub ISubscriber) error {

Callers 2

SubscribeMethod · 0.95
PushMethod · 0.95

Calls 1

GetSubscribeConfigMethod · 0.65

Tested by

no test coverage detected