Documentation ¶
Index ¶
- Variables
- func CalculateSelectedIndexArbiter(newThr int, lastDuration int, lastIndex int, maxBufferLevel int, lastRate int, ...) int
- func CalculateSelectedIndexBba(newThr int, lastDuration int, lastIndex int, maxBufferLevel int, lastRate int, ...) int
- func CalculateThroughtput(segmentSize, time int) int
- func Conventional(thrList *[]int, newThr int, repRate *int, bandwithList []int, ...)
- func EMWAAverageAlgo(thrList *[]int, repRate *int, exponentialRatio float64, window int, newThr int, ...)
- func ElasticAlgo(thrList *[]int, newThr int, delTime int, maxBuffer int, repRate *int, ...)
- func ExpAverage(thrList []int, ratio float64, window int, average *float64)
- func FloatMin(a, b float64) float64
- func GeomAverageAlgo(thrList *[]int, newThr int, repRate *int, bandwithList []int, ...)
- func HighestBitrate(thrList []int) float64
- func Logistic(thrList *[]int, newThr int, repRate *int, bandwithList []int, bufferLevel int, ...)
- func LogisticFunction(lastRateIndex int, thrList []int, bufferLevel int, highestMPDrepRateIndex int, ...) int
- func LowestBitrate(thrList []int) float64
- func MeanAverageAlgo(thrList *[]int, newThr int, repRate *int, bandwithList []int, ...)
- func SelectRepRateWithThroughtput(thr int, bandwithList []int, lowestMPDrepRateIndex int) int
- func SmartConvHelper(qIndex int, videoWindow int, estRate float64, currentMPD http.MPD, ...) bool
- func SmartConvHelperFromFile(videoWindow int, estRate float64, qRate int, segmentNumber int, ...) bool
- func ThroughputSamples(window int, thrList []int) []int
Constants ¶
This section is empty.
Variables ¶
var DEFAULT_EXPONENT float64 = 0.4
var DEFAULT_HISTORIC_ESTIMATION_WINDOW int = 10
var DEFAULT_MAXIMUM_SWITCH = 2
var DEFAULT_MAX_BUFFER_FACTOR float64 = 1.15
var DEFAULT_MIN_BUFFER_FACTOR float64 = 0.75
var DEFAULT_PREDICTIVE_ESTIMATION_WINDOW = 5
Functions ¶
func CalculateSelectedIndexArbiter ¶
func CalculateSelectedIndexArbiter(newThr int, lastDuration int, lastIndex int, maxBufferLevel int, lastRate int, thrList *[]int, mpdDuration int, currentMPD http.MPD, currentURL string, currentMPDRepAdaptSet int, segmentNumber int, baseURL string, debugLog bool, downloadTime int, bufferLevel int, highestMPDrepRateIndex int, lowestMPDrepRateIndex int, bandwithList []int, segmentSize int) int
CalculateSelectedIndexArbiter :
- return the index of the segment which should be selected *
func CalculateSelectedIndexBba ¶
func CalculateSelectedIndexBba(newThr int, lastDuration int, lastIndex int, maxBufferLevel int, lastRate int, thrList *[]int, mpdDuration int, currentMPD http.MPD, currentURL string, currentMPDRepAdaptSet int, segmentNumber int, baseURL string, debugLog bool, downloadTime int, bufferLevel int, highestMPDrepRateIndex int, lowestMPDrepRateIndex int, bandwithList []int) int
CalculateSelectedIndexBba :
- return the index of the segment which should be selected *
func CalculateThroughtput ¶
CalculateThroughtput : input segment size and time, returns the throughtput
func Conventional ¶
func Conventional(thrList *[]int, newThr int, repRate *int, bandwithList []int, lowestMPDrepRateIndex int)
Conventional :
* calculate of the throughtput with the ancient one and the new one * call the func to select the repRate from the throughtput * return the repRate and the list of throughtput
func EMWAAverageAlgo ¶
func EMWAAverageAlgo(thrList *[]int, repRate *int, exponentialRatio float64, window int, newThr int, bandwithList []int, lowestMPDrepRateIndex int)
EMWAAverageAlgo :
call the func expAverage with all the values of the throughtput list and a window size to make an exponential average
func ElasticAlgo ¶
func ElasticAlgo(thrList *[]int, newThr int, delTime int, maxBuffer int, repRate *int, bandwithList []int, staticAlgParameter *float64, bufferLevel int, kP float64, kI float64, lowestMPDrepRateIndex int)
ElasticAlgo call the func harmonicAverage with the last 5 values of throughtput to have a better estimate of the throughtput
func ExpAverage ¶
ExpAverage :
- return the exponential average of the last "window" number of throughtputs
func GeomAverageAlgo ¶
func GeomAverageAlgo(thrList *[]int, newThr int, repRate *int, bandwithList []int, lowestMPDrepRateIndex int)
GeomAverageAlgo : call the func geomAverage with all the values of the throughtput list to make a geometric average
func HighestBitrate ¶
HighestBitrate : return the highest bitrate of the list
func Logistic ¶
func Logistic(thrList *[]int, newThr int, repRate *int, bandwithList []int, bufferLevel int, highestMPDrepRateIndex int, lowestMPDrepRateIndex int, debugFiles string, debugLogs bool, maxBufferLevel int)
Logistic : add the last throughtput to the list and call CalculateSelectedIndex, return the rate and throughtput list
func LogisticFunction ¶
func LogisticFunction(lastRateIndex int, thrList []int, bufferLevel int, highestMPDrepRateIndex int, lowestMPDrepRateIndex int, maxBufferLevel int, bandwithList []int) int
LogisticFunction : calculate and return the rate index
func LowestBitrate ¶
LowestBitrate : return the lowest bitrate of the list
func MeanAverageAlgo ¶
func MeanAverageAlgo(thrList *[]int, newThr int, repRate *int, bandwithList []int, lowestMPDrepRateIndex int)
MeanAverageAlgo : "normal average" -> take all the throughtputs and make the average call the func meanAverage with all the values of throughtput to make a "standard" average
func SelectRepRateWithThroughtput ¶
SelectRepRateWithThroughtput :
- Select the rate the nearest just below the throughtput
- return the selected rate
func SmartConvHelper ¶
func SmartConvHelper(qIndex int, videoWindow int, estRate float64, currentMPD http.MPD, currentURL string, currentMPDRepAdaptSet int, lastRate int, segmentNumber int, baseURL string, debugLog bool, lastDuration int) bool
SmartConvHelper :
- Checks next "videoWindow" of segments and makes sure the average rate is less than the estimated rate
func SmartConvHelperFromFile ¶
func SmartConvHelperFromFile(videoWindow int, estRate float64, qRate int, segmentNumber int, lastDuration int) bool
SmartConvHelperFromFile :
- Checks next "videoWindow" of segments and makes sure the average rate is less than the estimated rate
Types ¶
This section is empty.