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

Side by Side 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 addresed. Created 3 years, 6 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 unified diff | Download patch
« webrtc/pc/webrtcsession.h ('K') | « webrtc/pc/webrtcsession.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 this, &WebRtcSession::OnDtlsSrtpSetupFailure); 1888 this, &WebRtcSession::OnDtlsSrtpSetupFailure);
1889 rtp_data_channel_->SignalSentPacket.connect(this, 1889 rtp_data_channel_->SignalSentPacket.connect(this,
1890 &WebRtcSession::OnSentPacket_w); 1890 &WebRtcSession::OnSentPacket_w);
1891 } 1891 }
1892 1892
1893 SignalDataChannelCreated(); 1893 SignalDataChannelCreated();
1894 1894
1895 return true; 1895 return true;
1896 } 1896 }
1897 1897
1898 Call::Stats WebRtcSession::GetCallStats() {
1899 RTC_DCHECK(network_thread()->IsCurrent());
1900 return call_->GetStats();
1901 }
1902
1903 Call::Stats WebRtcSession::GetCallStats_s() {
1904 RTC_DCHECK(signaling_thread()->IsCurrent());
1905 return network_thread()->Invoke<Call::Stats>(
1906 RTC_FROM_HERE, rtc::Bind(&WebRtcSession::GetCallStats, this));
Taylor Brandstetter 2017/05/31 00:03:51 Would "rtc::Bind(&Call::GetStats, call_)" work?
hbos 2017/05/31 14:31:58 Yes but if GetCallStats is ever updated you'd have
1907 }
1908
1898 std::unique_ptr<SessionStats> WebRtcSession::GetStats_n( 1909 std::unique_ptr<SessionStats> WebRtcSession::GetStats_n(
1899 const ChannelNamePairs& channel_name_pairs) { 1910 const ChannelNamePairs& channel_name_pairs) {
1900 RTC_DCHECK(network_thread()->IsCurrent()); 1911 RTC_DCHECK(network_thread()->IsCurrent());
1901 std::unique_ptr<SessionStats> session_stats(new SessionStats()); 1912 std::unique_ptr<SessionStats> session_stats(new SessionStats());
1902 for (const auto channel_name_pair : { &channel_name_pairs.voice, 1913 for (const auto channel_name_pair : { &channel_name_pairs.voice,
1903 &channel_name_pairs.video, 1914 &channel_name_pairs.video,
1904 &channel_name_pairs.data }) { 1915 &channel_name_pairs.data }) {
1905 if (*channel_name_pair) { 1916 if (*channel_name_pair) {
1906 cricket::TransportStats transport_stats; 1917 cricket::TransportStats transport_stats;
1907 if (!transport_controller_->GetStats((*channel_name_pair)->transport_name, 1918 if (!transport_controller_->GetStats((*channel_name_pair)->transport_name,
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 (rtp_data_channel_->rtcp_dtls_transport() != nullptr); 2399 (rtp_data_channel_->rtcp_dtls_transport() != nullptr);
2389 channel_manager_->DestroyRtpDataChannel(rtp_data_channel_.release()); 2400 channel_manager_->DestroyRtpDataChannel(rtp_data_channel_.release());
2390 transport_controller_->DestroyDtlsTransport( 2401 transport_controller_->DestroyDtlsTransport(
2391 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTP); 2402 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTP);
2392 if (need_to_delete_rtcp) { 2403 if (need_to_delete_rtcp) {
2393 transport_controller_->DestroyDtlsTransport( 2404 transport_controller_->DestroyDtlsTransport(
2394 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTCP); 2405 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTCP);
2395 } 2406 }
2396 } 2407 }
2397 } // namespace webrtc 2408 } // namespace webrtc
OLDNEW
« webrtc/pc/webrtcsession.h ('K') | « webrtc/pc/webrtcsession.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698