Index: webrtc/video/payload_router.h |
diff --git a/webrtc/video/payload_router.h b/webrtc/video/payload_router.h |
index ad570fabed4913341309adbac45dba3ee607fa47..8b4b6bdb6d8b330831f2eb80c61a6bb79448a667 100644 |
--- a/webrtc/video/payload_router.h |
+++ b/webrtc/video/payload_router.h |
@@ -36,7 +36,9 @@ class PayloadRouter { |
static size_t DefaultMaxPayloadLength(); |
// Rtp modules are assumed to be sorted in simulcast index order. |
- void SetSendingRtpModules(const std::vector<RtpRtcp*>& rtp_modules); |
+ void Init(const std::vector<RtpRtcp*>& rtp_modules); |
+ |
+ void SetSendingRtpModules(size_t num_sending_modules); |
// PayloadRouter will only route packets if being active, all packets will be |
// dropped otherwise. |
@@ -62,19 +64,18 @@ class PayloadRouter { |
// and RTP headers. |
size_t MaxPayloadLength() const; |
- void AddRef() { ++ref_count_; } |
- void Release() { if (--ref_count_ == 0) { delete this; } } |
- |
private: |
+ void UpdateModuleSendingState() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
// TODO(mflodman): When the new video API has launched, remove crit_ and |
// assume rtp_modules_ will never change during a call. |
rtc::CriticalSection crit_; |
- // Active sending RTP modules, in layer order. |
- std::vector<RtpRtcp*> rtp_modules_ GUARDED_BY(crit_); |
- bool active_ GUARDED_BY(crit_); |
+ // TODO(pbos): Set once and for all on construction. |
+ std::vector<RtpRtcp*> rtp_modules_; |
- Atomic32 ref_count_; |
+ bool active_ GUARDED_BY(crit_); |
+ // Active sending RTP modules, in layer order. |
stefan-webrtc
2016/02/26 14:49:07
Maybe move this to before the vector?
pbos-webrtc
2016/02/26 14:58:56
Want them to be lumped with the crit_ that protect
|
+ size_t num_sending_modules_ GUARDED_BY(crit_); |
RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter); |
}; |