Code cleanup (#353)

This commit is contained in:
David Colburn
2022-01-19 02:13:06 -08:00
committed by GitHub
parent 6400de1c10
commit 5bea9debb7
35 changed files with 223 additions and 218 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ func (w *TrackWriter) writeOgg() {
}
func (w *TrackWriter) writeVP8() {
// Send our video file frame at a time. Pace our sending so we send it at the same speed it should be played back as.
// Send our video file frame at a time. Pace our sending such that we send it at the same speed it should be played back as.
// This isn't required since the video is timestamped, but we will such much higher loss if we send all at once.
sleepTime := time.Millisecond * time.Duration((float32(w.ivfheader.TimebaseNumerator)/float32(w.ivfheader.TimebaseDenominator))*1000)
for {
+5 -4
View File
@@ -8,14 +8,15 @@ import (
"testing"
"time"
"github.com/livekit/livekit-server/pkg/rtc"
"github.com/livekit/livekit-server/pkg/testutils"
testclient "github.com/livekit/livekit-server/test/client"
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/livekit"
"github.com/pion/webrtc/v3"
"github.com/stretchr/testify/require"
"github.com/thoas/go-funk"
"github.com/livekit/livekit-server/pkg/rtc"
"github.com/livekit/livekit-server/pkg/testutils"
testclient "github.com/livekit/livekit-server/test/client"
)
func TestClientCouldConnect(t *testing.T) {
@@ -177,7 +178,7 @@ func TestSinglePublisher(t *testing.T) {
require.True(t, strings.HasPrefix(tr.ID(), "TR_"), "track should begin with TR")
}
// when c3 disconnects.. ensure subscriber is cleaned up correctly
// when c3 disconnects, ensure subscriber is cleaned up correctly
c3.Stop()
testutils.WithTimeout(t, "c3 is cleaned up as a subscriber", func() bool {