Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sfu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
sfu
Commits
938d231b
Commit
938d231b
authored
Sep 13, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make API a method of group.
parent
22c6ad6b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
group.go
group.go
+4
-0
rtpconn.go
rtpconn.go
+3
-3
webclient.go
webclient.go
+1
-1
No files found.
group.go
View file @
938d231b
...
@@ -47,6 +47,10 @@ var groups struct {
...
@@ -47,6 +47,10 @@ var groups struct {
api
*
webrtc
.
API
api
*
webrtc
.
API
}
}
func
(
g
*
group
)
API
()
*
webrtc
.
API
{
return
groups
.
api
}
func
addGroup
(
name
string
,
desc
*
groupDescription
)
(
*
group
,
error
)
{
func
addGroup
(
name
string
,
desc
*
groupDescription
)
(
*
group
,
error
)
{
groups
.
mu
.
Lock
()
groups
.
mu
.
Lock
()
defer
groups
.
mu
.
Unlock
()
defer
groups
.
mu
.
Unlock
()
...
...
rtpconn.go
View file @
938d231b
...
@@ -109,8 +109,8 @@ type rtpDownConnection struct {
...
@@ -109,8 +109,8 @@ type rtpDownConnection struct {
iceCandidates
[]
*
webrtc
.
ICECandidateInit
iceCandidates
[]
*
webrtc
.
ICECandidateInit
}
}
func
newDownConn
(
id
string
,
remote
upConnection
)
(
*
rtpDownConnection
,
error
)
{
func
newDownConn
(
c
client
,
id
string
,
remote
upConnection
)
(
*
rtpDownConnection
,
error
)
{
pc
,
err
:=
groups
.
api
.
NewPeerConnection
(
iceConfiguration
())
pc
,
err
:=
c
.
Group
()
.
API
()
.
NewPeerConnection
(
iceConfiguration
())
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -371,7 +371,7 @@ func (up *rtpUpConnection) complete() bool {
...
@@ -371,7 +371,7 @@ func (up *rtpUpConnection) complete() bool {
}
}
func
newUpConn
(
c
client
,
id
string
)
(
*
rtpUpConnection
,
error
)
{
func
newUpConn
(
c
client
,
id
string
)
(
*
rtpUpConnection
,
error
)
{
pc
,
err
:=
groups
.
api
.
NewPeerConnection
(
iceConfiguration
())
pc
,
err
:=
c
.
Group
()
.
API
()
.
NewPeerConnection
(
iceConfiguration
())
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
webclient.go
View file @
938d231b
...
@@ -302,7 +302,7 @@ func getConn(c *webClient, id string) iceConnection {
...
@@ -302,7 +302,7 @@ func getConn(c *webClient, id string) iceConnection {
}
}
func
addDownConn
(
c
*
webClient
,
id
string
,
remote
upConnection
)
(
*
rtpDownConnection
,
error
)
{
func
addDownConn
(
c
*
webClient
,
id
string
,
remote
upConnection
)
(
*
rtpDownConnection
,
error
)
{
conn
,
err
:=
newDownConn
(
id
,
remote
)
conn
,
err
:=
newDownConn
(
c
,
id
,
remote
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment