Commit 98034c0f authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rename streamCount to trackCount.

parent 78d3b7ab
...@@ -285,7 +285,7 @@ func addUpConn(c *client, id string) (*upConnection, error) { ...@@ -285,7 +285,7 @@ func addUpConn(c *client, id string) (*upConnection, error) {
remote: remote, remote: remote,
local: local, local: local,
}) })
done := len(u.pairs) >= u.streamCount done := len(u.pairs) >= u.trackCount
c.group.mu.Unlock() c.group.mu.Unlock()
clients := c.group.getClients(c) clients := c.group.getClients(c)
...@@ -610,7 +610,7 @@ func gotOffer(c *client, offer webrtc.SessionDescription, id string) error { ...@@ -610,7 +610,7 @@ func gotOffer(c *client, offer webrtc.SessionDescription, id string) error {
log.Printf("Couldn't parse SDP: %v", err) log.Printf("Couldn't parse SDP: %v", err)
n = 2 n = 2
} }
up.streamCount = n up.trackCount = n
err = up.pc.SetRemoteDescription(offer) err = up.pc.SetRemoteDescription(offer)
if err != nil { if err != nil {
return err return err
...@@ -762,7 +762,7 @@ func clientLoop(c *client, conn *websocket.Conn) error { ...@@ -762,7 +762,7 @@ func clientLoop(c *client, conn *websocket.Conn) error {
for _, u := range c.up { for _, u := range c.up {
var done bool var done bool
for i, p := range u.pairs { for i, p := range u.pairs {
done = i >= u.streamCount-1 done = i >= u.trackCount-1
a.c.action(addTrackAction{ a.c.action(addTrackAction{
u.id, p.local, u, u.id, p.local, u,
done, done,
......
...@@ -27,7 +27,7 @@ type upConnection struct { ...@@ -27,7 +27,7 @@ type upConnection struct {
pc *webrtc.PeerConnection pc *webrtc.PeerConnection
maxAudioBitrate uint32 maxAudioBitrate uint32
maxVideoBitrate uint32 maxVideoBitrate uint32
streamCount int trackCount int
pairs []trackPair pairs []trackPair
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment