2020-11-02 04:09:48 +13:00
|
|
|
package types
|
|
|
|
|
2021-02-02 11:50:18 +13:00
|
|
|
import (
|
|
|
|
"github.com/pion/webrtc/v3/pkg/media"
|
|
|
|
|
|
|
|
"demodesk/neko/internal/types/codec"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Sample media.Sample
|
2020-11-02 04:09:48 +13:00
|
|
|
|
2021-01-23 02:09:47 +13:00
|
|
|
type BroadcastManager interface {
|
|
|
|
Start(url string) error
|
|
|
|
Stop()
|
2021-02-06 02:03:53 +13:00
|
|
|
Started() bool
|
2021-01-23 02:09:47 +13:00
|
|
|
Url() string
|
|
|
|
}
|
|
|
|
|
2021-01-23 06:13:32 +13:00
|
|
|
type ScreencastManager interface {
|
|
|
|
Enabled() bool
|
2021-01-24 03:17:52 +13:00
|
|
|
Started() bool
|
|
|
|
Image() ([]byte, error)
|
2021-01-23 06:13:32 +13:00
|
|
|
}
|
|
|
|
|
2021-02-05 09:39:48 +13:00
|
|
|
type StreamManager interface {
|
|
|
|
Codec() codec.RTPCodec
|
|
|
|
OnSample(listener func(sample Sample))
|
|
|
|
|
2021-02-06 00:41:02 +13:00
|
|
|
Start() error
|
2021-02-05 09:39:48 +13:00
|
|
|
Stop()
|
2021-02-06 02:03:53 +13:00
|
|
|
Started() bool
|
2021-02-05 09:39:48 +13:00
|
|
|
}
|
|
|
|
|
2020-11-02 04:09:48 +13:00
|
|
|
type CaptureManager interface {
|
|
|
|
Start()
|
|
|
|
Shutdown() error
|
|
|
|
|
2021-01-23 02:09:47 +13:00
|
|
|
Broadcast() BroadcastManager
|
2021-01-23 06:13:32 +13:00
|
|
|
Screencast() ScreencastManager
|
2021-02-05 09:39:48 +13:00
|
|
|
Audio() StreamManager
|
|
|
|
Video() StreamManager
|
2020-11-02 04:09:48 +13:00
|
|
|
|
|
|
|
StartStream()
|
|
|
|
StopStream()
|
|
|
|
Streaming() bool
|
|
|
|
}
|