Make UpdateTrackInfo an interface. (#2327)
This commit is contained in:
@@ -444,6 +444,7 @@ type MediaTrack interface {
|
|||||||
Source() livekit.TrackSource
|
Source() livekit.TrackSource
|
||||||
Stream() string
|
Stream() string
|
||||||
|
|
||||||
|
UpdateTrackInfo(ti *livekit.TrackInfo)
|
||||||
ToProto() *livekit.TrackInfo
|
ToProto() *livekit.TrackInfo
|
||||||
Version() utils.TimedVersion
|
Version() utils.TimedVersion
|
||||||
|
|
||||||
|
|||||||
@@ -333,6 +333,11 @@ type FakeLocalMediaTrack struct {
|
|||||||
toProtoReturnsOnCall map[int]struct {
|
toProtoReturnsOnCall map[int]struct {
|
||||||
result1 *livekit.TrackInfo
|
result1 *livekit.TrackInfo
|
||||||
}
|
}
|
||||||
|
UpdateTrackInfoStub func(*livekit.TrackInfo)
|
||||||
|
updateTrackInfoMutex sync.RWMutex
|
||||||
|
updateTrackInfoArgsForCall []struct {
|
||||||
|
arg1 *livekit.TrackInfo
|
||||||
|
}
|
||||||
UpdateVideoLayersStub func([]*livekit.VideoLayer)
|
UpdateVideoLayersStub func([]*livekit.VideoLayer)
|
||||||
updateVideoLayersMutex sync.RWMutex
|
updateVideoLayersMutex sync.RWMutex
|
||||||
updateVideoLayersArgsForCall []struct {
|
updateVideoLayersArgsForCall []struct {
|
||||||
@@ -2083,6 +2088,38 @@ func (fake *FakeLocalMediaTrack) ToProtoReturnsOnCall(i int, result1 *livekit.Tr
|
|||||||
}{result1}
|
}{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) {
|
func (fake *FakeLocalMediaTrack) UpdateVideoLayers(arg1 []*livekit.VideoLayer) {
|
||||||
var arg1Copy []*livekit.VideoLayer
|
var arg1Copy []*livekit.VideoLayer
|
||||||
if arg1 != nil {
|
if arg1 != nil {
|
||||||
@@ -2246,6 +2283,8 @@ func (fake *FakeLocalMediaTrack) Invocations() map[string][][]interface{} {
|
|||||||
defer fake.streamMutex.RUnlock()
|
defer fake.streamMutex.RUnlock()
|
||||||
fake.toProtoMutex.RLock()
|
fake.toProtoMutex.RLock()
|
||||||
defer fake.toProtoMutex.RUnlock()
|
defer fake.toProtoMutex.RUnlock()
|
||||||
|
fake.updateTrackInfoMutex.RLock()
|
||||||
|
defer fake.updateTrackInfoMutex.RUnlock()
|
||||||
fake.updateVideoLayersMutex.RLock()
|
fake.updateVideoLayersMutex.RLock()
|
||||||
defer fake.updateVideoLayersMutex.RUnlock()
|
defer fake.updateVideoLayersMutex.RUnlock()
|
||||||
fake.versionMutex.RLock()
|
fake.versionMutex.RLock()
|
||||||
|
|||||||
@@ -269,6 +269,11 @@ type FakeMediaTrack struct {
|
|||||||
toProtoReturnsOnCall map[int]struct {
|
toProtoReturnsOnCall map[int]struct {
|
||||||
result1 *livekit.TrackInfo
|
result1 *livekit.TrackInfo
|
||||||
}
|
}
|
||||||
|
UpdateTrackInfoStub func(*livekit.TrackInfo)
|
||||||
|
updateTrackInfoMutex sync.RWMutex
|
||||||
|
updateTrackInfoArgsForCall []struct {
|
||||||
|
arg1 *livekit.TrackInfo
|
||||||
|
}
|
||||||
UpdateVideoLayersStub func([]*livekit.VideoLayer)
|
UpdateVideoLayersStub func([]*livekit.VideoLayer)
|
||||||
updateVideoLayersMutex sync.RWMutex
|
updateVideoLayersMutex sync.RWMutex
|
||||||
updateVideoLayersArgsForCall []struct {
|
updateVideoLayersArgsForCall []struct {
|
||||||
@@ -1669,6 +1674,38 @@ func (fake *FakeMediaTrack) ToProtoReturnsOnCall(i int, result1 *livekit.TrackIn
|
|||||||
}{result1}
|
}{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) {
|
func (fake *FakeMediaTrack) UpdateVideoLayers(arg1 []*livekit.VideoLayer) {
|
||||||
var arg1Copy []*livekit.VideoLayer
|
var arg1Copy []*livekit.VideoLayer
|
||||||
if arg1 != nil {
|
if arg1 != nil {
|
||||||
@@ -1816,6 +1853,8 @@ func (fake *FakeMediaTrack) Invocations() map[string][][]interface{} {
|
|||||||
defer fake.streamMutex.RUnlock()
|
defer fake.streamMutex.RUnlock()
|
||||||
fake.toProtoMutex.RLock()
|
fake.toProtoMutex.RLock()
|
||||||
defer fake.toProtoMutex.RUnlock()
|
defer fake.toProtoMutex.RUnlock()
|
||||||
|
fake.updateTrackInfoMutex.RLock()
|
||||||
|
defer fake.updateTrackInfoMutex.RUnlock()
|
||||||
fake.updateVideoLayersMutex.RLock()
|
fake.updateVideoLayersMutex.RLock()
|
||||||
defer fake.updateVideoLayersMutex.RUnlock()
|
defer fake.updateVideoLayersMutex.RUnlock()
|
||||||
fake.versionMutex.RLock()
|
fake.versionMutex.RLock()
|
||||||
|
|||||||
Reference in New Issue
Block a user