OLD | NEW |
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 16 matching lines...) Expand all Loading... |
27 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 27 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
28 #include "webrtc/modules/rtp_rtcp/source/ssrc_database.h" | 28 #include "webrtc/modules/rtp_rtcp/source/ssrc_database.h" |
29 #include "webrtc/transport.h" | 29 #include "webrtc/transport.h" |
30 | 30 |
31 namespace webrtc { | 31 namespace webrtc { |
32 | 32 |
33 class BitrateAggregator; | 33 class BitrateAggregator; |
34 class CriticalSectionWrapper; | 34 class CriticalSectionWrapper; |
35 class RTPSenderAudio; | 35 class RTPSenderAudio; |
36 class RTPSenderVideo; | 36 class RTPSenderVideo; |
| 37 class RtcEventLog; |
37 | 38 |
38 class RTPSenderInterface { | 39 class RTPSenderInterface { |
39 public: | 40 public: |
40 RTPSenderInterface() {} | 41 RTPSenderInterface() {} |
41 virtual ~RTPSenderInterface() {} | 42 virtual ~RTPSenderInterface() {} |
42 | 43 |
43 enum CVOMode { | 44 enum CVOMode { |
44 kCVONone, | 45 kCVONone, |
45 kCVOInactive, // CVO rtp header extension is registered but haven't | 46 kCVOInactive, // CVO rtp header extension is registered but haven't |
46 // received any frame with rotation pending. | 47 // received any frame with rotation pending. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 public: | 90 public: |
90 RTPSender(bool audio, | 91 RTPSender(bool audio, |
91 Clock* clock, | 92 Clock* clock, |
92 Transport* transport, | 93 Transport* transport, |
93 RtpAudioFeedback* audio_feedback, | 94 RtpAudioFeedback* audio_feedback, |
94 RtpPacketSender* paced_sender, | 95 RtpPacketSender* paced_sender, |
95 TransportSequenceNumberAllocator* sequence_number_allocator, | 96 TransportSequenceNumberAllocator* sequence_number_allocator, |
96 TransportFeedbackObserver* transport_feedback_callback, | 97 TransportFeedbackObserver* transport_feedback_callback, |
97 BitrateStatisticsObserver* bitrate_callback, | 98 BitrateStatisticsObserver* bitrate_callback, |
98 FrameCountObserver* frame_count_observer, | 99 FrameCountObserver* frame_count_observer, |
99 SendSideDelayObserver* send_side_delay_observer); | 100 SendSideDelayObserver* send_side_delay_observer, |
| 101 RtcEventLog* event_log); |
100 virtual ~RTPSender(); | 102 virtual ~RTPSender(); |
101 | 103 |
102 void ProcessBitrate(); | 104 void ProcessBitrate(); |
103 | 105 |
104 uint16_t ActualSendBitrateKbit() const override; | 106 uint16_t ActualSendBitrateKbit() const override; |
105 | 107 |
106 uint32_t VideoBitrateSent() const; | 108 uint32_t VideoBitrateSent() const; |
107 uint32_t FecOverheadRate() const; | 109 uint32_t FecOverheadRate() const; |
108 uint32_t NackOverheadRate() const; | 110 uint32_t NackOverheadRate() const; |
109 | 111 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 428 |
427 // Statistics | 429 // Statistics |
428 rtc::scoped_ptr<CriticalSectionWrapper> statistics_crit_; | 430 rtc::scoped_ptr<CriticalSectionWrapper> statistics_crit_; |
429 SendDelayMap send_delays_ GUARDED_BY(statistics_crit_); | 431 SendDelayMap send_delays_ GUARDED_BY(statistics_crit_); |
430 FrameCounts frame_counts_ GUARDED_BY(statistics_crit_); | 432 FrameCounts frame_counts_ GUARDED_BY(statistics_crit_); |
431 StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_); | 433 StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_); |
432 StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_); | 434 StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_); |
433 StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_); | 435 StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_); |
434 FrameCountObserver* const frame_count_observer_; | 436 FrameCountObserver* const frame_count_observer_; |
435 SendSideDelayObserver* const send_side_delay_observer_; | 437 SendSideDelayObserver* const send_side_delay_observer_; |
| 438 RtcEventLog* const event_log_; |
436 | 439 |
437 // RTP variables | 440 // RTP variables |
438 bool start_timestamp_forced_ GUARDED_BY(send_critsect_); | 441 bool start_timestamp_forced_ GUARDED_BY(send_critsect_); |
439 uint32_t start_timestamp_ GUARDED_BY(send_critsect_); | 442 uint32_t start_timestamp_ GUARDED_BY(send_critsect_); |
440 SSRCDatabase& ssrc_db_ GUARDED_BY(send_critsect_); | 443 SSRCDatabase& ssrc_db_ GUARDED_BY(send_critsect_); |
441 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); | 444 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); |
442 bool sequence_number_forced_ GUARDED_BY(send_critsect_); | 445 bool sequence_number_forced_ GUARDED_BY(send_critsect_); |
443 uint16_t sequence_number_ GUARDED_BY(send_critsect_); | 446 uint16_t sequence_number_ GUARDED_BY(send_critsect_); |
444 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); | 447 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); |
445 bool ssrc_forced_ GUARDED_BY(send_critsect_); | 448 bool ssrc_forced_ GUARDED_BY(send_critsect_); |
(...skipping 11 matching lines...) Expand all Loading... |
457 int rtx_payload_type_ GUARDED_BY(send_critsect_); | 460 int rtx_payload_type_ GUARDED_BY(send_critsect_); |
458 // Mapping rtx_payload_type_map_[associated] = rtx. | 461 // Mapping rtx_payload_type_map_[associated] = rtx. |
459 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); | 462 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); |
460 | 463 |
461 // Note: Don't access this variable directly, always go through | 464 // Note: Don't access this variable directly, always go through |
462 // SetTargetBitrateKbps or GetTargetBitrateKbps. Also remember | 465 // SetTargetBitrateKbps or GetTargetBitrateKbps. Also remember |
463 // that by the time the function returns there is no guarantee | 466 // that by the time the function returns there is no guarantee |
464 // that the target bitrate is still valid. | 467 // that the target bitrate is still valid. |
465 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_; | 468 rtc::scoped_ptr<CriticalSectionWrapper> target_bitrate_critsect_; |
466 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_); | 469 uint32_t target_bitrate_ GUARDED_BY(target_bitrate_critsect_); |
| 470 |
| 471 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); |
467 }; | 472 }; |
468 | 473 |
469 } // namespace webrtc | 474 } // namespace webrtc |
470 | 475 |
471 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ | 476 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ |
OLD | NEW |