Implement Audio & Video using custom StreamManager.

This commit is contained in:
Miroslav Šedivý
2021-02-04 20:39:48 +00:00
parent b488f01b16
commit 7902d7b1f1
5 changed files with 229 additions and 196 deletions

View File

@ -21,18 +21,25 @@ type ScreencastManager interface {
Image() ([]byte, error)
}
type StreamManager interface {
Shutdown()
Codec() codec.RTPCodec
OnSample(listener func(sample Sample))
Start()
Stop()
Enabled() bool
}
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))
Audio() StreamManager
Video() StreamManager
StartStream()
StopStream()