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 14 matching lines...) Expand all Loading... |
25 #include "webrtc/base/rate_statistics.h" | 25 #include "webrtc/base/rate_statistics.h" |
26 #include "webrtc/base/thread_annotations.h" | 26 #include "webrtc/base/thread_annotations.h" |
27 #include "webrtc/common_types.h" | 27 #include "webrtc/common_types.h" |
28 #include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h" | 28 #include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h" |
29 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 29 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
30 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" | 30 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" |
31 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" | 31 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" |
32 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_history.h" | 32 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_history.h" |
33 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" | 33 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" |
34 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 34 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
35 #include "webrtc/modules/rtp_rtcp/source/ssrc_database.h" | |
36 | 35 |
37 namespace webrtc { | 36 namespace webrtc { |
38 | 37 |
39 class OverheadObserver; | 38 class OverheadObserver; |
40 class RateLimiter; | 39 class RateLimiter; |
41 class RtcEventLog; | 40 class RtcEventLog; |
42 class RtpPacketToSend; | 41 class RtpPacketToSend; |
43 class RTPSenderAudio; | 42 class RTPSenderAudio; |
44 class RTPSenderVideo; | 43 class RTPSenderVideo; |
45 | 44 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const uint32_t frequency, | 79 const uint32_t frequency, |
81 const size_t channels, | 80 const size_t channels, |
82 const uint32_t rate); | 81 const uint32_t rate); |
83 | 82 |
84 int32_t DeRegisterSendPayload(const int8_t payload_type); | 83 int32_t DeRegisterSendPayload(const int8_t payload_type); |
85 | 84 |
86 void SetSendPayloadType(int8_t payload_type); | 85 void SetSendPayloadType(int8_t payload_type); |
87 | 86 |
88 int8_t SendPayloadType() const; | 87 int8_t SendPayloadType() const; |
89 | 88 |
90 void SetSendingStatus(bool enabled); | |
91 | |
92 void SetSendingMediaStatus(bool enabled); | 89 void SetSendingMediaStatus(bool enabled); |
93 bool SendingMedia() const; | 90 bool SendingMedia() const; |
94 | 91 |
95 void GetDataCounters(StreamDataCounters* rtp_stats, | 92 void GetDataCounters(StreamDataCounters* rtp_stats, |
96 StreamDataCounters* rtx_stats) const; | 93 StreamDataCounters* rtx_stats) const; |
97 | 94 |
98 uint32_t TimestampOffset() const; | 95 uint32_t TimestampOffset() const; |
99 void SetTimestampOffset(uint32_t timestamp); | 96 void SetTimestampOffset(uint32_t timestamp); |
100 | 97 |
101 uint32_t GenerateNewSSRC(); | |
102 void SetSSRC(uint32_t ssrc); | 98 void SetSSRC(uint32_t ssrc); |
103 | 99 |
104 uint16_t SequenceNumber() const; | 100 uint16_t SequenceNumber() const; |
105 void SetSequenceNumber(uint16_t seq); | 101 void SetSequenceNumber(uint16_t seq); |
106 | 102 |
107 void SetCsrcs(const std::vector<uint32_t>& csrcs); | 103 void SetCsrcs(const std::vector<uint32_t>& csrcs); |
108 | 104 |
109 void SetMaxRtpPacketSize(size_t max_packet_size); | 105 void SetMaxRtpPacketSize(size_t max_packet_size); |
110 | 106 |
111 bool SendOutgoingData(FrameType frame_type, | 107 bool SendOutgoingData(FrameType frame_type, |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 RateStatistics total_bitrate_sent_ GUARDED_BY(statistics_crit_); | 294 RateStatistics total_bitrate_sent_ GUARDED_BY(statistics_crit_); |
299 RateStatistics nack_bitrate_sent_ GUARDED_BY(statistics_crit_); | 295 RateStatistics nack_bitrate_sent_ GUARDED_BY(statistics_crit_); |
300 FrameCountObserver* const frame_count_observer_; | 296 FrameCountObserver* const frame_count_observer_; |
301 SendSideDelayObserver* const send_side_delay_observer_; | 297 SendSideDelayObserver* const send_side_delay_observer_; |
302 RtcEventLog* const event_log_; | 298 RtcEventLog* const event_log_; |
303 SendPacketObserver* const send_packet_observer_; | 299 SendPacketObserver* const send_packet_observer_; |
304 BitrateStatisticsObserver* const bitrate_callback_; | 300 BitrateStatisticsObserver* const bitrate_callback_; |
305 | 301 |
306 // RTP variables | 302 // RTP variables |
307 uint32_t timestamp_offset_ GUARDED_BY(send_critsect_); | 303 uint32_t timestamp_offset_ GUARDED_BY(send_critsect_); |
308 SSRCDatabase* const ssrc_db_; | |
309 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); | 304 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); |
310 bool sequence_number_forced_ GUARDED_BY(send_critsect_); | 305 bool sequence_number_forced_ GUARDED_BY(send_critsect_); |
311 uint16_t sequence_number_ GUARDED_BY(send_critsect_); | 306 uint16_t sequence_number_ GUARDED_BY(send_critsect_); |
312 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); | 307 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); |
313 bool ssrc_forced_ GUARDED_BY(send_critsect_); | 308 // Must be explicitly set by the application, use of rtc:Optional |
314 uint32_t ssrc_ GUARDED_BY(send_critsect_); | 309 // only to keep track of correct use. |
| 310 rtc::Optional<uint32_t> ssrc_ GUARDED_BY(send_critsect_); |
315 uint32_t last_rtp_timestamp_ GUARDED_BY(send_critsect_); | 311 uint32_t last_rtp_timestamp_ GUARDED_BY(send_critsect_); |
316 int64_t capture_time_ms_ GUARDED_BY(send_critsect_); | 312 int64_t capture_time_ms_ GUARDED_BY(send_critsect_); |
317 int64_t last_timestamp_time_ms_ GUARDED_BY(send_critsect_); | 313 int64_t last_timestamp_time_ms_ GUARDED_BY(send_critsect_); |
318 bool media_has_been_sent_ GUARDED_BY(send_critsect_); | 314 bool media_has_been_sent_ GUARDED_BY(send_critsect_); |
319 bool last_packet_marker_bit_ GUARDED_BY(send_critsect_); | 315 bool last_packet_marker_bit_ GUARDED_BY(send_critsect_); |
320 std::vector<uint32_t> csrcs_ GUARDED_BY(send_critsect_); | 316 std::vector<uint32_t> csrcs_ GUARDED_BY(send_critsect_); |
321 int rtx_ GUARDED_BY(send_critsect_); | 317 int rtx_ GUARDED_BY(send_critsect_); |
322 uint32_t ssrc_rtx_ GUARDED_BY(send_critsect_); | 318 rtc::Optional<uint32_t> ssrc_rtx_ GUARDED_BY(send_critsect_); |
323 // Mapping rtx_payload_type_map_[associated] = rtx. | 319 // Mapping rtx_payload_type_map_[associated] = rtx. |
324 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); | 320 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); |
325 size_t rtp_overhead_bytes_per_packet_ GUARDED_BY(send_critsect_); | 321 size_t rtp_overhead_bytes_per_packet_ GUARDED_BY(send_critsect_); |
326 | 322 |
327 RateLimiter* const retransmission_rate_limiter_; | 323 RateLimiter* const retransmission_rate_limiter_; |
328 OverheadObserver* overhead_observer_; | 324 OverheadObserver* overhead_observer_; |
329 | 325 |
330 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); | 326 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); |
331 }; | 327 }; |
332 | 328 |
333 } // namespace webrtc | 329 } // namespace webrtc |
334 | 330 |
335 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ | 331 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ |
OLD | NEW |