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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.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: rebase Created 5 years 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 public: 89 public:
90 RTPSender(bool audio, 90 RTPSender(bool audio,
91 Clock* clock, 91 Clock* clock,
92 Transport* transport, 92 Transport* transport,
93 RtpAudioFeedback* audio_feedback, 93 RtpAudioFeedback* audio_feedback,
94 RtpPacketSender* paced_sender, 94 RtpPacketSender* paced_sender,
95 TransportSequenceNumberAllocator* sequence_number_allocator, 95 TransportSequenceNumberAllocator* sequence_number_allocator,
96 TransportFeedbackObserver* transport_feedback_callback, 96 TransportFeedbackObserver* transport_feedback_callback,
97 BitrateStatisticsObserver* bitrate_callback, 97 BitrateStatisticsObserver* bitrate_callback,
98 FrameCountObserver* frame_count_observer, 98 FrameCountObserver* frame_count_observer,
99 SendSideDelayObserver* send_side_delay_observer); 99 SendSideDelayObserver* send_side_delay_observer,
100 SendPacketObserver* send_packet_observer);
100 virtual ~RTPSender(); 101 virtual ~RTPSender();
101 102
102 void ProcessBitrate(); 103 void ProcessBitrate();
103 104
104 uint16_t ActualSendBitrateKbit() const override; 105 uint16_t ActualSendBitrateKbit() const override;
105 106
106 uint32_t VideoBitrateSent() const; 107 uint32_t VideoBitrateSent() const;
107 uint32_t FecOverheadRate() const; 108 uint32_t FecOverheadRate() const;
108 uint32_t NackOverheadRate() const; 109 uint32_t NackOverheadRate() const;
109 110
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 size_t padding_length); 347 size_t padding_length);
347 348
348 void BuildRtxPacket(uint8_t* buffer, size_t* length, 349 void BuildRtxPacket(uint8_t* buffer, size_t* length,
349 uint8_t* buffer_rtx); 350 uint8_t* buffer_rtx);
350 351
351 bool SendPacketToNetwork(const uint8_t* packet, 352 bool SendPacketToNetwork(const uint8_t* packet,
352 size_t size, 353 size_t size,
353 const PacketOptions& options); 354 const PacketOptions& options);
354 355
355 void UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms); 356 void UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms);
357 void UpdateOnSendPacket(int64_t capture_time_ms, int* packet_id);
356 358
357 // Find the byte position of the RTP extension as indicated by |type| in 359 // Find the byte position of the RTP extension as indicated by |type| in
358 // |rtp_packet|. Return false if such extension doesn't exist. 360 // |rtp_packet|. Return false if such extension doesn't exist.
359 bool FindHeaderExtensionPosition(RTPExtensionType type, 361 bool FindHeaderExtensionPosition(RTPExtensionType type,
360 const uint8_t* rtp_packet, 362 const uint8_t* rtp_packet,
361 size_t rtp_packet_length, 363 size_t rtp_packet_length,
362 const RTPHeader& rtp_header, 364 const RTPHeader& rtp_header,
363 size_t* position) const; 365 size_t* position) const;
364 366
365 void UpdateTransmissionTimeOffset(uint8_t* rtp_packet, 367 void UpdateTransmissionTimeOffset(uint8_t* rtp_packet,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 427
426 // Statistics 428 // Statistics
427 rtc::scoped_ptr<CriticalSectionWrapper> statistics_crit_; 429 rtc::scoped_ptr<CriticalSectionWrapper> statistics_crit_;
428 SendDelayMap send_delays_ GUARDED_BY(statistics_crit_); 430 SendDelayMap send_delays_ GUARDED_BY(statistics_crit_);
429 FrameCounts frame_counts_ GUARDED_BY(statistics_crit_); 431 FrameCounts frame_counts_ GUARDED_BY(statistics_crit_);
430 StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_); 432 StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_);
431 StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_); 433 StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_);
432 StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_); 434 StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_);
433 FrameCountObserver* const frame_count_observer_; 435 FrameCountObserver* const frame_count_observer_;
434 SendSideDelayObserver* const send_side_delay_observer_; 436 SendSideDelayObserver* const send_side_delay_observer_;
437 SendPacketObserver* const send_packet_observer_;
435 438
436 // RTP variables 439 // RTP variables
437 bool start_timestamp_forced_ GUARDED_BY(send_critsect_); 440 bool start_timestamp_forced_ GUARDED_BY(send_critsect_);
438 uint32_t start_timestamp_ GUARDED_BY(send_critsect_); 441 uint32_t start_timestamp_ GUARDED_BY(send_critsect_);
439 SSRCDatabase& ssrc_db_ GUARDED_BY(send_critsect_); 442 SSRCDatabase& ssrc_db_ GUARDED_BY(send_critsect_);
440 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); 443 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_);
441 bool sequence_number_forced_ GUARDED_BY(send_critsect_); 444 bool sequence_number_forced_ GUARDED_BY(send_critsect_);
442 uint16_t sequence_number_ GUARDED_BY(send_critsect_); 445 uint16_t sequence_number_ GUARDED_BY(send_critsect_);
443 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); 446 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_);
444 bool ssrc_forced_ GUARDED_BY(send_critsect_); 447 bool ssrc_forced_ GUARDED_BY(send_critsect_);
(...skipping 16 matching lines...) Expand all
461 // SetTargetBitrateKbps or GetTargetBitrateKbps. Also remember 464 // SetTargetBitrateKbps or GetTargetBitrateKbps. Also remember
462 // that by the time the function returns there is no guarantee 465 // that by the time the function returns there is no guarantee
463 // that the target bitrate is still valid. 466 // that the target bitrate is still valid.
464 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_; 467 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_;
465 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_); 468 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_);
466 }; 469 };
467 470
468 } // namespace webrtc 471 } // namespace webrtc
469 472
470 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 473 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698