mirror of
https://github.com/livekit/livekit.git
synced 2026-05-15 00:55:32 +00:00
Make UpdateTrackInfo an interface. (#2327)
This commit is contained in:
@@ -444,6 +444,7 @@ type MediaTrack interface {
|
||||
Source() livekit.TrackSource
|
||||
Stream() string
|
||||
|
||||
UpdateTrackInfo(ti *livekit.TrackInfo)
|
||||
ToProto() *livekit.TrackInfo
|
||||
Version() utils.TimedVersion
|
||||
|
||||
|
||||
@@ -333,6 +333,11 @@ type FakeLocalMediaTrack struct {
|
||||
toProtoReturnsOnCall map[int]struct {
|
||||
result1 *livekit.TrackInfo
|
||||
}
|
||||
UpdateTrackInfoStub func(*livekit.TrackInfo)
|
||||
updateTrackInfoMutex sync.RWMutex
|
||||
updateTrackInfoArgsForCall []struct {
|
||||
arg1 *livekit.TrackInfo
|
||||
}
|
||||
UpdateVideoLayersStub func([]*livekit.VideoLayer)
|
||||
updateVideoLayersMutex sync.RWMutex
|
||||
updateVideoLayersArgsForCall []struct {
|
||||
@@ -2083,6 +2088,38 @@ func (fake *FakeLocalMediaTrack) ToProtoReturnsOnCall(i int, result1 *livekit.Tr
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateTrackInfo(arg1 *livekit.TrackInfo) {
|
||||
fake.updateTrackInfoMutex.Lock()
|
||||
fake.updateTrackInfoArgsForCall = append(fake.updateTrackInfoArgsForCall, struct {
|
||||
arg1 *livekit.TrackInfo
|
||||
}{arg1})
|
||||
stub := fake.UpdateTrackInfoStub
|
||||
fake.recordInvocation("UpdateTrackInfo", []interface{}{arg1})
|
||||
fake.updateTrackInfoMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.UpdateTrackInfoStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateTrackInfoCallCount() int {
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
return len(fake.updateTrackInfoArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateTrackInfoCalls(stub func(*livekit.TrackInfo)) {
|
||||
fake.updateTrackInfoMutex.Lock()
|
||||
defer fake.updateTrackInfoMutex.Unlock()
|
||||
fake.UpdateTrackInfoStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateTrackInfoArgsForCall(i int) *livekit.TrackInfo {
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
argsForCall := fake.updateTrackInfoArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateVideoLayers(arg1 []*livekit.VideoLayer) {
|
||||
var arg1Copy []*livekit.VideoLayer
|
||||
if arg1 != nil {
|
||||
@@ -2246,6 +2283,8 @@ func (fake *FakeLocalMediaTrack) Invocations() map[string][][]interface{} {
|
||||
defer fake.streamMutex.RUnlock()
|
||||
fake.toProtoMutex.RLock()
|
||||
defer fake.toProtoMutex.RUnlock()
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
fake.updateVideoLayersMutex.RLock()
|
||||
defer fake.updateVideoLayersMutex.RUnlock()
|
||||
fake.versionMutex.RLock()
|
||||
|
||||
@@ -269,6 +269,11 @@ type FakeMediaTrack struct {
|
||||
toProtoReturnsOnCall map[int]struct {
|
||||
result1 *livekit.TrackInfo
|
||||
}
|
||||
UpdateTrackInfoStub func(*livekit.TrackInfo)
|
||||
updateTrackInfoMutex sync.RWMutex
|
||||
updateTrackInfoArgsForCall []struct {
|
||||
arg1 *livekit.TrackInfo
|
||||
}
|
||||
UpdateVideoLayersStub func([]*livekit.VideoLayer)
|
||||
updateVideoLayersMutex sync.RWMutex
|
||||
updateVideoLayersArgsForCall []struct {
|
||||
@@ -1669,6 +1674,38 @@ func (fake *FakeMediaTrack) ToProtoReturnsOnCall(i int, result1 *livekit.TrackIn
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateTrackInfo(arg1 *livekit.TrackInfo) {
|
||||
fake.updateTrackInfoMutex.Lock()
|
||||
fake.updateTrackInfoArgsForCall = append(fake.updateTrackInfoArgsForCall, struct {
|
||||
arg1 *livekit.TrackInfo
|
||||
}{arg1})
|
||||
stub := fake.UpdateTrackInfoStub
|
||||
fake.recordInvocation("UpdateTrackInfo", []interface{}{arg1})
|
||||
fake.updateTrackInfoMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.UpdateTrackInfoStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateTrackInfoCallCount() int {
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
return len(fake.updateTrackInfoArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateTrackInfoCalls(stub func(*livekit.TrackInfo)) {
|
||||
fake.updateTrackInfoMutex.Lock()
|
||||
defer fake.updateTrackInfoMutex.Unlock()
|
||||
fake.UpdateTrackInfoStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateTrackInfoArgsForCall(i int) *livekit.TrackInfo {
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
argsForCall := fake.updateTrackInfoArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateVideoLayers(arg1 []*livekit.VideoLayer) {
|
||||
var arg1Copy []*livekit.VideoLayer
|
||||
if arg1 != nil {
|
||||
@@ -1816,6 +1853,8 @@ func (fake *FakeMediaTrack) Invocations() map[string][][]interface{} {
|
||||
defer fake.streamMutex.RUnlock()
|
||||
fake.toProtoMutex.RLock()
|
||||
defer fake.toProtoMutex.RUnlock()
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
fake.updateVideoLayersMutex.RLock()
|
||||
defer fake.updateVideoLayersMutex.RUnlock()
|
||||
fake.versionMutex.RLock()
|
||||
|
||||
Reference in New Issue
Block a user