diff --git a/go.mod b/go.mod index f6e99cae..a8ac814f 100644 --- a/go.mod +++ b/go.mod @@ -17,8 +17,8 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/livekit/livekit-server v1.4.6-0.20230918194757-8a0d417a8c99 github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 - github.com/livekit/protocol v1.8.1-0.20231018194636-fac7f187fc16 - github.com/livekit/psrpc v0.3.3 + github.com/livekit/protocol v1.8.1-0.20231023233555-b34cb4eb7fad + github.com/livekit/psrpc v0.3.4 github.com/livekit/server-sdk-go v1.1.1 github.com/pion/rtp v1.8.2 github.com/pion/webrtc/v3 v3.2.21 diff --git a/go.sum b/go.sum index 50b97a7d..a48ac5a7 100644 --- a/go.sum +++ b/go.sum @@ -174,10 +174,10 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20231017082622-43f077b4e60e h1:yNeIo7MSMUWgoLu7LkNKnBYnJBFPFH9Wq4S6h1kS44M= github.com/livekit/mediatransportutil v0.0.0-20231017082622-43f077b4e60e/go.mod h1:+WIOYwiBMive5T81V8B2wdAc2zQNRjNQiJIcPxMTILY= -github.com/livekit/protocol v1.8.1-0.20231018194636-fac7f187fc16 h1:0Ca5hQP9+DaRjrr5d9msNhfCL+CBvcxqLdh4xOXAZeU= -github.com/livekit/protocol v1.8.1-0.20231018194636-fac7f187fc16/go.mod h1:K47UnOyc9C0L9LEBDznwd1NMBSsohgyhfurshU5f+4Y= -github.com/livekit/psrpc v0.3.3 h1:+lltbuN39IdaynXhLLxRShgYqYsRMWeeXKzv60oqyWo= -github.com/livekit/psrpc v0.3.3/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U= +github.com/livekit/protocol v1.8.1-0.20231023233555-b34cb4eb7fad h1:DhC9lGb7zW4hwiwkSNv5SAryKUKsEVIhvGfYWJ925SQ= +github.com/livekit/protocol v1.8.1-0.20231023233555-b34cb4eb7fad/go.mod h1:BjfAXfg3KIb58tk6S6Bd7b3t1vh1kejHhmhxt2egYas= +github.com/livekit/psrpc v0.3.4 h1:bdge+SceBG3UOlmJorNGeE/9oB7pEA2y5rq5nWZeLxo= +github.com/livekit/psrpc v0.3.4/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U= github.com/livekit/server-sdk-go v1.1.1 h1:TkDD/Ecyh7XNuxgxhpsDQ1uzbTlDWwwJrbkyUjQmcbY= github.com/livekit/server-sdk-go v1.1.1/go.mod h1:724BcsVjpsQu8zK9VX2TfdEWt+DtsBeT3EnMrDbyT3I= github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs= diff --git a/pkg/pipeline/controller.go b/pkg/pipeline/controller.go index 8aae704f..ea9fffc6 100644 --- a/pkg/pipeline/controller.go +++ b/pkg/pipeline/controller.go @@ -35,7 +35,6 @@ import ( "github.com/livekit/protocol/rpc" "github.com/livekit/protocol/tracer" "github.com/livekit/protocol/utils" - "github.com/livekit/psrpc" ) const ( @@ -314,13 +313,6 @@ func (c *Controller) UpdateStream(ctx context.Context, req *livekit.UpdateStream return errs.ToError() } -func (c *Controller) UpdateOutputs(ctx context.Context, req *livekit.UpdateOutputsRequest) error { - ctx, span := tracer.Start(ctx, "Pipeline.UpdateOutputs") - defer span.End() - - return psrpc.NewErrorf(psrpc.Unimplemented, "Updating outputs unimplemented") -} - func (c *Controller) removeSink(ctx context.Context, url string, streamErr error) error { now := time.Now().UnixNano() diff --git a/pkg/service/handler.go b/pkg/service/handler.go index eb79459e..3b2ec8a4 100644 --- a/pkg/service/handler.go +++ b/pkg/service/handler.go @@ -142,21 +142,6 @@ func (h *Handler) UpdateStream(ctx context.Context, req *livekit.UpdateStreamReq return h.pipeline.Info, nil } -func (h *Handler) UpdateOutputs(ctx context.Context, req *livekit.UpdateOutputsRequest) (*livekit.EgressInfo, error) { - ctx, span := tracer.Start(ctx, "Handler.UpdateOutputs") - defer span.End() - - if h.pipeline == nil { - return nil, errors.ErrEgressNotFound - } - - err := h.pipeline.UpdateOutputs(ctx, req) - if err != nil { - return nil, err - } - return h.pipeline.Info, nil -} - func (h *Handler) StopEgress(ctx context.Context, _ *livekit.StopEgressRequest) (*livekit.EgressInfo, error) { ctx, span := tracer.Start(ctx, "Handler.StopEgress") defer span.End() diff --git a/pkg/service/service.go b/pkg/service/service.go index f51d821f..22625e32 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -152,7 +152,7 @@ func (s *Service) StartEgress(ctx context.Context, req *rpc.StartEgressRequest) return p.Info, nil } -func (s *Service) StartEgressAffinity(req *rpc.StartEgressRequest) float32 { +func (s *Service) StartEgressAffinity(ctx context.Context, req *rpc.StartEgressRequest) float32 { if !s.CanAcceptRequest(req) { // cannot accept return -1