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

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1478253002: Add histogram stats for send delay for a sent video stream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | webrtc/video/webrtc_video.gypi » ('j') | 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 (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 29 matching lines...) Expand all
40 40
41 std::vector<RtpRtcp*> CreateRtpRtcpModules( 41 std::vector<RtpRtcp*> CreateRtpRtcpModules(
42 Transport* outgoing_transport, 42 Transport* outgoing_transport,
43 RtcpIntraFrameObserver* intra_frame_callback, 43 RtcpIntraFrameObserver* intra_frame_callback,
44 RtcpBandwidthObserver* bandwidth_callback, 44 RtcpBandwidthObserver* bandwidth_callback,
45 TransportFeedbackObserver* transport_feedback_callback, 45 TransportFeedbackObserver* transport_feedback_callback,
46 RtcpRttStats* rtt_stats, 46 RtcpRttStats* rtt_stats,
47 RtpPacketSender* paced_sender, 47 RtpPacketSender* paced_sender,
48 TransportSequenceNumberAllocator* transport_sequence_number_allocator, 48 TransportSequenceNumberAllocator* transport_sequence_number_allocator,
49 SendStatisticsProxy* stats_proxy, 49 SendStatisticsProxy* stats_proxy,
50 SendDelayStats* send_delay_stats,
50 size_t num_modules) { 51 size_t num_modules) {
51 RTC_DCHECK_GT(num_modules, 0u); 52 RTC_DCHECK_GT(num_modules, 0u);
52 RtpRtcp::Configuration configuration; 53 RtpRtcp::Configuration configuration;
53 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; 54 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics;
54 configuration.audio = false; 55 configuration.audio = false;
55 configuration.receiver_only = false; 56 configuration.receiver_only = false;
56 configuration.receive_statistics = null_receive_statistics; 57 configuration.receive_statistics = null_receive_statistics;
57 configuration.outgoing_transport = outgoing_transport; 58 configuration.outgoing_transport = outgoing_transport;
58 configuration.intra_frame_callback = intra_frame_callback; 59 configuration.intra_frame_callback = intra_frame_callback;
59 configuration.rtt_stats = rtt_stats; 60 configuration.rtt_stats = rtt_stats;
60 configuration.rtcp_packet_type_counter_observer = stats_proxy; 61 configuration.rtcp_packet_type_counter_observer = stats_proxy;
61 configuration.paced_sender = paced_sender; 62 configuration.paced_sender = paced_sender;
62 configuration.transport_sequence_number_allocator = 63 configuration.transport_sequence_number_allocator =
63 transport_sequence_number_allocator; 64 transport_sequence_number_allocator;
64 configuration.send_bitrate_observer = stats_proxy; 65 configuration.send_bitrate_observer = stats_proxy;
65 configuration.send_frame_count_observer = stats_proxy; 66 configuration.send_frame_count_observer = stats_proxy;
66 configuration.send_side_delay_observer = stats_proxy; 67 configuration.send_side_delay_observer = stats_proxy;
68 configuration.send_packet_observer = send_delay_stats;
67 configuration.bandwidth_callback = bandwidth_callback; 69 configuration.bandwidth_callback = bandwidth_callback;
68 configuration.transport_feedback_callback = transport_feedback_callback; 70 configuration.transport_feedback_callback = transport_feedback_callback;
69 71
70 std::vector<RtpRtcp*> modules; 72 std::vector<RtpRtcp*> modules;
71 for (size_t i = 0; i < num_modules; ++i) { 73 for (size_t i = 0; i < num_modules; ++i) {
72 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); 74 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration);
73 rtp_rtcp->SetSendingStatus(false); 75 rtp_rtcp->SetSendingStatus(false);
74 rtp_rtcp->SetSendingMediaStatus(false); 76 rtp_rtcp->SetSendingMediaStatus(false);
75 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); 77 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound);
76 modules.push_back(rtp_rtcp); 78 modules.push_back(rtp_rtcp);
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 343
342 } // namespace 344 } // namespace
343 345
344 namespace internal { 346 namespace internal {
345 VideoSendStream::VideoSendStream( 347 VideoSendStream::VideoSendStream(
346 int num_cpu_cores, 348 int num_cpu_cores,
347 ProcessThread* module_process_thread, 349 ProcessThread* module_process_thread,
348 CallStats* call_stats, 350 CallStats* call_stats,
349 CongestionController* congestion_controller, 351 CongestionController* congestion_controller,
350 BitrateAllocator* bitrate_allocator, 352 BitrateAllocator* bitrate_allocator,
353 SendDelayStats* send_delay_stats,
351 VieRemb* remb, 354 VieRemb* remb,
352 const VideoSendStream::Config& config, 355 const VideoSendStream::Config& config,
353 const VideoEncoderConfig& encoder_config, 356 const VideoEncoderConfig& encoder_config,
354 const std::map<uint32_t, RtpState>& suspended_ssrcs) 357 const std::map<uint32_t, RtpState>& suspended_ssrcs)
355 : stats_proxy_(Clock::GetRealTimeClock(), 358 : stats_proxy_(Clock::GetRealTimeClock(),
356 config, 359 config,
357 encoder_config.content_type), 360 encoder_config.content_type),
358 encoded_frame_proxy_(config.post_encode_callback), 361 encoded_frame_proxy_(config.post_encode_callback),
359 config_(config), 362 config_(config),
360 suspended_ssrcs_(suspended_ssrcs), 363 suspended_ssrcs_(suspended_ssrcs),
(...skipping 23 matching lines...) Expand all
384 ->CreateRtcpBandwidthObserver()), 387 ->CreateRtcpBandwidthObserver()),
385 rtp_rtcp_modules_(CreateRtpRtcpModules( 388 rtp_rtcp_modules_(CreateRtpRtcpModules(
386 config.send_transport, 389 config.send_transport,
387 &encoder_feedback_, 390 &encoder_feedback_,
388 bandwidth_observer_.get(), 391 bandwidth_observer_.get(),
389 congestion_controller_->GetTransportFeedbackObserver(), 392 congestion_controller_->GetTransportFeedbackObserver(),
390 call_stats_->rtcp_rtt_stats(), 393 call_stats_->rtcp_rtt_stats(),
391 congestion_controller_->pacer(), 394 congestion_controller_->pacer(),
392 congestion_controller_->packet_router(), 395 congestion_controller_->packet_router(),
393 &stats_proxy_, 396 &stats_proxy_,
397 send_delay_stats,
394 config_.rtp.ssrcs.size())), 398 config_.rtp.ssrcs.size())),
395 payload_router_(rtp_rtcp_modules_, config.encoder_settings.payload_type), 399 payload_router_(rtp_rtcp_modules_, config.encoder_settings.payload_type),
396 input_(&encoder_wakeup_event_, 400 input_(&encoder_wakeup_event_,
397 config_.local_renderer, 401 config_.local_renderer,
398 &stats_proxy_, 402 &stats_proxy_,
399 &overuse_detector_) { 403 &overuse_detector_) {
400 LOG(LS_INFO) << "VideoSendStream: " << config_.ToString(); 404 LOG(LS_INFO) << "VideoSendStream: " << config_.ToString();
401 405
402 RTC_DCHECK(!config_.rtp.ssrcs.empty()); 406 RTC_DCHECK(!config_.rtp.ssrcs.empty());
403 RTC_DCHECK(module_process_thread_); 407 RTC_DCHECK(module_process_thread_);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 &module_nack_rate); 771 &module_nack_rate);
768 *sent_video_rate_bps += module_video_rate; 772 *sent_video_rate_bps += module_video_rate;
769 *sent_nack_rate_bps += module_nack_rate; 773 *sent_nack_rate_bps += module_nack_rate;
770 *sent_fec_rate_bps += module_fec_rate; 774 *sent_fec_rate_bps += module_fec_rate;
771 } 775 }
772 return 0; 776 return 0;
773 } 777 }
774 778
775 } // namespace internal 779 } // namespace internal
776 } // namespace webrtc 780 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | webrtc/video/webrtc_video.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698