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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.h

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated RTP/RTCP module to use setter methods instead of passing the event log pointer in the const… Created 4 years, 9 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 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 RtcEventLog* event_log);
101 virtual ~RTPSender(); 100 virtual ~RTPSender();
102 101
103 void ProcessBitrate(); 102 void ProcessBitrate();
104 103
105 uint16_t ActualSendBitrateKbit() const override; 104 uint16_t ActualSendBitrateKbit() const override;
106 105
107 uint32_t VideoBitrateSent() const; 106 uint32_t VideoBitrateSent() const;
108 uint32_t FecOverheadRate() const; 107 uint32_t FecOverheadRate() const;
109 uint32_t NackOverheadRate() const; 108 uint32_t NackOverheadRate() const;
110 109
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 StreamDataCountersCallback* GetRtpStatisticsCallback() const; 304 StreamDataCountersCallback* GetRtpStatisticsCallback() const;
306 305
307 uint32_t BitrateSent() const; 306 uint32_t BitrateSent() const;
308 307
309 void SetRtpState(const RtpState& rtp_state); 308 void SetRtpState(const RtpState& rtp_state);
310 RtpState GetRtpState() const; 309 RtpState GetRtpState() const;
311 void SetRtxRtpState(const RtpState& rtp_state); 310 void SetRtxRtpState(const RtpState& rtp_state);
312 RtpState GetRtxRtpState() const; 311 RtpState GetRtxRtpState() const;
313 CVOMode ActivateCVORtpHeaderExtension() override; 312 CVOMode ActivateCVORtpHeaderExtension() override;
314 313
314 void SetRtcEventLog(webrtc::RtcEventLog* event_log);
315
315 protected: 316 protected:
316 int32_t CheckPayloadType(int8_t payload_type, RtpVideoCodecTypes* video_type); 317 int32_t CheckPayloadType(int8_t payload_type, RtpVideoCodecTypes* video_type);
317 318
318 private: 319 private:
319 // Maps capture time in milliseconds to send-side delay in milliseconds. 320 // Maps capture time in milliseconds to send-side delay in milliseconds.
320 // Send-side delay is the difference between transmission time and capture 321 // Send-side delay is the difference between transmission time and capture
321 // time. 322 // time.
322 typedef std::map<int64_t, int> SendDelayMap; 323 typedef std::map<int64_t, int> SendDelayMap;
323 324
324 size_t CreateRtpHeader(uint8_t* header, 325 size_t CreateRtpHeader(uint8_t* header,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 459
459 // Statistics 460 // Statistics
460 rtc::scoped_ptr<CriticalSectionWrapper> statistics_crit_; 461 rtc::scoped_ptr<CriticalSectionWrapper> statistics_crit_;
461 SendDelayMap send_delays_ GUARDED_BY(statistics_crit_); 462 SendDelayMap send_delays_ GUARDED_BY(statistics_crit_);
462 FrameCounts frame_counts_ GUARDED_BY(statistics_crit_); 463 FrameCounts frame_counts_ GUARDED_BY(statistics_crit_);
463 StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_); 464 StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_);
464 StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_); 465 StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_);
465 StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_); 466 StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_);
466 FrameCountObserver* const frame_count_observer_; 467 FrameCountObserver* const frame_count_observer_;
467 SendSideDelayObserver* const send_side_delay_observer_; 468 SendSideDelayObserver* const send_side_delay_observer_;
468 RtcEventLog* const event_log_; 469
470 rtc::scoped_ptr<CriticalSectionWrapper> event_log_crit_;
471 RtcEventLog* event_log_ GUARDED_BY(event_log_crit_);
the sun 2016/03/03 09:25:13 Can you use send_critsect_ instead?
ivoc 2016/03/10 13:15:36 The critical section is no longer needed with the
469 472
470 // RTP variables 473 // RTP variables
471 bool start_timestamp_forced_ GUARDED_BY(send_critsect_); 474 bool start_timestamp_forced_ GUARDED_BY(send_critsect_);
472 uint32_t start_timestamp_ GUARDED_BY(send_critsect_); 475 uint32_t start_timestamp_ GUARDED_BY(send_critsect_);
473 SSRCDatabase* const ssrc_db_; 476 SSRCDatabase* const ssrc_db_;
474 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); 477 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_);
475 bool sequence_number_forced_ GUARDED_BY(send_critsect_); 478 bool sequence_number_forced_ GUARDED_BY(send_critsect_);
476 uint16_t sequence_number_ GUARDED_BY(send_critsect_); 479 uint16_t sequence_number_ GUARDED_BY(send_critsect_);
477 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); 480 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_);
478 bool ssrc_forced_ GUARDED_BY(send_critsect_); 481 bool ssrc_forced_ GUARDED_BY(send_critsect_);
(...skipping 15 matching lines...) Expand all
494 // that the target bitrate is still valid. 497 // that the target bitrate is still valid.
495 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_; 498 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_;
496 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_); 499 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_);
497 500
498 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); 501 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender);
499 }; 502 };
500 503
501 } // namespace webrtc 504 } // namespace webrtc
502 505
503 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 506 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698