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

Unified Diff: webrtc/pc/webrtcsession.cc

Issue 2863123002: Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls. (Closed)
Patch Set: Comments addressed." Created 3 years, 7 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/pc/webrtcsession.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/webrtcsession.cc
diff --git a/webrtc/pc/webrtcsession.cc b/webrtc/pc/webrtcsession.cc
index cc424b222e081c994b6a7e546f59c126d86a7c01..1134c249391c2f75a1a7871d05e9a50f65a1c5e4 100644
--- a/webrtc/pc/webrtcsession.cc
+++ b/webrtc/pc/webrtcsession.cc
@@ -631,6 +631,7 @@ bool WebRtcSession::Initialize(
void WebRtcSession::Close() {
SetState(STATE_CLOSED);
RemoveUnusedChannels(nullptr);
+ call_ = nullptr;
RTC_DCHECK(!voice_channel_);
RTC_DCHECK(!video_channel_);
RTC_DCHECK(!rtp_data_channel_);
@@ -1895,6 +1896,15 @@ bool WebRtcSession::CreateDataChannel(const cricket::ContentInfo* content,
return true;
}
+Call::Stats WebRtcSession::GetCallStats() {
+ if (!worker_thread()->IsCurrent()) {
+ return worker_thread()->Invoke<Call::Stats>(
+ RTC_FROM_HERE, rtc::Bind(&WebRtcSession::GetCallStats, this));
+ }
+ RTC_DCHECK(call_);
+ return call_->GetStats();
+}
+
std::unique_ptr<SessionStats> WebRtcSession::GetStats_n(
const ChannelNamePairs& channel_name_pairs) {
RTC_DCHECK(network_thread()->IsCurrent());
@@ -2317,6 +2327,7 @@ void WebRtcSession::ReportNegotiatedCiphers(
void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) {
RTC_DCHECK(worker_thread()->IsCurrent());
+ RTC_DCHECK(call_);
call_->OnSentPacket(sent_packet);
}
« no previous file with comments | « webrtc/pc/webrtcsession.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698