Avoid potential dead lock in StreamStatisticianImpl

Extract callbacks for rtp/rtcp data, from StreamStatisticianImpl to
ReceiveStatisticsImpl, into separate methods with guards agains having
incorrect lock order.

BUG=2856
R=andresp@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/7649004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5441 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
sprang@webrtc.org
2014-01-27 16:22:08 +00:00
parent 2a260d9fab
commit a45cac0fb7
2 changed files with 40 additions and 8 deletions

View File

@ -53,6 +53,11 @@ class StreamStatisticianImpl : public StreamStatistician {
void UpdateJitter(const RTPHeader& header,
uint32_t receive_time_secs,
uint32_t receive_time_frac);
void UpdateCounters(const RTPHeader& rtp_header,
size_t bytes,
bool retransmitted);
void NotifyRtpCallback() LOCKS_EXCLUDED(stream_lock_.get());
void NotifyRtcpCallback() LOCKS_EXCLUDED(stream_lock_.get());
Clock* clock_;
scoped_ptr<CriticalSectionWrapper> stream_lock_;