neko/internal/types/capture.go

39 lines
568 B
Go
Raw Normal View History

2020-11-02 04:09:48 +13:00
package types
type Sample struct {
Data []byte
Samples uint32
}
type BroadcastManager interface {
Start(url string) error
Stop()
Enabled() bool
Url() string
}
2021-01-23 06:13:32 +13:00
type ScreencastManager interface {
Start() error
Stop()
Enabled() bool
Image() []byte
}
2020-11-02 04:09:48 +13:00
type CaptureManager interface {
Start()
Shutdown() error
Broadcast() BroadcastManager
2021-01-23 06:13:32 +13:00
Screencast() ScreencastManager
2020-11-02 04:09:48 +13:00
VideoCodec() string
AudioCodec() string
OnVideoFrame(listener func(sample Sample))
OnAudioFrame(listener func(sample Sample))
StartStream()
StopStream()
Streaming() bool
}