 Chromium Code Reviews
 Chromium Code Reviews Issue 2863123002:
  Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls.  (Closed)
    
  
    Issue 2863123002:
  Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls.  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 343 ContentSource src, | 343 ContentSource src, | 
| 344 std::string* error_desc); | 344 std::string* error_desc); | 
| 345 | 345 | 
| 346 // From MessageHandler | 346 // From MessageHandler | 
| 347 void OnMessage(rtc::Message* pmsg) override; | 347 void OnMessage(rtc::Message* pmsg) override; | 
| 348 | 348 | 
| 349 // Handled in derived classes | 349 // Handled in derived classes | 
| 350 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor, | 350 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor, | 
| 351 const std::vector<ConnectionInfo>& infos) = 0; | 351 const std::vector<ConnectionInfo>& infos) = 0; | 
| 352 | 352 | 
| 353 // Helper function for invoking bool-returning methods on the worker thread. | 353 // Helper function for invoking bool-returning methods on the worker thread. | 
| 
hbos
2017/05/09 12:48:14
nit: Update comment.
 
holmer
2017/05/30 14:44:28
Done.
 | |
| 354 template <class FunctorT> | 354 template <class T, class FunctorT> | 
| 355 bool InvokeOnWorker(const rtc::Location& posted_from, | 355 T InvokeOnWorker(const rtc::Location& posted_from, const FunctorT& functor) { | 
| 356 const FunctorT& functor) { | 356 return worker_thread_->Invoke<T>(posted_from, functor); | 
| 357 return worker_thread_->Invoke<bool>(posted_from, functor); | |
| 358 } | 357 } | 
| 359 | 358 | 
| 360 private: | 359 private: | 
| 361 bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, | 360 bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, | 
| 362 DtlsTransportInternal* rtcp_dtls_transport, | 361 DtlsTransportInternal* rtcp_dtls_transport, | 
| 363 rtc::PacketTransportInternal* rtp_packet_transport, | 362 rtc::PacketTransportInternal* rtp_packet_transport, | 
| 364 rtc::PacketTransportInternal* rtcp_packet_transport); | 363 rtc::PacketTransportInternal* rtcp_packet_transport); | 
| 365 void DisconnectTransportChannels_n(); | 364 void DisconnectTransportChannels_n(); | 
| 366 void SignalSentPacket_n(rtc::PacketTransportInternal* transport, | 365 void SignalSentPacket_n(rtc::PacketTransportInternal* transport, | 
| 367 const rtc::SentPacket& sent_packet); | 366 const rtc::SentPacket& sent_packet); | 
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 547 bool srtp_required); | 546 bool srtp_required); | 
| 548 ~VideoChannel(); | 547 ~VideoChannel(); | 
| 549 | 548 | 
| 550 // downcasts a MediaChannel | 549 // downcasts a MediaChannel | 
| 551 VideoMediaChannel* media_channel() const override { | 550 VideoMediaChannel* media_channel() const override { | 
| 552 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel()); | 551 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel()); | 
| 553 } | 552 } | 
| 554 | 553 | 
| 555 bool SetSink(uint32_t ssrc, | 554 bool SetSink(uint32_t ssrc, | 
| 556 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink); | 555 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink); | 
| 556 void FillBitrateInfo(BandwidthEstimationInfo* bwe_info); | |
| 
hbos
2017/05/09 12:48:14
Why is this only in VideoChannel and not also in V
 
holmer
2017/05/30 14:44:28
We should probably add it to VoiceChannel later as
 
hbos
2017/05/31 14:31:58
Acknowledged.
 | |
| 557 // Get statistics about the current media session. | 557 // Get statistics about the current media session. | 
| 558 bool GetStats(VideoMediaInfo* stats); | 558 bool GetStats(VideoMediaInfo* stats); | 
| 559 | 559 | 
| 560 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> | 560 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> | 
| 561 SignalConnectionMonitor; | 561 SignalConnectionMonitor; | 
| 562 | 562 | 
| 563 void StartMediaMonitor(int cms); | 563 void StartMediaMonitor(int cms); | 
| 564 void StopMediaMonitor(); | 564 void StopMediaMonitor(); | 
| 565 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; | 565 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; | 
| 566 | 566 | 
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 721 // SetSendParameters. | 721 // SetSendParameters. | 
| 722 DataSendParameters last_send_params_; | 722 DataSendParameters last_send_params_; | 
| 723 // Last DataRecvParameters sent down to the media_channel() via | 723 // Last DataRecvParameters sent down to the media_channel() via | 
| 724 // SetRecvParameters. | 724 // SetRecvParameters. | 
| 725 DataRecvParameters last_recv_params_; | 725 DataRecvParameters last_recv_params_; | 
| 726 }; | 726 }; | 
| 727 | 727 | 
| 728 } // namespace cricket | 728 } // namespace cricket | 
| 729 | 729 | 
| 730 #endif // WEBRTC_PC_CHANNEL_H_ | 730 #endif // WEBRTC_PC_CHANNEL_H_ | 
| OLD | NEW |