2020-11-01 16:09:48 +01:00
|
|
|
package types
|
|
|
|
|
2021-02-01 23:50:18 +01:00
|
|
|
import (
|
|
|
|
"github.com/pion/webrtc/v3/pkg/media"
|
|
|
|
|
|
|
|
"demodesk/neko/internal/types/codec"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Sample media.Sample
|
2020-11-01 16:09:48 +01:00
|
|
|
|
2021-01-22 14:09:47 +01:00
|
|
|
type BroadcastManager interface {
|
|
|
|
Start(url string) error
|
|
|
|
Stop()
|
2021-02-05 14:03:53 +01:00
|
|
|
Started() bool
|
2021-01-22 14:09:47 +01:00
|
|
|
Url() string
|
|
|
|
}
|
|
|
|
|
2021-01-22 18:13:32 +01:00
|
|
|
type ScreencastManager interface {
|
|
|
|
Enabled() bool
|
2021-01-23 15:17:52 +01:00
|
|
|
Started() bool
|
|
|
|
Image() ([]byte, error)
|
2021-01-22 18:13:32 +01:00
|
|
|
}
|
|
|
|
|
2021-02-04 20:39:48 +00:00
|
|
|
type StreamManager interface {
|
|
|
|
Codec() codec.RTPCodec
|
2021-02-06 18:16:24 +01:00
|
|
|
|
2021-02-06 17:05:25 +01:00
|
|
|
AddListener(listener *func(sample Sample))
|
|
|
|
RemoveListener(listener *func(sample Sample))
|
2021-02-06 18:16:24 +01:00
|
|
|
ListenersCount() int
|
2021-02-04 20:39:48 +00:00
|
|
|
|
2021-02-05 12:41:02 +01:00
|
|
|
Start() error
|
2021-02-04 20:39:48 +00:00
|
|
|
Stop()
|
2021-02-05 14:03:53 +01:00
|
|
|
Started() bool
|
2021-02-04 20:39:48 +00:00
|
|
|
}
|
|
|
|
|
2020-11-01 16:09:48 +01:00
|
|
|
type CaptureManager interface {
|
|
|
|
Start()
|
|
|
|
Shutdown() error
|
|
|
|
|
2021-01-22 14:09:47 +01:00
|
|
|
Broadcast() BroadcastManager
|
2021-01-22 18:13:32 +01:00
|
|
|
Screencast() ScreencastManager
|
2021-02-04 20:39:48 +00:00
|
|
|
Audio() StreamManager
|
2021-02-05 18:07:58 +01:00
|
|
|
Video(videoID string) (StreamManager, bool)
|
2021-02-05 17:40:29 +01:00
|
|
|
VideoIDs() []string
|
2020-11-01 16:09:48 +01:00
|
|
|
}
|