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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.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/modules/rtp_rtcp/include/rtp_rtcp.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender.h » ('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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 bandwidth_callback(nullptr), 53 bandwidth_callback(nullptr),
54 transport_feedback_callback(nullptr), 54 transport_feedback_callback(nullptr),
55 rtt_stats(nullptr), 55 rtt_stats(nullptr),
56 rtcp_packet_type_counter_observer(nullptr), 56 rtcp_packet_type_counter_observer(nullptr),
57 remote_bitrate_estimator(nullptr), 57 remote_bitrate_estimator(nullptr),
58 paced_sender(nullptr), 58 paced_sender(nullptr),
59 transport_sequence_number_allocator(nullptr), 59 transport_sequence_number_allocator(nullptr),
60 send_bitrate_observer(nullptr), 60 send_bitrate_observer(nullptr),
61 send_frame_count_observer(nullptr), 61 send_frame_count_observer(nullptr),
62 send_side_delay_observer(nullptr), 62 send_side_delay_observer(nullptr),
63 event_log(nullptr) {} 63 event_log(nullptr),
64 send_packet_observer(nullptr) {}
64 65
65 RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) { 66 RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) {
66 if (configuration.clock) { 67 if (configuration.clock) {
67 return new ModuleRtpRtcpImpl(configuration); 68 return new ModuleRtpRtcpImpl(configuration);
68 } else { 69 } else {
69 // No clock implementation provided, use default clock. 70 // No clock implementation provided, use default clock.
70 RtpRtcp::Configuration configuration_copy; 71 RtpRtcp::Configuration configuration_copy;
71 memcpy(&configuration_copy, &configuration, 72 memcpy(&configuration_copy, &configuration,
72 sizeof(RtpRtcp::Configuration)); 73 sizeof(RtpRtcp::Configuration));
73 configuration_copy.clock = Clock::GetRealTimeClock(); 74 configuration_copy.clock = Clock::GetRealTimeClock();
74 return new ModuleRtpRtcpImpl(configuration_copy); 75 return new ModuleRtpRtcpImpl(configuration_copy);
75 } 76 }
76 } 77 }
77 78
78 ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration) 79 ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
79 : rtp_sender_(configuration.audio, 80 : rtp_sender_(configuration.audio,
80 configuration.clock, 81 configuration.clock,
81 configuration.outgoing_transport, 82 configuration.outgoing_transport,
82 configuration.paced_sender, 83 configuration.paced_sender,
83 configuration.transport_sequence_number_allocator, 84 configuration.transport_sequence_number_allocator,
84 configuration.transport_feedback_callback, 85 configuration.transport_feedback_callback,
85 configuration.send_bitrate_observer, 86 configuration.send_bitrate_observer,
86 configuration.send_frame_count_observer, 87 configuration.send_frame_count_observer,
87 configuration.send_side_delay_observer, 88 configuration.send_side_delay_observer,
88 configuration.event_log), 89 configuration.event_log,
90 configuration.send_packet_observer),
89 rtcp_sender_(configuration.audio, 91 rtcp_sender_(configuration.audio,
90 configuration.clock, 92 configuration.clock,
91 configuration.receive_statistics, 93 configuration.receive_statistics,
92 configuration.rtcp_packet_type_counter_observer, 94 configuration.rtcp_packet_type_counter_observer,
93 configuration.event_log, 95 configuration.event_log,
94 configuration.outgoing_transport), 96 configuration.outgoing_transport),
95 rtcp_receiver_(configuration.clock, 97 rtcp_receiver_(configuration.clock,
96 configuration.receiver_only, 98 configuration.receiver_only,
97 configuration.rtcp_packet_type_counter_observer, 99 configuration.rtcp_packet_type_counter_observer,
98 configuration.bandwidth_callback, 100 configuration.bandwidth_callback,
99 configuration.intra_frame_callback, 101 configuration.intra_frame_callback,
100 configuration.transport_feedback_callback, 102 configuration.transport_feedback_callback,
101 this), 103 this),
102 clock_(configuration.clock), 104 clock_(configuration.clock),
103 audio_(configuration.audio), 105 audio_(configuration.audio),
104 collision_detected_(false), 106 collision_detected_(false),
105 last_process_time_(configuration.clock->TimeInMilliseconds()), 107 last_process_time_(configuration.clock->TimeInMilliseconds()),
106 last_bitrate_process_time_(configuration.clock->TimeInMilliseconds()), 108 last_bitrate_process_time_(configuration.clock->TimeInMilliseconds()),
107 last_rtt_process_time_(configuration.clock->TimeInMilliseconds()), 109 last_rtt_process_time_(configuration.clock->TimeInMilliseconds()),
108 packet_overhead_(28), // IPV4 UDP. 110 packet_overhead_(28), // IPV4 UDP.
109 nack_last_time_sent_full_(0), 111 nack_last_time_sent_full_(0),
110 nack_last_time_sent_full_prev_(0), 112 nack_last_time_sent_full_prev_(0),
111 nack_last_seq_number_sent_(0), 113 nack_last_seq_number_sent_(0),
112 key_frame_req_method_(kKeyFrameReqPliRtcp), 114 key_frame_req_method_(kKeyFrameReqPliRtcp),
113 remote_bitrate_(configuration.remote_bitrate_estimator), 115 remote_bitrate_(configuration.remote_bitrate_estimator),
114 rtt_stats_(configuration.rtt_stats), 116 rtt_stats_(configuration.rtt_stats),
115 rtt_ms_(0) { 117 rtt_ms_(0) {
116 // Make sure that RTCP objects are aware of our SSRC. 118 // Make sure that RTCP objects are aware of our SSRC.
117 uint32_t SSRC = rtp_sender_.SSRC(); 119 uint32_t SSRC = rtp_sender_.SSRC();
118 rtcp_sender_.SetSSRC(SSRC); 120 rtcp_sender_.SetSSRC(SSRC);
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( 986 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
985 StreamDataCountersCallback* callback) { 987 StreamDataCountersCallback* callback) {
986 rtp_sender_.RegisterRtpStatisticsCallback(callback); 988 rtp_sender_.RegisterRtpStatisticsCallback(callback);
987 } 989 }
988 990
989 StreamDataCountersCallback* 991 StreamDataCountersCallback*
990 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 992 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
991 return rtp_sender_.GetRtpStatisticsCallback(); 993 return rtp_sender_.GetRtpStatisticsCallback();
992 } 994 }
993 } // namespace webrtc 995 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698