// Code generated by counterfeiter. DO NOT EDIT.
package sfufakes

import (
	"sync"
	"time"

	"github.com/livekit/livekit-server/pkg/sfu"
	"github.com/livekit/protocol/livekit"
	webrtc "github.com/pion/webrtc/v4"
)

type FakeDownTrackListener struct {
	OnBindAndConnectedStub        func()
	onBindAndConnectedMutex       sync.RWMutex
	onBindAndConnectedArgsForCall []struct {
	}
	OnCodecNegotiatedStub        func(webrtc.RTPCodecCapability)
	onCodecNegotiatedMutex       sync.RWMutex
	onCodecNegotiatedArgsForCall []struct {
		arg1 webrtc.RTPCodecCapability
	}
	OnDownTrackCloseStub        func(bool)
	onDownTrackCloseMutex       sync.RWMutex
	onDownTrackCloseArgsForCall []struct {
		arg1 bool
	}
	OnMaxSubscribedLayerChangedStub        func(int32)
	onMaxSubscribedLayerChangedMutex       sync.RWMutex
	onMaxSubscribedLayerChangedArgsForCall []struct {
		arg1 int32
	}
	OnRttUpdateStub        func(uint32)
	onRttUpdateMutex       sync.RWMutex
	onRttUpdateArgsForCall []struct {
		arg1 uint32
	}
	OnStatsUpdateStub        func(*livekit.AnalyticsStat)
	onStatsUpdateMutex       sync.RWMutex
	onStatsUpdateArgsForCall []struct {
		arg1 *livekit.AnalyticsStat
	}
	OnStreamStartedStub        func(time.Duration)
	onStreamStartedMutex       sync.RWMutex
	onStreamStartedArgsForCall []struct {
		arg1 time.Duration
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDownTrackListener) OnBindAndConnected() {
	fake.onBindAndConnectedMutex.Lock()
	fake.onBindAndConnectedArgsForCall = append(fake.onBindAndConnectedArgsForCall, struct {
	}{})
	stub := fake.OnBindAndConnectedStub
	fake.recordInvocation("OnBindAndConnected", []interface{}{})
	fake.onBindAndConnectedMutex.Unlock()
	if stub != nil {
		fake.OnBindAndConnectedStub()
	}
}

func (fake *FakeDownTrackListener) OnBindAndConnectedCallCount() int {
	fake.onBindAndConnectedMutex.RLock()
	defer fake.onBindAndConnectedMutex.RUnlock()
	return len(fake.onBindAndConnectedArgsForCall)
}

func (fake *FakeDownTrackListener) OnBindAndConnectedCalls(stub func()) {
	fake.onBindAndConnectedMutex.Lock()
	defer fake.onBindAndConnectedMutex.Unlock()
	fake.OnBindAndConnectedStub = stub
}

func (fake *FakeDownTrackListener) OnCodecNegotiated(arg1 webrtc.RTPCodecCapability) {
	fake.onCodecNegotiatedMutex.Lock()
	fake.onCodecNegotiatedArgsForCall = append(fake.onCodecNegotiatedArgsForCall, struct {
		arg1 webrtc.RTPCodecCapability
	}{arg1})
	stub := fake.OnCodecNegotiatedStub
	fake.recordInvocation("OnCodecNegotiated", []interface{}{arg1})
	fake.onCodecNegotiatedMutex.Unlock()
	if stub != nil {
		fake.OnCodecNegotiatedStub(arg1)
	}
}

func (fake *FakeDownTrackListener) OnCodecNegotiatedCallCount() int {
	fake.onCodecNegotiatedMutex.RLock()
	defer fake.onCodecNegotiatedMutex.RUnlock()
	return len(fake.onCodecNegotiatedArgsForCall)
}

func (fake *FakeDownTrackListener) OnCodecNegotiatedCalls(stub func(webrtc.RTPCodecCapability)) {
	fake.onCodecNegotiatedMutex.Lock()
	defer fake.onCodecNegotiatedMutex.Unlock()
	fake.OnCodecNegotiatedStub = stub
}

func (fake *FakeDownTrackListener) OnCodecNegotiatedArgsForCall(i int) webrtc.RTPCodecCapability {
	fake.onCodecNegotiatedMutex.RLock()
	defer fake.onCodecNegotiatedMutex.RUnlock()
	argsForCall := fake.onCodecNegotiatedArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDownTrackListener) OnDownTrackClose(arg1 bool) {
	fake.onDownTrackCloseMutex.Lock()
	fake.onDownTrackCloseArgsForCall = append(fake.onDownTrackCloseArgsForCall, struct {
		arg1 bool
	}{arg1})
	stub := fake.OnDownTrackCloseStub
	fake.recordInvocation("OnDownTrackClose", []interface{}{arg1})
	fake.onDownTrackCloseMutex.Unlock()
	if stub != nil {
		fake.OnDownTrackCloseStub(arg1)
	}
}

func (fake *FakeDownTrackListener) OnDownTrackCloseCallCount() int {
	fake.onDownTrackCloseMutex.RLock()
	defer fake.onDownTrackCloseMutex.RUnlock()
	return len(fake.onDownTrackCloseArgsForCall)
}

func (fake *FakeDownTrackListener) OnDownTrackCloseCalls(stub func(bool)) {
	fake.onDownTrackCloseMutex.Lock()
	defer fake.onDownTrackCloseMutex.Unlock()
	fake.OnDownTrackCloseStub = stub
}

func (fake *FakeDownTrackListener) OnDownTrackCloseArgsForCall(i int) bool {
	fake.onDownTrackCloseMutex.RLock()
	defer fake.onDownTrackCloseMutex.RUnlock()
	argsForCall := fake.onDownTrackCloseArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDownTrackListener) OnMaxSubscribedLayerChanged(arg1 int32) {
	fake.onMaxSubscribedLayerChangedMutex.Lock()
	fake.onMaxSubscribedLayerChangedArgsForCall = append(fake.onMaxSubscribedLayerChangedArgsForCall, struct {
		arg1 int32
	}{arg1})
	stub := fake.OnMaxSubscribedLayerChangedStub
	fake.recordInvocation("OnMaxSubscribedLayerChanged", []interface{}{arg1})
	fake.onMaxSubscribedLayerChangedMutex.Unlock()
	if stub != nil {
		fake.OnMaxSubscribedLayerChangedStub(arg1)
	}
}

func (fake *FakeDownTrackListener) OnMaxSubscribedLayerChangedCallCount() int {
	fake.onMaxSubscribedLayerChangedMutex.RLock()
	defer fake.onMaxSubscribedLayerChangedMutex.RUnlock()
	return len(fake.onMaxSubscribedLayerChangedArgsForCall)
}

func (fake *FakeDownTrackListener) OnMaxSubscribedLayerChangedCalls(stub func(int32)) {
	fake.onMaxSubscribedLayerChangedMutex.Lock()
	defer fake.onMaxSubscribedLayerChangedMutex.Unlock()
	fake.OnMaxSubscribedLayerChangedStub = stub
}

func (fake *FakeDownTrackListener) OnMaxSubscribedLayerChangedArgsForCall(i int) int32 {
	fake.onMaxSubscribedLayerChangedMutex.RLock()
	defer fake.onMaxSubscribedLayerChangedMutex.RUnlock()
	argsForCall := fake.onMaxSubscribedLayerChangedArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDownTrackListener) OnRttUpdate(arg1 uint32) {
	fake.onRttUpdateMutex.Lock()
	fake.onRttUpdateArgsForCall = append(fake.onRttUpdateArgsForCall, struct {
		arg1 uint32
	}{arg1})
	stub := fake.OnRttUpdateStub
	fake.recordInvocation("OnRttUpdate", []interface{}{arg1})
	fake.onRttUpdateMutex.Unlock()
	if stub != nil {
		fake.OnRttUpdateStub(arg1)
	}
}

func (fake *FakeDownTrackListener) OnRttUpdateCallCount() int {
	fake.onRttUpdateMutex.RLock()
	defer fake.onRttUpdateMutex.RUnlock()
	return len(fake.onRttUpdateArgsForCall)
}

func (fake *FakeDownTrackListener) OnRttUpdateCalls(stub func(uint32)) {
	fake.onRttUpdateMutex.Lock()
	defer fake.onRttUpdateMutex.Unlock()
	fake.OnRttUpdateStub = stub
}

func (fake *FakeDownTrackListener) OnRttUpdateArgsForCall(i int) uint32 {
	fake.onRttUpdateMutex.RLock()
	defer fake.onRttUpdateMutex.RUnlock()
	argsForCall := fake.onRttUpdateArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDownTrackListener) OnStatsUpdate(arg1 *livekit.AnalyticsStat) {
	fake.onStatsUpdateMutex.Lock()
	fake.onStatsUpdateArgsForCall = append(fake.onStatsUpdateArgsForCall, struct {
		arg1 *livekit.AnalyticsStat
	}{arg1})
	stub := fake.OnStatsUpdateStub
	fake.recordInvocation("OnStatsUpdate", []interface{}{arg1})
	fake.onStatsUpdateMutex.Unlock()
	if stub != nil {
		fake.OnStatsUpdateStub(arg1)
	}
}

func (fake *FakeDownTrackListener) OnStatsUpdateCallCount() int {
	fake.onStatsUpdateMutex.RLock()
	defer fake.onStatsUpdateMutex.RUnlock()
	return len(fake.onStatsUpdateArgsForCall)
}

func (fake *FakeDownTrackListener) OnStatsUpdateCalls(stub func(*livekit.AnalyticsStat)) {
	fake.onStatsUpdateMutex.Lock()
	defer fake.onStatsUpdateMutex.Unlock()
	fake.OnStatsUpdateStub = stub
}

func (fake *FakeDownTrackListener) OnStatsUpdateArgsForCall(i int) *livekit.AnalyticsStat {
	fake.onStatsUpdateMutex.RLock()
	defer fake.onStatsUpdateMutex.RUnlock()
	argsForCall := fake.onStatsUpdateArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDownTrackListener) OnStreamStarted(arg1 time.Duration) {
	fake.onStreamStartedMutex.Lock()
	fake.onStreamStartedArgsForCall = append(fake.onStreamStartedArgsForCall, struct {
		arg1 time.Duration
	}{arg1})
	stub := fake.OnStreamStartedStub
	fake.recordInvocation("OnStreamStarted", []interface{}{arg1})
	fake.onStreamStartedMutex.Unlock()
	if stub != nil {
		fake.OnStreamStartedStub(arg1)
	}
}

func (fake *FakeDownTrackListener) OnStreamStartedCallCount() int {
	fake.onStreamStartedMutex.RLock()
	defer fake.onStreamStartedMutex.RUnlock()
	return len(fake.onStreamStartedArgsForCall)
}

func (fake *FakeDownTrackListener) OnStreamStartedCalls(stub func(time.Duration)) {
	fake.onStreamStartedMutex.Lock()
	defer fake.onStreamStartedMutex.Unlock()
	fake.OnStreamStartedStub = stub
}

func (fake *FakeDownTrackListener) OnStreamStartedArgsForCall(i int) time.Duration {
	fake.onStreamStartedMutex.RLock()
	defer fake.onStreamStartedMutex.RUnlock()
	argsForCall := fake.onStreamStartedArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDownTrackListener) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeDownTrackListener) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ sfu.DownTrackListener = new(FakeDownTrackListener)
