neko/internal/types/capture.go
2021-02-02 16:58:17 +01:00

41 lines
646 B
Go

package types
import (
"github.com/pion/webrtc/v3/pkg/media"
"demodesk/neko/internal/types/codec"
)
type Sample media.Sample
type BroadcastManager interface {
Start(url string) error
Stop()
Enabled() bool
Url() string
}
type ScreencastManager interface {
Enabled() bool
Started() bool
Image() ([]byte, error)
}
type CaptureManager interface {
Start()
Shutdown() error
Broadcast() BroadcastManager
Screencast() ScreencastManager
VideoCodec() codec.RTPCodec
AudioCodec() codec.RTPCodec
OnVideoFrame(listener func(sample Sample))
OnAudioFrame(listener func(sample Sample))
StartStream()
StopStream()
Streaming() bool
}