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

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

Issue 2644303002: Delete class SSRCDatabase, and its global ssrc registry. (Closed)
Patch Set: Delete logic related to ssrc collisions. Created 3 years, 10 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 14 matching lines...) Expand all
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 90
92 void SetSendingMediaStatus(bool enabled); 91 void SetSendingMediaStatus(bool enabled);
93 bool SendingMedia() const; 92 bool SendingMedia() const;
94 93
95 void GetDataCounters(StreamDataCounters* rtp_stats, 94 void GetDataCounters(StreamDataCounters* rtp_stats,
96 StreamDataCounters* rtx_stats) const; 95 StreamDataCounters* rtx_stats) const;
97 96
98 uint32_t TimestampOffset() const; 97 uint32_t TimestampOffset() const;
99 void SetTimestampOffset(uint32_t timestamp); 98 void SetTimestampOffset(uint32_t timestamp);
100 99
101 uint32_t GenerateNewSSRC();
102 void SetSSRC(uint32_t ssrc); 100 void SetSSRC(uint32_t ssrc);
103 101
104 uint16_t SequenceNumber() const; 102 uint16_t SequenceNumber() const;
105 void SetSequenceNumber(uint16_t seq); 103 void SetSequenceNumber(uint16_t seq);
106 104
107 void SetCsrcs(const std::vector<uint32_t>& csrcs); 105 void SetCsrcs(const std::vector<uint32_t>& csrcs);
108 106
109 void SetMaxRtpPacketSize(size_t max_packet_size); 107 void SetMaxRtpPacketSize(size_t max_packet_size);
110 108
111 bool SendOutgoingData(FrameType frame_type, 109 bool SendOutgoingData(FrameType frame_type,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 RateStatistics total_bitrate_sent_ GUARDED_BY(statistics_crit_); 296 RateStatistics total_bitrate_sent_ GUARDED_BY(statistics_crit_);
299 RateStatistics nack_bitrate_sent_ GUARDED_BY(statistics_crit_); 297 RateStatistics nack_bitrate_sent_ GUARDED_BY(statistics_crit_);
300 FrameCountObserver* const frame_count_observer_; 298 FrameCountObserver* const frame_count_observer_;
301 SendSideDelayObserver* const send_side_delay_observer_; 299 SendSideDelayObserver* const send_side_delay_observer_;
302 RtcEventLog* const event_log_; 300 RtcEventLog* const event_log_;
303 SendPacketObserver* const send_packet_observer_; 301 SendPacketObserver* const send_packet_observer_;
304 BitrateStatisticsObserver* const bitrate_callback_; 302 BitrateStatisticsObserver* const bitrate_callback_;
305 303
306 // RTP variables 304 // RTP variables
307 uint32_t timestamp_offset_ GUARDED_BY(send_critsect_); 305 uint32_t timestamp_offset_ GUARDED_BY(send_critsect_);
308 SSRCDatabase* const ssrc_db_;
309 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); 306 uint32_t remote_ssrc_ GUARDED_BY(send_critsect_);
310 bool sequence_number_forced_ GUARDED_BY(send_critsect_); 307 bool sequence_number_forced_ GUARDED_BY(send_critsect_);
311 uint16_t sequence_number_ GUARDED_BY(send_critsect_); 308 uint16_t sequence_number_ GUARDED_BY(send_critsect_);
312 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_); 309 uint16_t sequence_number_rtx_ GUARDED_BY(send_critsect_);
313 bool ssrc_forced_ GUARDED_BY(send_critsect_); 310 // Must be explicitly set by the application, use of rtc:Optional
314 uint32_t ssrc_ GUARDED_BY(send_critsect_); 311 // only to keep track of correct use.
312 rtc::Optional<uint32_t> ssrc_ GUARDED_BY(send_critsect_);
315 uint32_t last_rtp_timestamp_ GUARDED_BY(send_critsect_); 313 uint32_t last_rtp_timestamp_ GUARDED_BY(send_critsect_);
316 int64_t capture_time_ms_ GUARDED_BY(send_critsect_); 314 int64_t capture_time_ms_ GUARDED_BY(send_critsect_);
317 int64_t last_timestamp_time_ms_ GUARDED_BY(send_critsect_); 315 int64_t last_timestamp_time_ms_ GUARDED_BY(send_critsect_);
318 bool media_has_been_sent_ GUARDED_BY(send_critsect_); 316 bool media_has_been_sent_ GUARDED_BY(send_critsect_);
319 bool last_packet_marker_bit_ GUARDED_BY(send_critsect_); 317 bool last_packet_marker_bit_ GUARDED_BY(send_critsect_);
320 std::vector<uint32_t> csrcs_ GUARDED_BY(send_critsect_); 318 std::vector<uint32_t> csrcs_ GUARDED_BY(send_critsect_);
321 int rtx_ GUARDED_BY(send_critsect_); 319 int rtx_ GUARDED_BY(send_critsect_);
322 uint32_t ssrc_rtx_ GUARDED_BY(send_critsect_); 320 rtc::Optional<uint32_t> ssrc_rtx_ GUARDED_BY(send_critsect_);
323 // Mapping rtx_payload_type_map_[associated] = rtx. 321 // Mapping rtx_payload_type_map_[associated] = rtx.
324 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); 322 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_); 323 size_t rtp_overhead_bytes_per_packet_ GUARDED_BY(send_critsect_);
326 324
327 RateLimiter* const retransmission_rate_limiter_; 325 RateLimiter* const retransmission_rate_limiter_;
328 OverheadObserver* overhead_observer_; 326 OverheadObserver* overhead_observer_;
329 327
330 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); 328 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender);
331 }; 329 };
332 330
333 } // namespace webrtc 331 } // namespace webrtc
334 332
335 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 333 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698