1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 23:35:46 +01:00

Rename streamCount to trackCount.

This commit is contained in:
Juliusz Chroboczek 2020-04-26 00:39:07 +02:00
parent 78d3b7ab40
commit 98034c0f6f
2 changed files with 4 additions and 4 deletions

View file

@ -285,7 +285,7 @@ func addUpConn(c *client, id string) (*upConnection, error) {
remote: remote,
local: local,
})
done := len(u.pairs) >= u.streamCount
done := len(u.pairs) >= u.trackCount
c.group.mu.Unlock()
clients := c.group.getClients(c)
@ -610,7 +610,7 @@ func gotOffer(c *client, offer webrtc.SessionDescription, id string) error {
log.Printf("Couldn't parse SDP: %v", err)
n = 2
}
up.streamCount = n
up.trackCount = n
err = up.pc.SetRemoteDescription(offer)
if err != nil {
return err
@ -762,7 +762,7 @@ func clientLoop(c *client, conn *websocket.Conn) error {
for _, u := range c.up {
var done bool
for i, p := range u.pairs {
done = i >= u.streamCount-1
done = i >= u.trackCount-1
a.c.action(addTrackAction{
u.id, p.local, u,
done,

View file

@ -27,7 +27,7 @@ type upConnection struct {
pc *webrtc.PeerConnection
maxAudioBitrate uint32
maxVideoBitrate uint32
streamCount int
trackCount int
pairs []trackPair
}