Class AbrConfiguration.Builder

  • Enclosing class:
    AbrConfiguration

    public static class AbrConfiguration.Builder
    extends Object
    A builder for ABR configuration instances
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • maxInitialBitrate

        public AbrConfiguration.Builder maxInitialBitrate​(long maxInitialBitrate)
        The bandwidth estimation in bits per second that is used when the bandwidth estimator reports that it can not estimate due to lack of information. This is usually used for the initial quality selection when no network estimation was collected yet.
        Parameters:
        maxInitialBitrate - The initial bitrate
        Returns:
        The builder
      • minDurationForQualityIncrease

        public AbrConfiguration.Builder minDurationForQualityIncrease​(long minDurationForQualityIncrease,
                                                                      TimeUnit unit)
        The minimum amount of that data is expected to be buffered before a quality increase is permitted.
        Parameters:
        minDurationForQualityIncrease - time
        unit - time unit
        Returns:
        The builder
      • maxDurationForQualityDecrease

        public AbrConfiguration.Builder maxDurationForQualityDecrease​(long maxDurationForQualityDecrease,
                                                                      TimeUnit unit)
        The maximum amount of data that is expected to be buffered before a quality decrease is permitted.
        Parameters:
        maxDurationForQualityDecrease - time
        unit - time unit
        Returns:
        The builder
      • bandwidthFraction

        public AbrConfiguration.Builder bandwidthFraction​(float bandwidthFraction)
        The fraction of the bandwidth estimation that we consider the effective bandwidth.
        Parameters:
        bandwidthFraction - The bandwidth fraction
        Returns:
        The builder
      • minDurationToRetainAfterDiscard

        public AbrConfiguration.Builder minDurationToRetainAfterDiscard​(long minDurationToRetainAfterDiscard,
                                                                        TimeUnit unit)
        The minimum duration of the buffer to retain after discarding the segments when switching to significantly higher quality (i.e. from SD to HD) thus facilitating faster switch to a higher quality.
        Parameters:
        minDurationToRetainAfterDiscard - time
        unit - time unit
        Returns:
        The builder
      • safeBufferSize

        public AbrConfiguration.Builder safeBufferSize​(long safeBufferSize,
                                                       TimeUnit unit)
        Minimum target buffer considered safe. Buffer below or equals this threshold results in emergency handling.
        Parameters:
        safeBufferSize - time
        unit - time unit
        Returns:
        The builder
      • downloadTimeFactor

        public AbrConfiguration.Builder downloadTimeFactor​(float downloadTimeFactor)
        Safety factor that is applied to download time calculations
        Parameters:
        downloadTimeFactor - download time factor
        Returns:
        The builder
      • percentileWeight

        public AbrConfiguration.Builder percentileWeight​(int percentileWeight)
        Set the weight used for the sliding percentile bandwidth estimator
        Parameters:
        percentileWeight - The weight
        Returns:
        The builder
      • get

        public AbrConfiguration get()
        Get the ABR configuration created by this builder
        Returns:
        The ABR configuration