Index: webrtc/modules/rtp_rtcp/source/rtp_sender.h |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.h b/webrtc/modules/rtp_rtcp/source/rtp_sender.h |
index a672a06398a5772b9ef64914914a5946e8410536..b65e811133dd4603bf3187d93b3fd9daa7989756 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.h |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.h |
@@ -16,6 +16,7 @@ |
#include <utility> |
#include <vector> |
+#include "webrtc/base/criticalsection.h" |
#include "webrtc/base/random.h" |
#include "webrtc/base/thread_annotations.h" |
#include "webrtc/common_types.h" |
@@ -31,7 +32,6 @@ |
namespace webrtc { |
class BitrateAggregator; |
-class CriticalSectionWrapper; |
class RTPSenderAudio; |
class RTPSenderVideo; |
class RtcEventLog; |
@@ -98,7 +98,8 @@ class RTPSender : public RTPSenderInterface { |
BitrateStatisticsObserver* bitrate_callback, |
FrameCountObserver* frame_count_observer, |
SendSideDelayObserver* send_side_delay_observer, |
- RtcEventLog* event_log); |
+ RtcEventLog* event_log, |
+ SSRCDatabase* ssrc_database); |
virtual ~RTPSender(); |
void ProcessBitrate(); |
@@ -196,7 +197,7 @@ class RTPSender : public RTPSenderInterface { |
const RTPHeader& rtp_header, |
size_t extension_length_bytes, |
size_t* extension_offset) const |
- EXCLUSIVE_LOCKS_REQUIRED(send_critsect_.get()); |
+ EXCLUSIVE_LOCKS_REQUIRED(send_critsect_); |
bool UpdateAudioLevel(uint8_t* rtp_packet, |
size_t rtp_packet_length, |
@@ -386,22 +387,24 @@ class RTPSender : public RTPSenderInterface { |
bool is_retransmit); |
bool IsFecPacket(const uint8_t* buffer, const RTPHeader& header) const; |
- Clock* clock_; |
- int64_t clock_delta_ms_; |
+ Clock* const clock_; |
+ const int64_t clock_delta_ms_; |
Random random_ GUARDED_BY(send_critsect_); |
- rtc::scoped_ptr<BitrateAggregator> bitrates_; |
+ // TODO(tommi): BitrateAggregator doesn't need to be allocated this way. |
+ // it could be a regular member variable. |
stefan-webrtc
2016/01/23 17:38:40
I guess the same is true for RTPSenderAudio/Video
tommi
2016/01/24 11:51:49
Moved the BitrateAggregator class declaration.
Fo
stefan-webrtc
2016/01/25 10:09:32
Ah, ok. Let's leave it as is for now then.
|
+ const rtc::scoped_ptr<BitrateAggregator> bitrates_; |
Bitrate total_bitrate_sent_; |
const bool audio_configured_; |
- rtc::scoped_ptr<RTPSenderAudio> audio_; |
- rtc::scoped_ptr<RTPSenderVideo> video_; |
+ const rtc::scoped_ptr<RTPSenderAudio> audio_; |
+ const rtc::scoped_ptr<RTPSenderVideo> video_; |
RtpPacketSender* const paced_sender_; |
TransportSequenceNumberAllocator* const transport_sequence_number_allocator_; |
TransportFeedbackObserver* const transport_feedback_observer_; |
int64_t last_capture_time_ms_sent_; |
- rtc::scoped_ptr<CriticalSectionWrapper> send_critsect_; |
+ rtc::CriticalSection send_critsect_; |
Transport *transport_; |
bool sending_media_ GUARDED_BY(send_critsect_); |
@@ -440,7 +443,7 @@ class RTPSender : public RTPSenderInterface { |
// RTP variables |
bool start_timestamp_forced_ GUARDED_BY(send_critsect_); |
uint32_t start_timestamp_ GUARDED_BY(send_critsect_); |
- SSRCDatabase& ssrc_db_ GUARDED_BY(send_critsect_); |
+ SSRCDatabase* const ssrc_db_; |
uint32_t remote_ssrc_ GUARDED_BY(send_critsect_); |
bool sequence_number_forced_ GUARDED_BY(send_critsect_); |
uint16_t sequence_number_ GUARDED_BY(send_critsect_); |