-
Notifications
You must be signed in to change notification settings - Fork 1
/
track_info.go
52 lines (42 loc) · 910 Bytes
/
track_info.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package rtp
import (
"github.com/google/uuid"
"github.com/pion/webrtc/v3"
)
type TrackInfo struct {
TrackSdpInfo
Track *webrtc.TrackLocalStaticRTP
}
func newTrackInfo(track *webrtc.TrackLocalStaticRTP, sdpInfo TrackSdpInfo) *TrackInfo {
return &TrackInfo{
Track: track,
TrackSdpInfo: sdpInfo,
}
}
func (t *TrackInfo) GetId() uuid.UUID {
return t.Id
}
func (t *TrackInfo) GetPurpose() Purpose {
return t.Purpose
}
func (t *TrackInfo) GetSessionId() uuid.UUID {
return t.SessionId
}
func (t *TrackInfo) GetTrack() *webrtc.TrackLocalStaticRTP {
return t.Track
}
func (t *TrackInfo) GetTrackLocal() webrtc.TrackLocal {
return t.Track
}
func (t *TrackInfo) GetMute() bool {
return t.Mute
}
func (t *TrackInfo) GetIngressMid() string {
return t.IngressMid
}
func (t *TrackInfo) GetEgressMid() string {
return t.EgressMid
}
func (t *TrackInfo) SetMute(mute bool) {
t.Mute = mute
}