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

Unified Diff: webrtc/media/engine/fakewebrtcvideoengine.h

Issue 2710493008: Recreate WebrtcVideoSendStream if screen content setting is changed. (Closed)
Patch Set: readability Created 3 years, 10 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/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/fakewebrtcvideoengine.h
diff --git a/webrtc/media/engine/fakewebrtcvideoengine.h b/webrtc/media/engine/fakewebrtcvideoengine.h
index 497d70133ad20881081063be7ab5f6f192d18197..2dce2c503fcf67e284ef0d3d84027a6dc7ffd74a 100644
--- a/webrtc/media/engine/fakewebrtcvideoengine.h
+++ b/webrtc/media/engine/fakewebrtcvideoengine.h
@@ -196,10 +196,13 @@ class FakeWebRtcVideoEncoderFactory : public WebRtcVideoEncoderFactory {
}
bool WaitForCreatedVideoEncoders(int num_encoders) {
- while (created_video_encoder_event_.Wait(kEventTimeoutMs)) {
+ int64_t start_offset_ms = rtc::TimeMillis();
+ int64_t wait_time = kEventTimeoutMs;
+ do {
if (GetNumCreatedEncoders() >= num_encoders)
return true;
- }
+ wait_time = kEventTimeoutMs - (rtc::TimeMillis() - start_offset_ms);
+ } while (wait_time > 0 && created_video_encoder_event_.Wait(wait_time));
return false;
}
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698