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

Unified Diff: webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h

Issue 2997803002: Reduce locking when collecting receive statistics. (Closed)
Patch Set: Undo RtcpReportBlocks() optimization Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h
diff --git a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h
index 1256562d7d12c4d8148881afa28220104486bf69..6948dd6f6bfeb7be7f62c19cddab27be4bebc0da 100644
--- a/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h
@@ -25,7 +25,8 @@ namespace webrtc {
class StreamStatisticianImpl : public StreamStatistician {
public:
- StreamStatisticianImpl(Clock* clock,
+ StreamStatisticianImpl(uint32_t ssrc,
+ Clock* clock,
RtcpStatisticsCallback* rtcp_callback,
StreamDataCountersCallback* rtp_callback);
virtual ~StreamStatisticianImpl() {}
@@ -49,18 +50,20 @@ class StreamStatisticianImpl : public StreamStatistician {
private:
bool InOrderPacketInternal(uint16_t sequence_number) const;
- RtcpStatistics CalculateRtcpStatistics();
+ RtcpStatistics CalculateRtcpStatistics()
+ EXCLUSIVE_LOCKS_REQUIRED(stream_lock_);
void UpdateJitter(const RTPHeader& header, NtpTime receive_time);
- void UpdateCounters(const RTPHeader& rtp_header,
- size_t packet_length,
- bool retransmitted);
- void NotifyRtpCallback() LOCKS_EXCLUDED(stream_lock_);
- void NotifyRtcpCallback() LOCKS_EXCLUDED(stream_lock_);
-
+ StreamDataCounters UpdateCounters(const RTPHeader& rtp_header,
+ size_t packet_length,
+ bool retransmitted);
+ void NotifyRtpCallback(const StreamDataCounters&)
+ LOCKS_EXCLUDED(stream_lock_);
+ void NotifyRtcpCallback(const RtcpStatistics&) LOCKS_EXCLUDED(stream_lock_);
sprang_webrtc 2017/08/14 09:43:06 Nit: These don't seem to be very useful anymore, c
danilchap 2017/08/14 10:45:32 Checked documentation for LOCKS_EXCLUDED - it does
sprang_webrtc 2017/08/14 11:25:38 Ah, shoot. Just assumed there was.
+
+ const uint32_t ssrc_;
Clock* const clock_;
rtc::CriticalSection stream_lock_;
RateStatistics incoming_bitrate_;
- uint32_t ssrc_;
int max_reordering_threshold_; // In number of packets or sequence numbers.
// Stats on received RTP packets.
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698