mirror of
https://github.com/livekit/livekit.git
synced 2026-04-20 05:35:47 +00:00
update name to PacketTrailerFeature
This commit is contained in:
@@ -518,8 +518,8 @@ func (t *MediaTrackReceiver) IsEncrypted() bool {
|
||||
return t.TrackInfo().Encryption != livekit.Encryption_NONE
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) HasRTPTrailerFeature(feature livekit.RTPTrailerFeature) bool {
|
||||
return slices.Contains(t.TrackInfo().GetRtpTrailerFeatures(), feature)
|
||||
func (t *MediaTrackReceiver) HasPacketTrailerFeature(feature livekit.PacketTrailerFeature) bool {
|
||||
return slices.Contains(t.TrackInfo().GetPacketTrailerFeatures(), feature)
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) AddOnClose(f func(isExpectedToResume bool)) {
|
||||
|
||||
@@ -129,7 +129,7 @@ func NewSubscribedTrack(params SubscribedTrackParams) (*SubscribedTrack, error)
|
||||
if isEncrypted {
|
||||
trailer = params.Subscriber.GetTrailer()
|
||||
}
|
||||
stripUserTimestamp := params.MediaTrack.HasRTPTrailerFeature(livekit.RTPTrailerFeature_USER_TIMESTAMP) &&
|
||||
stripUserTimestamp := params.MediaTrack.HasPacketTrailerFeature(livekit.PacketTrailerFeature_PTF_USER_TIMESTAMP) &&
|
||||
!params.Subscriber.ProtocolVersion().SupportsUserTimestamp()
|
||||
downTrack, err := sfu.NewDownTrack(sfu.DownTrackParams{
|
||||
Codecs: codecs,
|
||||
|
||||
@@ -761,7 +761,7 @@ type MediaTrack interface {
|
||||
ClearAllReceivers(isExpectedToResume bool)
|
||||
|
||||
IsEncrypted() bool
|
||||
HasRTPTrailerFeature(livekit.RTPTrailerFeature) bool
|
||||
HasPacketTrailerFeature(livekit.PacketTrailerFeature) bool
|
||||
}
|
||||
|
||||
//counterfeiter:generate . LocalMediaTrack
|
||||
|
||||
@@ -124,15 +124,15 @@ type FakeLocalMediaTrack struct {
|
||||
getTrackStatsReturnsOnCall map[int]struct {
|
||||
result1 *livekit.RTPStats
|
||||
}
|
||||
HasRTPTrailerFeatureStub func(livekit.RTPTrailerFeature) bool
|
||||
hasRTPTrailerFeatureMutex sync.RWMutex
|
||||
hasRTPTrailerFeatureArgsForCall []struct {
|
||||
arg1 livekit.RTPTrailerFeature
|
||||
HasPacketTrailerFeatureStub func(livekit.PacketTrailerFeature) bool
|
||||
hasPacketTrailerFeatureMutex sync.RWMutex
|
||||
hasPacketTrailerFeatureArgsForCall []struct {
|
||||
arg1 livekit.PacketTrailerFeature
|
||||
}
|
||||
hasRTPTrailerFeatureReturns struct {
|
||||
hasPacketTrailerFeatureReturns struct {
|
||||
result1 bool
|
||||
}
|
||||
hasRTPTrailerFeatureReturnsOnCall map[int]struct {
|
||||
hasPacketTrailerFeatureReturnsOnCall map[int]struct {
|
||||
result1 bool
|
||||
}
|
||||
HasSdpCidStub func(string) bool
|
||||
@@ -961,16 +961,16 @@ func (fake *FakeLocalMediaTrack) GetTrackStatsReturnsOnCall(i int, result1 *live
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) HasRTPTrailerFeature(arg1 livekit.RTPTrailerFeature) bool {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
ret, specificReturn := fake.hasRTPTrailerFeatureReturnsOnCall[len(fake.hasRTPTrailerFeatureArgsForCall)]
|
||||
fake.hasRTPTrailerFeatureArgsForCall = append(fake.hasRTPTrailerFeatureArgsForCall, struct {
|
||||
arg1 livekit.RTPTrailerFeature
|
||||
func (fake *FakeLocalMediaTrack) HasPacketTrailerFeature(arg1 livekit.PacketTrailerFeature) bool {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
ret, specificReturn := fake.hasPacketTrailerFeatureReturnsOnCall[len(fake.hasPacketTrailerFeatureArgsForCall)]
|
||||
fake.hasPacketTrailerFeatureArgsForCall = append(fake.hasPacketTrailerFeatureArgsForCall, struct {
|
||||
arg1 livekit.PacketTrailerFeature
|
||||
}{arg1})
|
||||
stub := fake.HasRTPTrailerFeatureStub
|
||||
fakeReturns := fake.hasRTPTrailerFeatureReturns
|
||||
fake.recordInvocation("HasRTPTrailerFeature", []interface{}{arg1})
|
||||
fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
stub := fake.HasPacketTrailerFeatureStub
|
||||
fakeReturns := fake.hasPacketTrailerFeatureReturns
|
||||
fake.recordInvocation("HasPacketTrailerFeature", []interface{}{arg1})
|
||||
fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
if stub != nil {
|
||||
return stub(arg1)
|
||||
}
|
||||
@@ -980,44 +980,44 @@ func (fake *FakeLocalMediaTrack) HasRTPTrailerFeature(arg1 livekit.RTPTrailerFea
|
||||
return fakeReturns.result1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) HasRTPTrailerFeatureCallCount() int {
|
||||
fake.hasRTPTrailerFeatureMutex.RLock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.RUnlock()
|
||||
return len(fake.hasRTPTrailerFeatureArgsForCall)
|
||||
func (fake *FakeLocalMediaTrack) HasPacketTrailerFeatureCallCount() int {
|
||||
fake.hasPacketTrailerFeatureMutex.RLock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.RUnlock()
|
||||
return len(fake.hasPacketTrailerFeatureArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) HasRTPTrailerFeatureCalls(stub func(livekit.RTPTrailerFeature) bool) {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
fake.HasRTPTrailerFeatureStub = stub
|
||||
func (fake *FakeLocalMediaTrack) HasPacketTrailerFeatureCalls(stub func(livekit.PacketTrailerFeature) bool) {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
fake.HasPacketTrailerFeatureStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) HasRTPTrailerFeatureArgsForCall(i int) livekit.RTPTrailerFeature {
|
||||
fake.hasRTPTrailerFeatureMutex.RLock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.RUnlock()
|
||||
argsForCall := fake.hasRTPTrailerFeatureArgsForCall[i]
|
||||
func (fake *FakeLocalMediaTrack) HasPacketTrailerFeatureArgsForCall(i int) livekit.PacketTrailerFeature {
|
||||
fake.hasPacketTrailerFeatureMutex.RLock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.RUnlock()
|
||||
argsForCall := fake.hasPacketTrailerFeatureArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) HasRTPTrailerFeatureReturns(result1 bool) {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
fake.HasRTPTrailerFeatureStub = nil
|
||||
fake.hasRTPTrailerFeatureReturns = struct {
|
||||
func (fake *FakeLocalMediaTrack) HasPacketTrailerFeatureReturns(result1 bool) {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
fake.HasPacketTrailerFeatureStub = nil
|
||||
fake.hasPacketTrailerFeatureReturns = struct {
|
||||
result1 bool
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) HasRTPTrailerFeatureReturnsOnCall(i int, result1 bool) {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
fake.HasRTPTrailerFeatureStub = nil
|
||||
if fake.hasRTPTrailerFeatureReturnsOnCall == nil {
|
||||
fake.hasRTPTrailerFeatureReturnsOnCall = make(map[int]struct {
|
||||
func (fake *FakeLocalMediaTrack) HasPacketTrailerFeatureReturnsOnCall(i int, result1 bool) {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
fake.HasPacketTrailerFeatureStub = nil
|
||||
if fake.hasPacketTrailerFeatureReturnsOnCall == nil {
|
||||
fake.hasPacketTrailerFeatureReturnsOnCall = make(map[int]struct {
|
||||
result1 bool
|
||||
})
|
||||
}
|
||||
fake.hasRTPTrailerFeatureReturnsOnCall[i] = struct {
|
||||
fake.hasPacketTrailerFeatureReturnsOnCall[i] = struct {
|
||||
result1 bool
|
||||
}{result1}
|
||||
}
|
||||
|
||||
@@ -98,15 +98,15 @@ type FakeMediaTrack struct {
|
||||
getTemporalLayerForSpatialFpsReturnsOnCall map[int]struct {
|
||||
result1 int32
|
||||
}
|
||||
HasRTPTrailerFeatureStub func(livekit.RTPTrailerFeature) bool
|
||||
hasRTPTrailerFeatureMutex sync.RWMutex
|
||||
hasRTPTrailerFeatureArgsForCall []struct {
|
||||
arg1 livekit.RTPTrailerFeature
|
||||
HasPacketTrailerFeatureStub func(livekit.PacketTrailerFeature) bool
|
||||
hasPacketTrailerFeatureMutex sync.RWMutex
|
||||
hasPacketTrailerFeatureArgsForCall []struct {
|
||||
arg1 livekit.PacketTrailerFeature
|
||||
}
|
||||
hasRTPTrailerFeatureReturns struct {
|
||||
hasPacketTrailerFeatureReturns struct {
|
||||
result1 bool
|
||||
}
|
||||
hasRTPTrailerFeatureReturnsOnCall map[int]struct {
|
||||
hasPacketTrailerFeatureReturnsOnCall map[int]struct {
|
||||
result1 bool
|
||||
}
|
||||
IDStub func() livekit.TrackID
|
||||
@@ -753,16 +753,16 @@ func (fake *FakeMediaTrack) GetTemporalLayerForSpatialFpsReturnsOnCall(i int, re
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) HasRTPTrailerFeature(arg1 livekit.RTPTrailerFeature) bool {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
ret, specificReturn := fake.hasRTPTrailerFeatureReturnsOnCall[len(fake.hasRTPTrailerFeatureArgsForCall)]
|
||||
fake.hasRTPTrailerFeatureArgsForCall = append(fake.hasRTPTrailerFeatureArgsForCall, struct {
|
||||
arg1 livekit.RTPTrailerFeature
|
||||
func (fake *FakeMediaTrack) HasPacketTrailerFeature(arg1 livekit.PacketTrailerFeature) bool {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
ret, specificReturn := fake.hasPacketTrailerFeatureReturnsOnCall[len(fake.hasPacketTrailerFeatureArgsForCall)]
|
||||
fake.hasPacketTrailerFeatureArgsForCall = append(fake.hasPacketTrailerFeatureArgsForCall, struct {
|
||||
arg1 livekit.PacketTrailerFeature
|
||||
}{arg1})
|
||||
stub := fake.HasRTPTrailerFeatureStub
|
||||
fakeReturns := fake.hasRTPTrailerFeatureReturns
|
||||
fake.recordInvocation("HasRTPTrailerFeature", []interface{}{arg1})
|
||||
fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
stub := fake.HasPacketTrailerFeatureStub
|
||||
fakeReturns := fake.hasPacketTrailerFeatureReturns
|
||||
fake.recordInvocation("HasPacketTrailerFeature", []interface{}{arg1})
|
||||
fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
if stub != nil {
|
||||
return stub(arg1)
|
||||
}
|
||||
@@ -772,44 +772,44 @@ func (fake *FakeMediaTrack) HasRTPTrailerFeature(arg1 livekit.RTPTrailerFeature)
|
||||
return fakeReturns.result1
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) HasRTPTrailerFeatureCallCount() int {
|
||||
fake.hasRTPTrailerFeatureMutex.RLock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.RUnlock()
|
||||
return len(fake.hasRTPTrailerFeatureArgsForCall)
|
||||
func (fake *FakeMediaTrack) HasPacketTrailerFeatureCallCount() int {
|
||||
fake.hasPacketTrailerFeatureMutex.RLock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.RUnlock()
|
||||
return len(fake.hasPacketTrailerFeatureArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) HasRTPTrailerFeatureCalls(stub func(livekit.RTPTrailerFeature) bool) {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
fake.HasRTPTrailerFeatureStub = stub
|
||||
func (fake *FakeMediaTrack) HasPacketTrailerFeatureCalls(stub func(livekit.PacketTrailerFeature) bool) {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
fake.HasPacketTrailerFeatureStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) HasRTPTrailerFeatureArgsForCall(i int) livekit.RTPTrailerFeature {
|
||||
fake.hasRTPTrailerFeatureMutex.RLock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.RUnlock()
|
||||
argsForCall := fake.hasRTPTrailerFeatureArgsForCall[i]
|
||||
func (fake *FakeMediaTrack) HasPacketTrailerFeatureArgsForCall(i int) livekit.PacketTrailerFeature {
|
||||
fake.hasPacketTrailerFeatureMutex.RLock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.RUnlock()
|
||||
argsForCall := fake.hasPacketTrailerFeatureArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) HasRTPTrailerFeatureReturns(result1 bool) {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
fake.HasRTPTrailerFeatureStub = nil
|
||||
fake.hasRTPTrailerFeatureReturns = struct {
|
||||
func (fake *FakeMediaTrack) HasPacketTrailerFeatureReturns(result1 bool) {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
fake.HasPacketTrailerFeatureStub = nil
|
||||
fake.hasPacketTrailerFeatureReturns = struct {
|
||||
result1 bool
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) HasRTPTrailerFeatureReturnsOnCall(i int, result1 bool) {
|
||||
fake.hasRTPTrailerFeatureMutex.Lock()
|
||||
defer fake.hasRTPTrailerFeatureMutex.Unlock()
|
||||
fake.HasRTPTrailerFeatureStub = nil
|
||||
if fake.hasRTPTrailerFeatureReturnsOnCall == nil {
|
||||
fake.hasRTPTrailerFeatureReturnsOnCall = make(map[int]struct {
|
||||
func (fake *FakeMediaTrack) HasPacketTrailerFeatureReturnsOnCall(i int, result1 bool) {
|
||||
fake.hasPacketTrailerFeatureMutex.Lock()
|
||||
defer fake.hasPacketTrailerFeatureMutex.Unlock()
|
||||
fake.HasPacketTrailerFeatureStub = nil
|
||||
if fake.hasPacketTrailerFeatureReturnsOnCall == nil {
|
||||
fake.hasPacketTrailerFeatureReturnsOnCall = make(map[int]struct {
|
||||
result1 bool
|
||||
})
|
||||
}
|
||||
fake.hasRTPTrailerFeatureReturnsOnCall[i] = struct {
|
||||
fake.hasPacketTrailerFeatureReturnsOnCall[i] = struct {
|
||||
result1 bool
|
||||
}{result1}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user