| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 bool IsFecPacket(const RtpPacketToSend& packet) const; | 247 bool IsFecPacket(const RtpPacketToSend& packet) const; |
| 248 | 248 |
| 249 void AddPacketToTransportFeedback(uint16_t packet_id, | 249 void AddPacketToTransportFeedback(uint16_t packet_id, |
| 250 const RtpPacketToSend& packet, | 250 const RtpPacketToSend& packet, |
| 251 const PacedPacketInfo& pacing_info); | 251 const PacedPacketInfo& pacing_info); |
| 252 | 252 |
| 253 void UpdateRtpOverhead(const RtpPacketToSend& packet); | 253 void UpdateRtpOverhead(const RtpPacketToSend& packet); |
| 254 | 254 |
| 255 Clock* const clock_; | 255 Clock* const clock_; |
| 256 const int64_t clock_delta_ms_; | 256 const int64_t clock_delta_ms_; |
| 257 Random random_ GUARDED_BY(send_critsect_); | 257 Random random_ RTC_GUARDED_BY(send_critsect_); |
| 258 | 258 |
| 259 const bool audio_configured_; | 259 const bool audio_configured_; |
| 260 const std::unique_ptr<RTPSenderAudio> audio_; | 260 const std::unique_ptr<RTPSenderAudio> audio_; |
| 261 const std::unique_ptr<RTPSenderVideo> video_; | 261 const std::unique_ptr<RTPSenderVideo> video_; |
| 262 | 262 |
| 263 RtpPacketSender* const paced_sender_; | 263 RtpPacketSender* const paced_sender_; |
| 264 TransportSequenceNumberAllocator* const transport_sequence_number_allocator_; | 264 TransportSequenceNumberAllocator* const transport_sequence_number_allocator_; |
| 265 TransportFeedbackObserver* const transport_feedback_observer_; | 265 TransportFeedbackObserver* const transport_feedback_observer_; |
| 266 int64_t last_capture_time_ms_sent_; | 266 int64_t last_capture_time_ms_sent_; |
| 267 rtc::CriticalSection send_critsect_; | 267 rtc::CriticalSection send_critsect_; |
| 268 | 268 |
| 269 Transport* transport_; | 269 Transport* transport_; |
| 270 bool sending_media_ GUARDED_BY(send_critsect_); | 270 bool sending_media_ RTC_GUARDED_BY(send_critsect_); |
| 271 | 271 |
| 272 size_t max_packet_size_; | 272 size_t max_packet_size_; |
| 273 | 273 |
| 274 int8_t payload_type_ GUARDED_BY(send_critsect_); | 274 int8_t payload_type_ RTC_GUARDED_BY(send_critsect_); |
| 275 std::map<int8_t, RtpUtility::Payload*> payload_type_map_; | 275 std::map<int8_t, RtpUtility::Payload*> payload_type_map_; |
| 276 | 276 |
| 277 RtpHeaderExtensionMap rtp_header_extension_map_ GUARDED_BY(send_critsect_); | 277 RtpHeaderExtensionMap rtp_header_extension_map_ |
| 278 RTC_GUARDED_BY(send_critsect_); |
| 278 | 279 |
| 279 // Tracks the current request for playout delay limits from application | 280 // Tracks the current request for playout delay limits from application |
| 280 // and decides whether the current RTP frame should include the playout | 281 // and decides whether the current RTP frame should include the playout |
| 281 // delay extension on header. | 282 // delay extension on header. |
| 282 PlayoutDelayOracle playout_delay_oracle_; | 283 PlayoutDelayOracle playout_delay_oracle_; |
| 283 | 284 |
| 284 RtpPacketHistory packet_history_; | 285 RtpPacketHistory packet_history_; |
| 285 // TODO(brandtr): Remove |flexfec_packet_history_| when the FlexfecSender | 286 // TODO(brandtr): Remove |flexfec_packet_history_| when the FlexfecSender |
| 286 // is hooked up to the PacedSender. | 287 // is hooked up to the PacedSender. |
| 287 RtpPacketHistory flexfec_packet_history_; | 288 RtpPacketHistory flexfec_packet_history_; |
| 288 | 289 |
| 289 // Statistics | 290 // Statistics |
| 290 rtc::CriticalSection statistics_crit_; | 291 rtc::CriticalSection statistics_crit_; |
| 291 SendDelayMap send_delays_ GUARDED_BY(statistics_crit_); | 292 SendDelayMap send_delays_ RTC_GUARDED_BY(statistics_crit_); |
| 292 FrameCounts frame_counts_ GUARDED_BY(statistics_crit_); | 293 FrameCounts frame_counts_ RTC_GUARDED_BY(statistics_crit_); |
| 293 StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_); | 294 StreamDataCounters rtp_stats_ RTC_GUARDED_BY(statistics_crit_); |
| 294 StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_); | 295 StreamDataCounters rtx_rtp_stats_ RTC_GUARDED_BY(statistics_crit_); |
| 295 StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_); | 296 StreamDataCountersCallback* rtp_stats_callback_ |
| 296 RateStatistics total_bitrate_sent_ GUARDED_BY(statistics_crit_); | 297 RTC_GUARDED_BY(statistics_crit_); |
| 297 RateStatistics nack_bitrate_sent_ GUARDED_BY(statistics_crit_); | 298 RateStatistics total_bitrate_sent_ RTC_GUARDED_BY(statistics_crit_); |
| 299 RateStatistics nack_bitrate_sent_ RTC_GUARDED_BY(statistics_crit_); |
| 298 FrameCountObserver* const frame_count_observer_; | 300 FrameCountObserver* const frame_count_observer_; |
| 299 SendSideDelayObserver* const send_side_delay_observer_; | 301 SendSideDelayObserver* const send_side_delay_observer_; |
| 300 RtcEventLog* const event_log_; | 302 RtcEventLog* const event_log_; |
| 301 SendPacketObserver* const send_packet_observer_; | 303 SendPacketObserver* const send_packet_observer_; |
| 302 BitrateStatisticsObserver* const bitrate_callback_; | 304 BitrateStatisticsObserver* const bitrate_callback_; |
| 303 | 305 |
| 304 // RTP variables | 306 // RTP variables |
| 305 uint32_t timestamp_offset_ GUARDED_BY(send_critsect_); | 307 uint32_t timestamp_offset_ RTC_GUARDED_BY(send_critsect_); |
| 306 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); | 308 uint32_t remote_ssrc_ RTC_GUARDED_BY(send_critsect_); |
| 307 bool sequence_number_forced_ GUARDED_BY(send_critsect_); | 309 bool sequence_number_forced_ RTC_GUARDED_BY(send_critsect_); |
| 308 uint16_t sequence_number_ GUARDED_BY(send_critsect_); | 310 uint16_t sequence_number_ RTC_GUARDED_BY(send_critsect_); |
| 309 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); | 311 uint16_t sequence_number_rtx_ RTC_GUARDED_BY(send_critsect_); |
| 310 // Must be explicitly set by the application, use of rtc::Optional | 312 // Must be explicitly set by the application, use of rtc::Optional |
| 311 // only to keep track of correct use. | 313 // only to keep track of correct use. |
| 312 rtc::Optional<uint32_t> ssrc_ GUARDED_BY(send_critsect_); | 314 rtc::Optional<uint32_t> ssrc_ RTC_GUARDED_BY(send_critsect_); |
| 313 uint32_t last_rtp_timestamp_ GUARDED_BY(send_critsect_); | 315 uint32_t last_rtp_timestamp_ RTC_GUARDED_BY(send_critsect_); |
| 314 int64_t capture_time_ms_ GUARDED_BY(send_critsect_); | 316 int64_t capture_time_ms_ RTC_GUARDED_BY(send_critsect_); |
| 315 int64_t last_timestamp_time_ms_ GUARDED_BY(send_critsect_); | 317 int64_t last_timestamp_time_ms_ RTC_GUARDED_BY(send_critsect_); |
| 316 bool media_has_been_sent_ GUARDED_BY(send_critsect_); | 318 bool media_has_been_sent_ RTC_GUARDED_BY(send_critsect_); |
| 317 bool last_packet_marker_bit_ GUARDED_BY(send_critsect_); | 319 bool last_packet_marker_bit_ RTC_GUARDED_BY(send_critsect_); |
| 318 std::vector<uint32_t> csrcs_ GUARDED_BY(send_critsect_); | 320 std::vector<uint32_t> csrcs_ RTC_GUARDED_BY(send_critsect_); |
| 319 int rtx_ GUARDED_BY(send_critsect_); | 321 int rtx_ RTC_GUARDED_BY(send_critsect_); |
| 320 rtc::Optional<uint32_t> ssrc_rtx_ GUARDED_BY(send_critsect_); | 322 rtc::Optional<uint32_t> ssrc_rtx_ RTC_GUARDED_BY(send_critsect_); |
| 321 // Mapping rtx_payload_type_map_[associated] = rtx. | 323 // Mapping rtx_payload_type_map_[associated] = rtx. |
| 322 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); | 324 std::map<int8_t, int8_t> rtx_payload_type_map_ RTC_GUARDED_BY(send_critsect_); |
| 323 size_t rtp_overhead_bytes_per_packet_ GUARDED_BY(send_critsect_); | 325 size_t rtp_overhead_bytes_per_packet_ RTC_GUARDED_BY(send_critsect_); |
| 324 | 326 |
| 325 RateLimiter* const retransmission_rate_limiter_; | 327 RateLimiter* const retransmission_rate_limiter_; |
| 326 OverheadObserver* overhead_observer_; | 328 OverheadObserver* overhead_observer_; |
| 327 | 329 |
| 328 const bool send_side_bwe_with_overhead_; | 330 const bool send_side_bwe_with_overhead_; |
| 329 | 331 |
| 330 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); | 332 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); |
| 331 }; | 333 }; |
| 332 | 334 |
| 333 } // namespace webrtc | 335 } // namespace webrtc |
| 334 | 336 |
| 335 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ | 337 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ |
| OLD | NEW |