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
|
image types.Sample
|
||||||
sample chan types.Sample
|
sample chan types.Sample
|
||||||
sampleStop chan interface{}
|
sampleStop chan struct{}
|
||||||
sampleUpdate chan interface{}
|
sampleUpdate chan struct{}
|
||||||
|
|
||||||
enabled bool
|
enabled bool
|
||||||
started bool
|
started bool
|
||||||
@ -44,8 +44,8 @@ func screencastNew(enabled bool, pipelineStr string) *ScreencastManagerCtx {
|
|||||||
manager := &ScreencastManagerCtx{
|
manager := &ScreencastManagerCtx{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
pipelineStr: pipelineStr,
|
pipelineStr: pipelineStr,
|
||||||
sampleStop: make(chan interface{}),
|
sampleStop: make(chan struct{}),
|
||||||
sampleUpdate: make(chan interface{}),
|
sampleUpdate: make(chan struct{}),
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
started: false,
|
started: false,
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ type StreamManagerCtx struct {
|
|||||||
pipelineStr func() string
|
pipelineStr func() string
|
||||||
|
|
||||||
sample chan types.Sample
|
sample chan types.Sample
|
||||||
sampleStop chan interface{}
|
sampleStop chan struct{}
|
||||||
sampleUpdate chan interface{}
|
sampleUpdate chan struct{}
|
||||||
|
|
||||||
listeners map[uintptr]*func(sample types.Sample)
|
listeners map[uintptr]*func(sample types.Sample)
|
||||||
listenersMu sync.Mutex
|
listenersMu sync.Mutex
|
||||||
@ -43,8 +43,8 @@ func streamNew(codec codec.RTPCodec, pipelineStr func() string, video_id string)
|
|||||||
logger: logger,
|
logger: logger,
|
||||||
codec: codec,
|
codec: codec,
|
||||||
pipelineStr: pipelineStr,
|
pipelineStr: pipelineStr,
|
||||||
sampleStop: make(chan interface{}),
|
sampleStop: make(chan struct{}),
|
||||||
sampleUpdate: make(chan interface{}),
|
sampleUpdate: make(chan struct{}),
|
||||||
listeners: map[uintptr]*func(sample types.Sample){},
|
listeners: map[uintptr]*func(sample types.Sample){},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ var mu = sync.Mutex{}
|
|||||||
type DesktopManagerCtx struct {
|
type DesktopManagerCtx struct {
|
||||||
logger zerolog.Logger
|
logger zerolog.Logger
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
shutdown chan interface{}
|
shutdown chan struct{}
|
||||||
emmiter events.EventEmmiter
|
emmiter events.EventEmmiter
|
||||||
config *config.Desktop
|
config *config.Desktop
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ type DesktopManagerCtx struct {
|
|||||||
func New(config *config.Desktop) *DesktopManagerCtx {
|
func New(config *config.Desktop) *DesktopManagerCtx {
|
||||||
return &DesktopManagerCtx{
|
return &DesktopManagerCtx{
|
||||||
logger: log.With().Str("module", "desktop").Logger(),
|
logger: log.With().Str("module", "desktop").Logger(),
|
||||||
shutdown: make(chan interface{}),
|
shutdown: make(chan struct{}),
|
||||||
emmiter: events.New(),
|
emmiter: events.New(),
|
||||||
config: config,
|
config: config,
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ func New(
|
|||||||
|
|
||||||
return &WebSocketManagerCtx{
|
return &WebSocketManagerCtx{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
shutdown: make(chan interface{}),
|
shutdown: make(chan struct{}),
|
||||||
sessions: sessions,
|
sessions: sessions,
|
||||||
desktop: desktop,
|
desktop: desktop,
|
||||||
handler: handler.New(sessions, desktop, capture, webrtc),
|
handler: handler.New(sessions, desktop, capture, webrtc),
|
||||||
@ -41,7 +41,7 @@ func New(
|
|||||||
type WebSocketManagerCtx struct {
|
type WebSocketManagerCtx struct {
|
||||||
logger zerolog.Logger
|
logger zerolog.Logger
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
shutdown chan interface{}
|
shutdown chan struct{}
|
||||||
sessions types.SessionManager
|
sessions types.SessionManager
|
||||||
desktop types.DesktopManager
|
desktop types.DesktopManager
|
||||||
handler *handler.MessageHandlerCtx
|
handler *handler.MessageHandlerCtx
|
||||||
|
Loading…
Reference in New Issue
Block a user