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

Unified Diff: webrtc/voice_engine/channel.h

Issue 1263223002: Adding locking to webrtc::voe::Channel to fix race conditions (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Moved LeastRequiredDelayMs definition to cc file Created 5 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/voice_engine/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.h
diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h
index 398087eefb481a0cd96624b6b086c3d9c0acbe58..d32863c3f4d365afddcdcba7100236433d79eb29 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -274,11 +274,10 @@ public:
// VoEVideoSync
bool GetDelayEstimate(int* jitter_buffer_delay_ms,
int* playout_buffer_delay_ms) const;
- int least_required_delay_ms() const { return least_required_delay_ms_; }
+ int LeastRequiredDelayMs() const;
int SetInitialPlayoutDelay(int delay_ms);
int SetMinimumPlayoutDelay(int delayMs);
int GetPlayoutTimestamp(unsigned int& timestamp);
- void UpdatePlayoutTimestamp(bool rtcp);
int SetInitTimestamp(unsigned int timestamp);
int SetInitSequenceNumber(short sequenceNumber);
@@ -464,6 +463,7 @@ private:
int32_t MixOrReplaceAudioWithFile(int mixingFrequency);
int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency);
int32_t SendPacketRaw(const void *data, size_t len, bool RTCP);
+ void UpdatePlayoutTimestamp(bool rtcp);
void UpdatePacketDelay(uint32_t timestamp,
uint16_t sequenceNumber);
void RegisterReceiveCodecsToRTPModule();
@@ -516,9 +516,9 @@ private:
// Timestamp of the audio pulled from NetEq.
uint32_t jitter_buffer_playout_timestamp_;
- uint32_t playout_timestamp_rtp_;
+ uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_);
uint32_t playout_timestamp_rtcp_;
- uint32_t playout_delay_ms_;
+ uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_);
uint32_t _numberOfDiscardedPackets;
uint16_t send_sequence_number_;
uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes];
@@ -564,10 +564,10 @@ private:
// VoENetwork
AudioFrame::SpeechType _outputSpeechType;
// VoEVideoSync
- uint32_t _average_jitter_buffer_delay_us;
- int least_required_delay_ms_;
+ rtc::scoped_ptr<CriticalSectionWrapper> video_sync_lock_;
+ uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_);
uint32_t _previousTimestamp;
- uint16_t _recPacketDelayMs;
+ uint16_t _recPacketDelayMs GUARDED_BY(video_sync_lock_);
// VoEAudioProcessing
bool _RxVadDetection;
bool _rxAgcIsEnabled;
« no previous file with comments | « no previous file | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698