Skip to content

Commit

Permalink
[RSDK-7505] fix rtp_passthrough reconfigure (#3792)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksanford authored May 3, 2024
1 parent 2e70240 commit 30f6012
Show file tree
Hide file tree
Showing 22 changed files with 2,699 additions and 804 deletions.
9 changes: 4 additions & 5 deletions components/camera/camera.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"sync"
"time"

"github.com/google/uuid"
"github.com/pion/mediadevices/pkg/prop"
"github.com/pkg/errors"
"go.opencensus.io/trace"
Expand Down Expand Up @@ -178,11 +177,11 @@ func (vs *sourceBasedCamera) SubscribeRTP(
ctx context.Context,
bufferSize int,
packetsCB rtppassthrough.PacketCallback,
) (rtppassthrough.SubscriptionID, error) {
) (rtppassthrough.Subscription, error) {
if vs.rtpPassthroughSource != nil {
return vs.rtpPassthroughSource.SubscribeRTP(ctx, bufferSize, packetsCB)
}
return uuid.Nil, errors.New("SubscribeRTP unimplemented")
return rtppassthrough.NilSubscription, errors.New("SubscribeRTP unimplemented")
}

func (vs *sourceBasedCamera) Unsubscribe(ctx context.Context, id rtppassthrough.SubscriptionID) error {
Expand Down Expand Up @@ -242,11 +241,11 @@ func (vs *videoSource) SubscribeRTP(
ctx context.Context,
bufferSize int,
packetsCB rtppassthrough.PacketCallback,
) (rtppassthrough.SubscriptionID, error) {
) (rtppassthrough.Subscription, error) {
if vs.rtpPassthroughSource != nil {
return vs.rtpPassthroughSource.SubscribeRTP(ctx, bufferSize, packetsCB)
}
return uuid.Nil, errors.New("SubscribeRTP unimplemented")
return rtppassthrough.NilSubscription, errors.New("SubscribeRTP unimplemented")
}

func (vs *videoSource) Unsubscribe(ctx context.Context, id rtppassthrough.SubscriptionID) error {
Expand Down
Loading

0 comments on commit 30f6012

Please sign in to comment.