bitrate_allocation.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright 2018 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef API_CALL_BITRATE_ALLOCATION_H_
  11. #define API_CALL_BITRATE_ALLOCATION_H_
  12. #include "api/units/data_rate.h"
  13. #include "api/units/time_delta.h"
  14. namespace webrtc {
  15. // BitrateAllocationUpdate provides information to allocated streams about their
  16. // bitrate allocation. It originates from the BitrateAllocater class and is
  17. // propagated from there.
  18. struct BitrateAllocationUpdate {
  19. // The allocated target bitrate. Media streams should produce this amount of
  20. // data. (Note that this may include packet overhead depending on
  21. // configuration.)
  22. DataRate target_bitrate = DataRate::Zero();
  23. // The allocated part of the estimated link capacity. This is more stable than
  24. // the target as it is based on the underlying link capacity estimate. This
  25. // should be used to change encoder configuration when the cost of change is
  26. // high.
  27. DataRate stable_target_bitrate = DataRate::Zero();
  28. // Predicted packet loss ratio.
  29. double packet_loss_ratio = 0;
  30. // Predicted round trip time.
  31. TimeDelta round_trip_time = TimeDelta::PlusInfinity();
  32. // |bwe_period| is deprecated, use |stable_target_bitrate| allocation instead.
  33. TimeDelta bwe_period = TimeDelta::PlusInfinity();
  34. // Congestion window pushback bitrate reduction fraction. Used in
  35. // VideoStreamEncoder to reduce the bitrate by the given fraction
  36. // by dropping frames.
  37. double cwnd_reduce_ratio = 0;
  38. };
  39. } // namespace webrtc
  40. #endif // API_CALL_BITRATE_ALLOCATION_H_