Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: webrtc/media/base/fakemediaengine.h

Issue 1803063004: Reset the BWE when the network changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Removed changes in call dir and leave that in a separate CL. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/networkroute.h ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/fakemediaengine.h
diff --git a/webrtc/media/base/fakemediaengine.h b/webrtc/media/base/fakemediaengine.h
index af05144b529e0424a4a8b89f618470f69a26e01e..6feaf8e989f7e3e1569cfb060c816a6d651ba309 100644
--- a/webrtc/media/base/fakemediaengine.h
+++ b/webrtc/media/base/fakemediaengine.h
@@ -20,6 +20,7 @@
#include "webrtc/audio_sink.h"
#include "webrtc/base/copyonwritebuffer.h"
+#include "webrtc/base/networkroute.h"
#include "webrtc/base/stringutils.h"
#include "webrtc/media/base/audiosource.h"
#include "webrtc/media/base/mediaengine.h"
@@ -178,6 +179,12 @@ template <class Base> class RtpHelper : public Base {
return ready_to_send_;
}
+ NetworkRoute last_network_route() const { return last_network_route_; }
+ int num_network_route_changes() const { return num_network_route_changes_; }
+ void set_num_network_route_changes(int changes) {
+ num_network_route_changes_ = changes;
+ }
+
protected:
bool MuteStream(uint32_t ssrc, bool mute) {
if (!HasSendStream(ssrc) && ssrc != 0) {
@@ -216,6 +223,11 @@ template <class Base> class RtpHelper : public Base {
virtual void OnReadyToSend(bool ready) {
ready_to_send_ = ready;
}
+ virtual void OnNetworkRouteChanged(const std::string& transport_name,
+ const NetworkRoute& network_route) {
+ last_network_route_ = network_route;
+ ++num_network_route_changes_;
+ }
bool fail_set_send_codecs() const { return fail_set_send_codecs_; }
bool fail_set_recv_codecs() const { return fail_set_recv_codecs_; }
@@ -235,6 +247,8 @@ template <class Base> class RtpHelper : public Base {
uint32_t send_ssrc_;
std::string rtcp_cname_;
bool ready_to_send_;
+ NetworkRoute last_network_route_;
+ int num_network_route_changes_ = 0;
};
class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
« no previous file with comments | « webrtc/base/networkroute.h ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698