Fix race / crash in OnNetworkRouteChanged().

To achieve this some refactoring was done to make it possible to synchronize
access to the DelayBasedBwe in TransportFeedbackAdapter:
- The callback was removed from DelayBasedBwe, it now instead returns its
  result.
- TransportFeedbackAdapter was moved to modules/congestion_controller to avoid
  unnecessary dependencies.

Reenables previously disabled flaky test. Can no longer reproduce flakiness with gtest-parallel and asan/tsan builds.

BUG=webrtc:6427, webrtc:6422

Review-Url: https://codereview.webrtc.org/2366333003
Cr-Commit-Position: refs/heads/master@{#14430}
This commit is contained in:
stefan
2016-09-29 02:44:31 -07:00
committed by Commit bot
parent eddb7571d8
commit fd0d426692
22 changed files with 328 additions and 327 deletions

View File

@ -17,9 +17,9 @@
#include <map>
#include "webrtc/modules/congestion_controller/delay_based_bwe.h"
#include "webrtc/modules/include/module.h"
#include "webrtc/modules/pacing/paced_sender.h"
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
namespace webrtc {
@ -44,7 +44,7 @@ class BitrateObserver {
virtual ~BitrateObserver() {}
};
class BitrateController : public Module, public RemoteBitrateObserver {
class BitrateController : public Module {
// This class collects feedback from all streams sent to a peer (via
// RTCPBandwidthObservers). It does one aggregated send side bandwidth
// estimation and divide the available bitrate between all its registered
@ -78,6 +78,8 @@ class BitrateController : public Module, public RemoteBitrateObserver {
int min_bitrate_bps,
int max_bitrate_bps) = 0;
virtual void OnDelayBasedBweResult(const DelayBasedBwe::Result& result) = 0;
// Gets the available payload bandwidth in bits per second. Note that
// this bandwidth excludes packet headers.
virtual bool AvailableBandwidth(uint32_t* bandwidth) const = 0;