mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
replace chan struct{}.
This commit is contained in:
parent
74dbdea78a
commit
e45bd7098f
@ -27,8 +27,8 @@ type ScreencastManagerCtx struct {
|
||||
|
||||
image types.Sample
|
||||
sample chan types.Sample
|
||||
sampleStop chan interface{}
|
||||
sampleUpdate chan interface{}
|
||||
sampleStop chan struct{}
|
||||
sampleUpdate chan struct{}
|
||||
|
||||
enabled bool
|
||||
started bool
|
||||
@ -44,8 +44,8 @@ func screencastNew(enabled bool, pipelineStr string) *ScreencastManagerCtx {
|
||||
manager := &ScreencastManagerCtx{
|
||||
logger: logger,
|
||||
pipelineStr: pipelineStr,
|
||||
sampleStop: make(chan interface{}),
|
||||
sampleUpdate: make(chan interface{}),
|
||||
sampleStop: make(chan struct{}),
|
||||
sampleUpdate: make(chan struct{}),
|
||||
enabled: enabled,
|
||||
started: false,
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ type StreamManagerCtx struct {
|
||||
pipelineStr func() string
|
||||
|
||||
sample chan types.Sample
|
||||
sampleStop chan interface{}
|
||||
sampleUpdate chan interface{}
|
||||
sampleStop chan struct{}
|
||||
sampleUpdate chan struct{}
|
||||
|
||||
listeners map[uintptr]*func(sample types.Sample)
|
||||
listenersMu sync.Mutex
|
||||
@ -43,8 +43,8 @@ func streamNew(codec codec.RTPCodec, pipelineStr func() string, video_id string)
|
||||
logger: logger,
|
||||
codec: codec,
|
||||
pipelineStr: pipelineStr,
|
||||
sampleStop: make(chan interface{}),
|
||||
sampleUpdate: make(chan interface{}),
|
||||
sampleStop: make(chan struct{}),
|
||||
sampleUpdate: make(chan struct{}),
|
||||
listeners: map[uintptr]*func(sample types.Sample){},
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ var mu = sync.Mutex{}
|
||||
type DesktopManagerCtx struct {
|
||||
logger zerolog.Logger
|
||||
wg sync.WaitGroup
|
||||
shutdown chan interface{}
|
||||
shutdown chan struct{}
|
||||
emmiter events.EventEmmiter
|
||||
config *config.Desktop
|
||||
}
|
||||
@ -27,7 +27,7 @@ type DesktopManagerCtx struct {
|
||||
func New(config *config.Desktop) *DesktopManagerCtx {
|
||||
return &DesktopManagerCtx{
|
||||
logger: log.With().Str("module", "desktop").Logger(),
|
||||
shutdown: make(chan interface{}),
|
||||
shutdown: make(chan struct{}),
|
||||
emmiter: events.New(),
|
||||
config: config,
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ func New(
|
||||
|
||||
return &WebSocketManagerCtx{
|
||||
logger: logger,
|
||||
shutdown: make(chan interface{}),
|
||||
shutdown: make(chan struct{}),
|
||||
sessions: sessions,
|
||||
desktop: desktop,
|
||||
handler: handler.New(sessions, desktop, capture, webrtc),
|
||||
@ -41,7 +41,7 @@ func New(
|
||||
type WebSocketManagerCtx struct {
|
||||
logger zerolog.Logger
|
||||
wg sync.WaitGroup
|
||||
shutdown chan interface{}
|
||||
shutdown chan struct{}
|
||||
sessions types.SessionManager
|
||||
desktop types.DesktopManager
|
||||
handler *handler.MessageHandlerCtx
|
||||
|
Loading…
Reference in New Issue
Block a user