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

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: Created 5 years, 5 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') | webrtc/voice_engine/channel.cc » ('J')
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..ad2471654e905bc469de06b544a8126fd8a72205 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -274,7 +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 least_required_delay_ms() const {
+ CriticalSectionScoped cs(&video_sync_critsect_);
the sun 2015/08/04 09:36:47 It looks like this function could call audio_codin
hlundin-webrtc 2015/08/04 09:52:10 That should work.
Taylor Brandstetter 2015/08/05 03:04:48 Done.
+ return least_required_delay_ms_;
+ }
int SetInitialPlayoutDelay(int delay_ms);
int SetMinimumPlayoutDelay(int delayMs);
int GetPlayoutTimestamp(unsigned int& timestamp);
@@ -478,6 +481,7 @@ private:
CriticalSectionWrapper& _fileCritSect;
CriticalSectionWrapper& _callbackCritSect;
CriticalSectionWrapper& volume_settings_critsect_;
+ CriticalSectionWrapper& video_sync_critsect_;
hlundin-webrtc 2015/08/04 06:56:46 Please, add GUARDED_BY(video_sync_critsect_) on th
Taylor Brandstetter 2015/08/05 03:04:48 Done.
uint32_t _instanceId;
int32_t _channelId;
« no previous file with comments | « no previous file | webrtc/voice_engine/channel.cc » ('j') | webrtc/voice_engine/channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698