-
Notifications
You must be signed in to change notification settings - Fork 18
/
sourceinfo.go
50 lines (39 loc) · 840 Bytes
/
sourceinfo.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
package sdp
type SourceInfo struct {
ssrc uint
cname string
streamID string
trackID string
}
func NewSourceInfo(ssrc uint) *SourceInfo {
return &SourceInfo{ssrc: ssrc}
}
func (s *SourceInfo) Clone() *SourceInfo {
cloned := &SourceInfo{}
cloned.ssrc = s.ssrc
cloned.cname = s.cname
cloned.streamID = s.streamID
cloned.trackID = s.trackID
return cloned
}
func (s *SourceInfo) GetCName() string {
return s.cname
}
func (s *SourceInfo) SetCName(cname string) {
s.cname = cname
}
func (s *SourceInfo) GetStreamID() string {
return s.streamID
}
func (s *SourceInfo) SetStreamID(streamID string) {
s.streamID = streamID
}
func (s *SourceInfo) GetTrackID() string {
return s.trackID
}
func (s *SourceInfo) SetTrackID(trackID string) {
s.trackID = trackID
}
func (s *SourceInfo) GetSSRC() uint {
return s.ssrc
}