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

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

Issue 2492843002: Reduce taking locks in RTPSenderVideo::SendVideo (Closed)
Patch Set: . Created 4 years, 1 month 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
Index: webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
index 248610441353296df430dddd842a573bca0a5db4..f8c5b7fe670791d72058840dba4fe0fbd60d50bc 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
@@ -42,7 +42,10 @@ class RTPSenderVideo {
virtual RtpVideoCodecTypes VideoCodecType() const;
- size_t FecPacketOverhead() const;
+ size_t FecPacketOverhead() const {
+ rtc::CritScope cs(&crit_);
+ return CalculateFecPacketOverhead();
+ }
static RtpUtility::Payload* CreateVideoPayload(
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
@@ -74,6 +77,8 @@ class RTPSenderVideo {
void SetSelectiveRetransmissions(uint8_t settings);
private:
+ size_t CalculateFecPacketOverhead() const EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet,
StorageType storage);
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698