peer interfaces and callbacks

This commit is contained in:
David Zhao
2020-10-27 23:41:37 -07:00
parent 1ed8ba3ae6
commit 71d6feedbb
9 changed files with 274 additions and 112 deletions

1
go.mod
View File

@@ -13,6 +13,7 @@ require (
github.com/pion/sdp/v3 v3.0.2
github.com/pion/stun v0.3.5
github.com/pion/webrtc/v3 v3.0.0-beta.9
github.com/pkg/errors v0.9.1
github.com/twitchtv/twirp v7.1.0+incompatible
github.com/urfave/cli/v2 v2.2.0
github.com/urfave/negroni v1.0.0

8
pkg/rtc/errors.go Normal file
View File

@@ -0,0 +1,8 @@
package rtc
import "errors"
var (
ErrPeerExists = errors.New("peer already exists")
ErrPeerNotConnected = errors.New("peer has not been connected")
)

View File

@@ -40,7 +40,7 @@ func (m *RoomManager) GetRoom(roomId string) *Room {
}
func (m *RoomManager) CreateRoom(req *livekit.CreateRoomRequest) (r *Room, err error) {
r, err = NewRoomForRequest(req)
r, err = NewRoomForRequest(req, &m.config)
if err != nil {
return
}

View File

@@ -7,6 +7,7 @@ import (
"github.com/pion/rtcp"
"github.com/pion/webrtc/v3"
"github.com/pkg/errors"
)
type WebRTCPeer struct {
@@ -19,10 +20,16 @@ type WebRTCPeer struct {
lock sync.RWMutex
receiverConfig ReceiverConfig
tracks []*PeerTrack // tracks that the peer is publishing
once sync.Once
// callbacks & handlers
onClose func(*WebRTCPeer)
onPeerTrack func(*WebRTCPeer, *PeerTrack)
// OnPeerTrack - remote peer added a track
OnPeerTrack func(*WebRTCPeer, *PeerTrack)
// OnOffer - offer is ready for remote peer
OnOffer func(webrtc.SessionDescription)
// OnIceCandidate - ice candidate discovered for local peer
OnICECandidate func(c *webrtc.ICECandidate)
OnClose func(*WebRTCPeer)
}
func NewWebRTCPeer(id string, me *MediaEngine, conf WebRTCConfig) (*WebRTCPeer, error) {
@@ -47,6 +54,32 @@ func NewWebRTCPeer(id string, me *MediaEngine, conf WebRTCConfig) (*WebRTCPeer,
pc.OnTrack(peer.onTrack)
pc.OnNegotiationNeeded(func() {
offer, err := pc.CreateOffer(nil)
if err != nil {
// TODO: log
return
}
err = pc.SetLocalDescription(offer)
if err != nil {
// TODO: log
return
}
if peer.OnOffer != nil {
peer.OnOffer(offer)
}
})
pc.OnICECandidate(func(c *webrtc.ICECandidate) {
if c == nil {
return
}
if peer.OnICECandidate != nil {
peer.OnICECandidate(c)
}
})
// TODO: handle data channel
return peer, nil
@@ -56,26 +89,59 @@ func (p *WebRTCPeer) ID() string {
return p.id
}
// Answer an offer from remote peer
func (p *WebRTCPeer) Answer(sdp webrtc.SessionDescription) (answer webrtc.SessionDescription, err error) {
if err = p.SetRemoteDescription(sdp); err != nil {
return
}
answer, err = p.conn.CreateAnswer(nil)
if err != nil {
err = errors.Wrap(err, "could not create answer")
return
}
if err = p.conn.SetLocalDescription(answer); err != nil {
err = errors.Wrap(err, "could not set local description")
return
}
return
}
// SetRemoteDescription when receiving an answer from remote
func (p *WebRTCPeer) SetRemoteDescription(sdp webrtc.SessionDescription) error {
if err := p.conn.SetRemoteDescription(sdp); err != nil {
return errors.Wrap(err, "could not set remote description")
}
return nil
}
// AddICECandidate adds candidates for remote peer
func (p *WebRTCPeer) AddICECandidate(candidate webrtc.ICECandidateInit) error {
if err := p.conn.AddICECandidate(candidate); err != nil {
return err
}
return nil
}
func (p *WebRTCPeer) Start() {
p.once.Do(func() {
go p.rtcpSendWorker()
})
}
func (p *WebRTCPeer) Close() error {
if p.ctx.Err() != nil {
return p.ctx.Err()
}
// TODO: notify handler of closure
if p.onClose != nil {
p.onClose(p)
if p.OnClose != nil {
p.OnClose(p)
}
p.cancel()
return p.conn.Close()
}
func (p *WebRTCPeer) OnClose(f func(*WebRTCPeer)) {
p.onClose = f
}
func (p *WebRTCPeer) OnPeerTrack(f func(*WebRTCPeer, *PeerTrack)) {
p.onPeerTrack = f
}
// when a new track is created, creates a PeerTrack and adds it to room
func (p *WebRTCPeer) onTrack(track *webrtc.Track, rtpReceiver *webrtc.RTPReceiver) {
@@ -87,9 +153,9 @@ func (p *WebRTCPeer) onTrack(track *webrtc.Track, rtpReceiver *webrtc.RTPReceive
defer p.lock.Unlock()
p.tracks = append(p.tracks, pt)
if p.onPeerTrack != nil {
if p.OnPeerTrack != nil {
// caller should hook up what happens when the peer track is available
p.onPeerTrack(p, pt)
p.OnPeerTrack(p, pt)
}
}

View File

@@ -1,27 +1,32 @@
package rtc
import (
"sync"
"time"
"github.com/google/uuid"
"github.com/pion/webrtc/v3"
"github.com/pkg/errors"
"github.com/livekit/livekit-server/proto/livekit"
)
type Room struct {
livekit.Room
config WebRTCConfig
lock sync.RWMutex
// map of peerId -> WebRTCPeer
peers map[string]*WebRTCPeer
// Client ID => list of tracks they are publishing
//tracks map[string][]PeerTrack
}
func NewRoomForRequest(req *livekit.CreateRoomRequest) (*Room, error) {
func NewRoomForRequest(req *livekit.CreateRoomRequest, config *WebRTCConfig) (*Room, error) {
id, err := uuid.NewRandom()
if err != nil {
return nil, err
}
return &Room{
Room: livekit.Room{
RoomId: req.RoomId,
@@ -30,7 +35,9 @@ func NewRoomForRequest(req *livekit.CreateRoomRequest) (*Room, error) {
CreationTime: time.Now().Unix(),
Token: id.String(),
},
peers: make(map[string]*WebRTCPeer),
config: *config,
lock: sync.RWMutex{},
peers: make(map[string]*WebRTCPeer),
}, nil
}
@@ -43,3 +50,34 @@ func (r *Room) ToRoomInfo(node *livekit.Node) *livekit.RoomInfo {
Token: r.Token,
}
}
func (r *Room) Join(peerId string, token string, sdp string) (peer *WebRTCPeer, err error) {
r.lock.Lock()
defer r.lock.Unlock()
_, ok := r.peers[peerId]
if ok {
// already exists, return error
return nil, ErrPeerExists
}
offer := webrtc.SessionDescription{
Type: webrtc.SDPTypeOffer,
SDP: sdp,
}
me := MediaEngine{}
if err := me.PopulateFromSDP(offer); err != nil {
return nil, errors.Wrapf(err, "could not parse SDP")
}
peer, err = NewWebRTCPeer(peerId, &me, r.config)
if err != nil {
return nil, errors.Wrap(err, "could not create peer")
}
r.peers[peerId] = peer
return
}

View File

@@ -201,32 +201,83 @@ func (m *Room) GetToken() string {
return ""
}
type DataChannel struct {
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataChannel) Reset() { *m = DataChannel{} }
func (m *DataChannel) String() string { return proto.CompactTextString(m) }
func (*DataChannel) ProtoMessage() {}
func (*DataChannel) Descriptor() ([]byte, []int) {
return fileDescriptor_4c16552f9fdb66d8, []int{3}
}
func (m *DataChannel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DataChannel.Unmarshal(m, b)
}
func (m *DataChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DataChannel.Marshal(b, m, deterministic)
}
func (m *DataChannel) XXX_Merge(src proto.Message) {
xxx_messageInfo_DataChannel.Merge(m, src)
}
func (m *DataChannel) XXX_Size() int {
return xxx_messageInfo_DataChannel.Size(m)
}
func (m *DataChannel) XXX_DiscardUnknown() {
xxx_messageInfo_DataChannel.DiscardUnknown(m)
}
var xxx_messageInfo_DataChannel proto.InternalMessageInfo
func (m *DataChannel) GetSessionId() string {
if m != nil {
return m.SessionId
}
return ""
}
func (m *DataChannel) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterType((*Node)(nil), "livekit.Node")
proto.RegisterType((*NodeStats)(nil), "livekit.NodeStats")
proto.RegisterType((*Room)(nil), "livekit.Room")
proto.RegisterType((*DataChannel)(nil), "livekit.DataChannel")
}
func init() { proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) }
var fileDescriptor_4c16552f9fdb66d8 = []byte{
// 285 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0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0xe4, 0x01, 0x72, 0x2e, 0x0d, 0xfe, 0xb4, 0x28, 0x24, 0xd7, 0x33, 0x7a,
0x49, 0x4e, 0xb7, 0x1e, 0x7e, 0x2c, 0x8c, 0x3c, 0xc2, 0x95, 0x64, 0x87, 0xd6, 0x30, 0x8b, 0xa2,
0x13, 0x86, 0xb9, 0x61, 0xcb, 0x79, 0x97, 0x92, 0x1d, 0xf6, 0xff, 0xb0, 0xf3, 0x75, 0x96, 0x33,
0x14, 0x5a, 0x79, 0xa5, 0x3f, 0x77, 0x45, 0xb7, 0x27, 0xe8, 0x94, 0xe4, 0x1a, 0x62, 0xd4, 0x03,
0x57, 0x45, 0xec, 0x77, 0x59, 0xc2, 0x4b, 0xfa, 0x79, 0xfa, 0xf7, 0xd7, 0xda, 0xff, 0xff, 0xf9,
0x2f, 0x00, 0x00, 0xff, 0xff, 0x42, 0x21, 0x29, 0xdb, 0x8e, 0x01, 0x00, 0x00,
// 327 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xcd, 0x6a, 0xeb, 0x30,
0x10, 0x85, 0x71, 0x12, 0xc7, 0xf1, 0x38, 0xb9, 0xf7, 0x22, 0x2e, 0xd4, 0xa5, 0x94, 0x06, 0x77,
0xe3, 0x6e, 0xb2, 0x68, 0xdf, 0xa0, 0x29, 0x85, 0x6c, 0x4a, 0x50, 0xbb, 0xea, 0xc6, 0xa8, 0x96,
0xa0, 0x22, 0xd6, 0x0f, 0xd2, 0xb8, 0x24, 0xaf, 0xd4, 0xa7, 0x2c, 0x92, 0x93, 0xd0, 0xe5, 0xf9,
0x24, 0xbe, 0x39, 0xc3, 0x40, 0xa1, 0x0c, 0x17, 0xdd, 0xca, 0x3a, 0x83, 0x86, 0x64, 0x9d, 0xfc,
0x12, 0x3b, 0x89, 0xd5, 0x0e, 0x26, 0x2f, 0x86, 0x0b, 0xf2, 0x07, 0x46, 0x92, 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6, 0xa2, 0x23, 0xd7, 0x00, 0x5e, 0x78, 0x1f, 0x44, 0xe7, 0xd6, 0xf9,
0x91, 0x6c, 0x38, 0x29, 0x21, 0xb3, 0xec, 0xd0, 0x19, 0xc6, 0x63, 0xe5, 0x39, 0x3d, 0xc5, 0xc7,
0xfc, 0xfd, 0x74, 0xb7, 0x8f, 0x69, 0xbc, 0xe3, 0xc3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f,
0xc9, 0x32, 0xc0, 0xd6, 0x01, 0x00, 0x00,
}

View File

@@ -259,7 +259,7 @@ var xxx_messageInfo_DeleteRoomResponse proto.InternalMessageInfo
type JoinRequest struct {
RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
Offer *SessionDescription `protobuf:"bytes,4,opt,name=offer,proto3" json:"offer,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -305,9 +305,9 @@ func (m *JoinRequest) GetToken() string {
return ""
}
func (m *JoinRequest) GetSessionId() string {
func (m *JoinRequest) GetPeerId() string {
if m != nil {
return m.SessionId
return m.PeerId
}
return ""
}
@@ -491,39 +491,38 @@ func init() {
func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) }
var fileDescriptor_a0b84a42fa06f626 = []byte{
// 532 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x4c,
0x14, 0x95, 0x9b, 0xbf, 0xcf, 0x37, 0x49, 0xdb, 0x5c, 0xe5, 0x53, 0x2c, 0x17, 0x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0xe2,
0xdc, 0xfa, 0x0e, 0x33, 0x9f, 0x93, 0xdf, 0x0e, 0xb4, 0xcd, 0x94, 0x2f, 0xf2, 0xf8, 0xe3, 0x6b,
0x80, 0x5d, 0xde, 0xd1, 0x2f, 0x15, 0xec, 0xfd, 0x04, 0x7e, 0xaf, 0xac, 0x95, 0xb1, 0x7b, 0x09,
0xad, 0x22, 0xae, 0x38, 0x28, 0xab, 0xb7, 0x03, 0x7c, 0xd7, 0xb6, 0xf7, 0x00, 0x3b, 0xbb, 0x2b,
0x77, 0xee, 0x25, 0xc6, 0x3f, 0xb9, 0xb3, 0x96, 0x8f, 0x61, 0xf2, 0xcb, 0x01, 0x60, 0x8b, 0xd9,
0x56, 0xc9, 0x14, 0xea, 0xc6, 0x1d, 0xec, 0x97, 0x7b, 0x2a, 0xe1, 0xf1, 0xff, 0xff, 0x0b, 0x2d,
0x2c, 0x7c, 0x0b, 0x8d, 0x4f, 0xc6, 0x5b, 0xbc, 0xcf, 0x3b, 0xff, 0xbe, 0x22, 0xbe, 0x81, 0x56,
0x61, 0x50, 0x65, 0x08, 0xb7, 0x2d, 0xf6, 0xbd, 0xfd, 0x42, 0x4e, 0xe0, 0x9d, 0xfb, 0x79, 0xfb,
0xf4, 0x7c, 0x69, 0xda, 0xa7, 0x68, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x72, 0x68, 0xb2,
0x9b, 0x04, 0x00, 0x00,
// 528 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0x95, 0x9b, 0x2f, 0x32, 0x49, 0xda, 0x66, 0x15, 0x14, 0xcb, 0xe5, 0x10, 0x99, 0x4b, 0x2a,
0xa1, 0x48, 0x24, 0xe2, 0x02, 0x5c, 0x20, 0x45, 0x28, 0x5c, 0xa8, 0xdc, 0x9c, 0xb8, 0x44, 0xc6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, 0xb0, 0x17, 0xff, 0xa0, 0x5f, 0xce, 0xca, 0xc0, 0xbd, 0x82, 0x56, 0x1e, 0x54, 0x32, 0x2c,
0xa7, 0xb7, 0xa3, 0x7b, 0xd7, 0x6f, 0x1f, 0x00, 0x76, 0x46, 0x57, 0xee, 0xdc, 0xcb, 0x4a, 0x70,
0x72, 0xe7, 0xcc, 0xad, 0x61, 0xfa, 0xdb, 0x03, 0x88, 0x96, 0xf3, 0x42, 0xc9, 0x0c, 0xea, 0xc6,
0x1d, 0x32, 0x28, 0xff, 0xa9, 0xc4, 0x26, 0x78, 0xfa, 0x4f, 0x37, 0xb7, 0xf0, 0x1d, 0x34, 0x3e,
0x1b, 0x6f, 0xc9, 0x7d, 0xde, 0x05, 0xf7, 0x0d, 0xc9, 0x5b, 0x68, 0xe5, 0x06, 0x55, 0x96, 0x70,
0xdb, 0xe2, 0xc0, 0xdf, 0x1f, 0x38, 0x02, 0xef, 0xdb, 0x5f, 0x8a, 0x47, 0xe7, 0x6b, 0xd3, 0x3e,
0x42, 0xb3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xd8, 0xff, 0xa8, 0x95, 0x04, 0x00, 0x00,
}

View File

@@ -2605,39 +2605,38 @@ func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error)
}
var twirpFileDescriptor0 = []byte{
// 532 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x4c,
0x14, 0x95, 0x9b, 0xbf, 0xcf, 0x37, 0x49, 0xdb, 0x5c, 0xe5, 0x53, 0x2c, 0x17, 0xa4, 0xc8, 0x6c,
0x52, 0x09, 0x45, 0x22, 0x11, 0x1b, 0x60, 0x03, 0x29, 0x42, 0x61, 0x43, 0x35, 0xcd, 0x8a, 0x4d,
0x64, 0xec, 0x1b, 0x69, 0x94, 0xd8, 0x63, 0x66, 0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0x04, 0x7e, 0xaf, 0xac, 0x95, 0xb1, 0x7b, 0x09,
0xad, 0x22, 0xae, 0x38, 0x28, 0xab, 0xb7, 0x03, 0x7c, 0xd7, 0xb6, 0xf7, 0x00, 0x3b, 0xbb, 0x2b,
0x77, 0xee, 0x25, 0xc6, 0x3f, 0xb9, 0xb3, 0x96, 0x8f, 0x61, 0xf2, 0xcb, 0x01, 0x60, 0x8b, 0xd9,
0x56, 0xc9, 0x14, 0xea, 0xc6, 0x1d, 0xec, 0x97, 0x7b, 0x2a, 0xe1, 0xf1, 0xff, 0xff, 0x0b, 0x2d,
0x2c, 0x7c, 0x0b, 0x8d, 0x4f, 0xc6, 0x5b, 0xbc, 0xcf, 0x3b, 0xff, 0xbe, 0x22, 0xbe, 0x81, 0x56,
0x61, 0x50, 0x65, 0x08, 0xb7, 0x2d, 0xf6, 0xbd, 0xfd, 0x42, 0x4e, 0xe0, 0x9d, 0xfb, 0x79, 0xfb,
0xf4, 0x7c, 0x69, 0xda, 0xa7, 0x68, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x72, 0x68, 0xb2,
0x9b, 0x04, 0x00, 0x00,
// 528 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0x95, 0x9b, 0x2f, 0x32, 0x49, 0xda, 0x66, 0x15, 0x14, 0xcb, 0xe5, 0x10, 0x99, 0x4b, 0x2a,
0xa1, 0x48, 0x24, 0xe2, 0x02, 0x5c, 0x20, 0x45, 0x28, 0x5c, 0xa8, 0xdc, 0x9c, 0xb8, 0x44, 0xc6,
0x9e, 0x48, 0xab, 0xc4, 0xbb, 0xcb, 0xee, 0xb6, 0xb4, 0x12, 0x3f, 0x80, 0xff, 0xc0, 0xbf, 0xe1,
0xc4, 0xcf, 0x42, 0xbb, 0x6b, 0x3b, 0x2e, 0x29, 0x6d,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57, 0xee, 0xdc, 0xcb, 0x4a, 0x70,
0x72, 0xe7, 0xcc, 0xad, 0x61, 0xfa, 0xdb, 0x03, 0x88, 0x96, 0xf3, 0x42, 0xc9, 0x0c, 0xea, 0xc6,
0x1d, 0x32, 0x28, 0xff, 0xa9, 0xc4, 0x26, 0x78, 0xfa, 0x4f, 0x37, 0xb7, 0xf0, 0x1d, 0x34, 0x3e,
0x1b, 0x6f, 0xc9, 0x7d, 0xde, 0x05, 0xf7, 0x0d, 0xc9, 0x5b, 0x68, 0xe5, 0x06, 0x55, 0x96, 0x70,
0xdb, 0xe2, 0xc0, 0xdf, 0x1f, 0x38, 0x02, 0xef, 0xdb, 0x5f, 0x8a, 0x47, 0xe7, 0x6b, 0xd3, 0x3e,
0x42, 0xb3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xd8, 0xff, 0xa8, 0x95, 0x04, 0x00, 0x00,
}

View File

@@ -53,7 +53,7 @@ service RTCService {
message JoinRequest {
string room_id = 1;
string token = 2;
string session_id = 3;
string peer_id = 3;
SessionDescription offer = 4;
}