Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Aug 25, 2023
1 parent 51d1836 commit 91ee324
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
github.com/livekit/protocol v1.6.2-0.20230825070127-9f0a8f87da8d
github.com/livekit/psrpc v0.3.3
github.com/livekit/server-sdk-go v1.0.17-0.20230825075524-cb221e2829b0
github.com/livekit/server-sdk-go v1.0.17-0.20230825204729-fcf5bdfadd2c
github.com/pion/rtp v1.8.1
github.com/pion/webrtc/v3 v3.2.16
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ github.com/livekit/protocol v1.6.2-0.20230825070127-9f0a8f87da8d h1:PCFKd1f72grQ
github.com/livekit/protocol v1.6.2-0.20230825070127-9f0a8f87da8d/go.mod h1:/JuO+G/btZ5gNwX2+901L6za3UvVO6DHRXHsv8kkLsU=
github.com/livekit/psrpc v0.3.3 h1:+lltbuN39IdaynXhLLxRShgYqYsRMWeeXKzv60oqyWo=
github.com/livekit/psrpc v0.3.3/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U=
github.com/livekit/server-sdk-go v1.0.17-0.20230825075524-cb221e2829b0 h1:Wm/4/ppUgpSJ45rgwnreEnWqeEiKZ9j30I60TF/UgwE=
github.com/livekit/server-sdk-go v1.0.17-0.20230825075524-cb221e2829b0/go.mod h1:lLDZe/p7v4xaVTRMAXXDFWg3PQwGKZQ3hCcLYbVD27k=
github.com/livekit/server-sdk-go v1.0.17-0.20230825204729-fcf5bdfadd2c h1:tFuVYn9UL6ln6Fwfu0SV3R19tB06OUYluNRxZLtYa+8=
github.com/livekit/server-sdk-go v1.0.17-0.20230825204729-fcf5bdfadd2c/go.mod h1:lLDZe/p7v4xaVTRMAXXDFWg3PQwGKZQ3hCcLYbVD27k=
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ=
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
Expand Down
9 changes: 1 addition & 8 deletions pkg/pipeline/source/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,10 @@ func (s *SDKSource) awaitParticipant(identity string) error {
return err
}

trackCount := 0
for trackCount == 0 || trackCount < len(rp.Tracks()) {
for trackCount := 0; trackCount == 0 || trackCount < len(rp.Tracks()); trackCount++ {
if err = <-s.errors; err != nil {
return err
}
trackCount++
}

s.initialized.Break()
Expand Down Expand Up @@ -293,10 +291,6 @@ func (s *SDKSource) subscribe(track lksdk.TrackPublication) error {
// ----- Callbacks -----

func (s *SDKSource) onTrackSubscribed(track *webrtc.TrackRemote, pub *lksdk.RemoteTrackPublication, rp *lksdk.RemoteParticipant) {
if s.initialized.IsBroken() {
return
}

var onSubscribeErr error
defer func() {
if s.initialized.IsBroken() {
Expand All @@ -309,7 +303,6 @@ func (s *SDKSource) onTrackSubscribed(track *webrtc.TrackRemote, pub *lksdk.Remo
}()

s.active.Inc()

ts := &config.TrackSource{
TrackID: pub.SID(),
Kind: pub.Kind(),
Expand Down
4 changes: 0 additions & 4 deletions pkg/pipeline/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ func parseDebugInfo(gErr *gst.GError) (element, name, message string) {
}

func (c *Controller) handleMessageStateChanged(msg *gst.Message) {
if c.playing.IsBroken() {
return
}

_, newState := msg.ParseStateChanged()
if newState != gst.StatePlaying {
return
Expand Down
2 changes: 1 addition & 1 deletion test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (r *Runner) getUpdate(t *testing.T, egressID string) *livekit.EgressInfo {
return info
}

case <-time.After(time.Minute):
case <-time.After(time.Second * 30):
t.Fatal("no update from results channel")
return nil
}
Expand Down
7 changes: 3 additions & 4 deletions test/participant.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ func (r *Runner) testParticipantStream(t *testing.T) {
}

test := &testCase{
audioCodec: types.MimeTypeOpus,
audioDelay: time.Second * 10,
videoCodec: types.MimeTypeVP8,
videoUnpublish: time.Second * 20,
audioCodec: types.MimeTypeOpus,
audioDelay: time.Second * 10,
videoCodec: types.MimeTypeVP8,
}

r.runParticipantTest(t, "Participant/Stream", test,
Expand Down
1 change: 1 addition & 0 deletions test/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (r *Runner) runStreamTest(t *testing.T, req *rpc.StartEgressRequest, test *
// verify and check updates
time.Sleep(time.Second * 5)
r.verifyStreams(t, p, streamUrl1, streamUrl2)

r.checkStreamUpdate(t, egressID, map[string]livekit.StreamInfo_Status{
redactedUrl1: livekit.StreamInfo_ACTIVE,
redactedUrl2: livekit.StreamInfo_ACTIVE,
Expand Down

0 comments on commit 91ee324

Please sign in to comment.