// Registers the session in the broadcaster to keep a reference to all open subscribers
Registers the session in the broadcaster to keep a reference to all open subscribers
// Registers the session in the broadcaster to keep a reference to all open subscribers
func (c *InMemoryContext) RegisterPublisher(streamKey string) error {
	c.subMutex.Lock()
	c.subscribers[streamKey] = make([]Subscriber, 0, 5)
	if config.Debug {
		fmt.Println("context: registered publisher with stream key", streamKey)
	}
	c.numberOfSessions++
	c.subMutex.Unlock()
	return nil
}
func ( c * InMemoryContext ) RegisterPublisher ( streamKey string ) error { c . subMutex . Lock ( ) c . subscribers [ streamKey ] = make ( [ ] Subscriber , 0 , 5 ) if config . Debug { fmt . Println ( " " , streamKey ) } c . numberOfSessions ++ c . subMutex . Unlock ( ) return nil }
Registers the session in the broadcaster to keep a reference to all open subscribers
Registers the session in the broadcaster to keep a reference to all open subscribers
// Assume there will be a small amount of subscribers (ie. a few instances of ffmpeg that transcode our audio/video)