// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT

package nack

import (
	

	
	
)

// GeneratorOption can be used to configure GeneratorInterceptor.
type GeneratorOption func(r *GeneratorInterceptor) error

// GeneratorSize sets the size of the interceptor.
// Size must be one of: 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768.
func ( uint16) GeneratorOption {
	return func( *GeneratorInterceptor) error {
		.size = 

		return nil
	}
}

// GeneratorSkipLastN sets the number of packets (n-1 packets before the last received packets)
//
//	to ignore when generating nack requests.
func ( uint16) GeneratorOption {
	return func( *GeneratorInterceptor) error {
		.skipLastN = 

		return nil
	}
}

// GeneratorMaxNacksPerPacket sets the maximum number of NACKs sent per missing packet, e.g. if set to 2, a missing
// packet will only be NACKed at most twice. If set to 0 (default), max number of NACKs is unlimited.
func ( uint16) GeneratorOption {
	return func( *GeneratorInterceptor) error {
		.maxNacksPerPacket = 

		return nil
	}
}

// GeneratorLog sets a logger for the interceptor.
func ( logging.LeveledLogger) GeneratorOption {
	return func( *GeneratorInterceptor) error {
		.log = 

		return nil
	}
}

// GeneratorInterval sets the nack send interval for the interceptor.
func ( time.Duration) GeneratorOption {
	return func( *GeneratorInterceptor) error {
		.interval = 

		return nil
	}
}

// GeneratorStreamsFilter sets filter for generator streams.
func ( func( *interceptor.StreamInfo) bool) GeneratorOption {
	return func( *GeneratorInterceptor) error {
		.streamsFilter = 

		return nil
	}
}