Need this for clean up during migration (#965)
This commit is contained in:
@@ -178,6 +178,7 @@ type Participant interface {
|
|||||||
|
|
||||||
GetPublishedTrack(sid livekit.TrackID) MediaTrack
|
GetPublishedTrack(sid livekit.TrackID) MediaTrack
|
||||||
GetPublishedTracks() []MediaTrack
|
GetPublishedTracks() []MediaTrack
|
||||||
|
RemovePublishedTrack(track MediaTrack, willBeResumed bool)
|
||||||
|
|
||||||
AddSubscriber(op LocalParticipant, params AddSubscriberParams) (int, error)
|
AddSubscriber(op LocalParticipant, params AddSubscriberParams) (int, error)
|
||||||
RemoveSubscriber(op LocalParticipant, trackID livekit.TrackID, resume bool)
|
RemoveSubscriber(op LocalParticipant, trackID livekit.TrackID, resume bool)
|
||||||
|
|||||||
@@ -459,6 +459,12 @@ type FakeLocalParticipant struct {
|
|||||||
protocolVersionReturnsOnCall map[int]struct {
|
protocolVersionReturnsOnCall map[int]struct {
|
||||||
result1 types.ProtocolVersion
|
result1 types.ProtocolVersion
|
||||||
}
|
}
|
||||||
|
RemovePublishedTrackStub func(types.MediaTrack, bool)
|
||||||
|
removePublishedTrackMutex sync.RWMutex
|
||||||
|
removePublishedTrackArgsForCall []struct {
|
||||||
|
arg1 types.MediaTrack
|
||||||
|
arg2 bool
|
||||||
|
}
|
||||||
RemoveSubscribedTrackStub func(types.SubscribedTrack)
|
RemoveSubscribedTrackStub func(types.SubscribedTrack)
|
||||||
removeSubscribedTrackMutex sync.RWMutex
|
removeSubscribedTrackMutex sync.RWMutex
|
||||||
removeSubscribedTrackArgsForCall []struct {
|
removeSubscribedTrackArgsForCall []struct {
|
||||||
@@ -3145,6 +3151,39 @@ func (fake *FakeLocalParticipant) ProtocolVersionReturnsOnCall(i int, result1 ty
|
|||||||
}{result1}
|
}{result1}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (fake *FakeLocalParticipant) RemovePublishedTrack(arg1 types.MediaTrack, arg2 bool) {
|
||||||
|
fake.removePublishedTrackMutex.Lock()
|
||||||
|
fake.removePublishedTrackArgsForCall = append(fake.removePublishedTrackArgsForCall, struct {
|
||||||
|
arg1 types.MediaTrack
|
||||||
|
arg2 bool
|
||||||
|
}{arg1, arg2})
|
||||||
|
stub := fake.RemovePublishedTrackStub
|
||||||
|
fake.recordInvocation("RemovePublishedTrack", []interface{}{arg1, arg2})
|
||||||
|
fake.removePublishedTrackMutex.Unlock()
|
||||||
|
if stub != nil {
|
||||||
|
fake.RemovePublishedTrackStub(arg1, arg2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fake *FakeLocalParticipant) RemovePublishedTrackCallCount() int {
|
||||||
|
fake.removePublishedTrackMutex.RLock()
|
||||||
|
defer fake.removePublishedTrackMutex.RUnlock()
|
||||||
|
return len(fake.removePublishedTrackArgsForCall)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fake *FakeLocalParticipant) RemovePublishedTrackCalls(stub func(types.MediaTrack, bool)) {
|
||||||
|
fake.removePublishedTrackMutex.Lock()
|
||||||
|
defer fake.removePublishedTrackMutex.Unlock()
|
||||||
|
fake.RemovePublishedTrackStub = stub
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fake *FakeLocalParticipant) RemovePublishedTrackArgsForCall(i int) (types.MediaTrack, bool) {
|
||||||
|
fake.removePublishedTrackMutex.RLock()
|
||||||
|
defer fake.removePublishedTrackMutex.RUnlock()
|
||||||
|
argsForCall := fake.removePublishedTrackArgsForCall[i]
|
||||||
|
return argsForCall.arg1, argsForCall.arg2
|
||||||
|
}
|
||||||
|
|
||||||
func (fake *FakeLocalParticipant) RemoveSubscribedTrack(arg1 types.SubscribedTrack) {
|
func (fake *FakeLocalParticipant) RemoveSubscribedTrack(arg1 types.SubscribedTrack) {
|
||||||
fake.removeSubscribedTrackMutex.Lock()
|
fake.removeSubscribedTrackMutex.Lock()
|
||||||
fake.removeSubscribedTrackArgsForCall = append(fake.removeSubscribedTrackArgsForCall, struct {
|
fake.removeSubscribedTrackArgsForCall = append(fake.removeSubscribedTrackArgsForCall, struct {
|
||||||
@@ -4740,6 +4779,8 @@ func (fake *FakeLocalParticipant) Invocations() map[string][][]interface{} {
|
|||||||
defer fake.processSubscriptionRequestsQueueMutex.RUnlock()
|
defer fake.processSubscriptionRequestsQueueMutex.RUnlock()
|
||||||
fake.protocolVersionMutex.RLock()
|
fake.protocolVersionMutex.RLock()
|
||||||
defer fake.protocolVersionMutex.RUnlock()
|
defer fake.protocolVersionMutex.RUnlock()
|
||||||
|
fake.removePublishedTrackMutex.RLock()
|
||||||
|
defer fake.removePublishedTrackMutex.RUnlock()
|
||||||
fake.removeSubscribedTrackMutex.RLock()
|
fake.removeSubscribedTrackMutex.RLock()
|
||||||
defer fake.removeSubscribedTrackMutex.RUnlock()
|
defer fake.removeSubscribedTrackMutex.RUnlock()
|
||||||
fake.removeSubscriberMutex.RLock()
|
fake.removeSubscriberMutex.RLock()
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ type FakeParticipant struct {
|
|||||||
isRecorderReturnsOnCall map[int]struct {
|
isRecorderReturnsOnCall map[int]struct {
|
||||||
result1 bool
|
result1 bool
|
||||||
}
|
}
|
||||||
|
RemovePublishedTrackStub func(types.MediaTrack, bool)
|
||||||
|
removePublishedTrackMutex sync.RWMutex
|
||||||
|
removePublishedTrackArgsForCall []struct {
|
||||||
|
arg1 types.MediaTrack
|
||||||
|
arg2 bool
|
||||||
|
}
|
||||||
RemoveSubscriberStub func(types.LocalParticipant, livekit.TrackID, bool)
|
RemoveSubscriberStub func(types.LocalParticipant, livekit.TrackID, bool)
|
||||||
removeSubscriberMutex sync.RWMutex
|
removeSubscriberMutex sync.RWMutex
|
||||||
removeSubscriberArgsForCall []struct {
|
removeSubscriberArgsForCall []struct {
|
||||||
@@ -679,6 +685,39 @@ func (fake *FakeParticipant) IsRecorderReturnsOnCall(i int, result1 bool) {
|
|||||||
}{result1}
|
}{result1}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (fake *FakeParticipant) RemovePublishedTrack(arg1 types.MediaTrack, arg2 bool) {
|
||||||
|
fake.removePublishedTrackMutex.Lock()
|
||||||
|
fake.removePublishedTrackArgsForCall = append(fake.removePublishedTrackArgsForCall, struct {
|
||||||
|
arg1 types.MediaTrack
|
||||||
|
arg2 bool
|
||||||
|
}{arg1, arg2})
|
||||||
|
stub := fake.RemovePublishedTrackStub
|
||||||
|
fake.recordInvocation("RemovePublishedTrack", []interface{}{arg1, arg2})
|
||||||
|
fake.removePublishedTrackMutex.Unlock()
|
||||||
|
if stub != nil {
|
||||||
|
fake.RemovePublishedTrackStub(arg1, arg2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fake *FakeParticipant) RemovePublishedTrackCallCount() int {
|
||||||
|
fake.removePublishedTrackMutex.RLock()
|
||||||
|
defer fake.removePublishedTrackMutex.RUnlock()
|
||||||
|
return len(fake.removePublishedTrackArgsForCall)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fake *FakeParticipant) RemovePublishedTrackCalls(stub func(types.MediaTrack, bool)) {
|
||||||
|
fake.removePublishedTrackMutex.Lock()
|
||||||
|
defer fake.removePublishedTrackMutex.Unlock()
|
||||||
|
fake.RemovePublishedTrackStub = stub
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fake *FakeParticipant) RemovePublishedTrackArgsForCall(i int) (types.MediaTrack, bool) {
|
||||||
|
fake.removePublishedTrackMutex.RLock()
|
||||||
|
defer fake.removePublishedTrackMutex.RUnlock()
|
||||||
|
argsForCall := fake.removePublishedTrackArgsForCall[i]
|
||||||
|
return argsForCall.arg1, argsForCall.arg2
|
||||||
|
}
|
||||||
|
|
||||||
func (fake *FakeParticipant) RemoveSubscriber(arg1 types.LocalParticipant, arg2 livekit.TrackID, arg3 bool) {
|
func (fake *FakeParticipant) RemoveSubscriber(arg1 types.LocalParticipant, arg2 livekit.TrackID, arg3 bool) {
|
||||||
fake.removeSubscriberMutex.Lock()
|
fake.removeSubscriberMutex.Lock()
|
||||||
fake.removeSubscriberArgsForCall = append(fake.removeSubscriberArgsForCall, struct {
|
fake.removeSubscriberArgsForCall = append(fake.removeSubscriberArgsForCall, struct {
|
||||||
@@ -1024,6 +1063,8 @@ func (fake *FakeParticipant) Invocations() map[string][][]interface{} {
|
|||||||
defer fake.identityMutex.RUnlock()
|
defer fake.identityMutex.RUnlock()
|
||||||
fake.isRecorderMutex.RLock()
|
fake.isRecorderMutex.RLock()
|
||||||
defer fake.isRecorderMutex.RUnlock()
|
defer fake.isRecorderMutex.RUnlock()
|
||||||
|
fake.removePublishedTrackMutex.RLock()
|
||||||
|
defer fake.removePublishedTrackMutex.RUnlock()
|
||||||
fake.removeSubscriberMutex.RLock()
|
fake.removeSubscriberMutex.RLock()
|
||||||
defer fake.removeSubscriberMutex.RUnlock()
|
defer fake.removeSubscriberMutex.RUnlock()
|
||||||
fake.setMetadataMutex.RLock()
|
fake.setMetadataMutex.RLock()
|
||||||
|
|||||||
Reference in New Issue
Block a user