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

Side by Side Diff: webrtc/video/vie_channel.h

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: Created 4 years, 8 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 int payload_type_fec); 86 int payload_type_fec);
87 87
88 RtpState GetRtpStateForSsrc(uint32_t ssrc) const; 88 RtpState GetRtpStateForSsrc(uint32_t ssrc) const;
89 89
90 // Gets send statistics for the rtp and rtx stream. 90 // Gets send statistics for the rtp and rtx stream.
91 void GetSendStreamDataCounters(StreamDataCounters* rtp_counters, 91 void GetSendStreamDataCounters(StreamDataCounters* rtp_counters,
92 StreamDataCounters* rtx_counters) const; 92 StreamDataCounters* rtx_counters) const;
93 93
94 void RegisterSendSideDelayObserver(SendSideDelayObserver* observer); 94 void RegisterSendSideDelayObserver(SendSideDelayObserver* observer);
95 95
96 void RegisterSendPacketObserver(SendPacketObserver* observer);
97
96 // Called on any new send bitrate estimate. 98 // Called on any new send bitrate estimate.
97 void RegisterSendBitrateObserver(BitrateStatisticsObserver* observer); 99 void RegisterSendBitrateObserver(BitrateStatisticsObserver* observer);
98 100
99 // Implements RtpFeedback. 101 // Implements RtpFeedback.
100 int32_t OnInitializeDecoder(const int8_t payload_type, 102 int32_t OnInitializeDecoder(const int8_t payload_type,
101 const char payload_name[RTP_PAYLOAD_NAME_SIZE], 103 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
102 const int frequency, 104 const int frequency,
103 const size_t channels, 105 const size_t channels,
104 const uint32_t rate) override; 106 const uint32_t rate) override;
105 void OnIncomingSSRCChanged(const uint32_t ssrc) override; 107 void OnIncomingSSRCChanged(const uint32_t ssrc) override;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 RtcpBandwidthObserver* bandwidth_callback, 178 RtcpBandwidthObserver* bandwidth_callback,
177 TransportFeedbackObserver* transport_feedback_callback, 179 TransportFeedbackObserver* transport_feedback_callback,
178 RtcpRttStats* rtt_stats, 180 RtcpRttStats* rtt_stats,
179 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, 181 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer,
180 RemoteBitrateEstimator* remote_bitrate_estimator, 182 RemoteBitrateEstimator* remote_bitrate_estimator,
181 RtpPacketSender* paced_sender, 183 RtpPacketSender* paced_sender,
182 TransportSequenceNumberAllocator* transport_sequence_number_allocator, 184 TransportSequenceNumberAllocator* transport_sequence_number_allocator,
183 BitrateStatisticsObserver* send_bitrate_observer, 185 BitrateStatisticsObserver* send_bitrate_observer,
184 FrameCountObserver* send_frame_count_observer, 186 FrameCountObserver* send_frame_count_observer,
185 SendSideDelayObserver* send_side_delay_observer, 187 SendSideDelayObserver* send_side_delay_observer,
188 SendPacketObserver* send_packet_observer,
186 size_t num_modules); 189 size_t num_modules);
187 190
188 // Assumed to be protected. 191 // Assumed to be protected.
189 void StartDecodeThread(); 192 void StartDecodeThread();
190 void StopDecodeThread(); 193 void StopDecodeThread();
191 194
192 void ProcessNACKRequest(const bool enable); 195 void ProcessNACKRequest(const bool enable);
193 // Compute NACK list parameters for the buffering mode. 196 // Compute NACK list parameters for the buffering mode.
194 int GetRequiredNackListSize(int target_delay_ms); 197 int GetRequiredNackListSize(int target_delay_ms);
195 198
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 public RegisterableCallback<SendSideDelayObserver> { 250 public RegisterableCallback<SendSideDelayObserver> {
248 void SendSideDelayUpdated(int avg_delay_ms, 251 void SendSideDelayUpdated(int avg_delay_ms,
249 int max_delay_ms, 252 int max_delay_ms,
250 uint32_t ssrc) override { 253 uint32_t ssrc) override {
251 rtc::CritScope lock(&critsect_); 254 rtc::CritScope lock(&critsect_);
252 if (callback_) 255 if (callback_)
253 callback_->SendSideDelayUpdated(avg_delay_ms, max_delay_ms, ssrc); 256 callback_->SendSideDelayUpdated(avg_delay_ms, max_delay_ms, ssrc);
254 } 257 }
255 } send_side_delay_observer_; 258 } send_side_delay_observer_;
256 259
260 class RegisterableSendPacketObserver
261 : public RegisterableCallback<SendPacketObserver> {
262 void OnSendPacket(uint16_t packet_id,
263 int64_t capture_time_ms,
264 uint32_t ssrc) override {
265 rtc::CritScope lock(&critsect_);
266 if (callback_)
267 callback_->OnSendPacket(packet_id, capture_time_ms, ssrc);
268 }
269 } send_packet_observer_;
270
257 class RegisterableRtcpPacketTypeCounterObserver 271 class RegisterableRtcpPacketTypeCounterObserver
258 : public RegisterableCallback<RtcpPacketTypeCounterObserver> { 272 : public RegisterableCallback<RtcpPacketTypeCounterObserver> {
259 public: 273 public:
260 void RtcpPacketTypesCounterUpdated( 274 void RtcpPacketTypesCounterUpdated(
261 uint32_t ssrc, 275 uint32_t ssrc,
262 const RtcpPacketTypeCounter& packet_counter) override { 276 const RtcpPacketTypeCounter& packet_counter) override {
263 rtc::CritScope lock(&critsect_); 277 rtc::CritScope lock(&critsect_);
264 if (callback_) 278 if (callback_)
265 callback_->RtcpPacketTypesCounterUpdated(ssrc, packet_counter); 279 callback_->RtcpPacketTypesCounterUpdated(ssrc, packet_counter);
266 } 280 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 316
303 int64_t last_rtt_ms_ GUARDED_BY(crit_); 317 int64_t last_rtt_ms_ GUARDED_BY(crit_);
304 318
305 // RtpRtcp modules, declared last as they use other members on construction. 319 // RtpRtcp modules, declared last as they use other members on construction.
306 const std::vector<RtpRtcp*> rtp_rtcp_modules_; 320 const std::vector<RtpRtcp*> rtp_rtcp_modules_;
307 }; 321 };
308 322
309 } // namespace webrtc 323 } // namespace webrtc
310 324
311 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ 325 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698