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

Unified Diff: webrtc/api/androidvideocapturer.cc

Issue 1987663002: android: Don't do a thread jump for incoming frames. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Clarified comment. Created 4 years, 7 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/api/java/jni/androidvideocapturer_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidvideocapturer.cc
diff --git a/webrtc/api/androidvideocapturer.cc b/webrtc/api/androidvideocapturer.cc
index 71a94fedb060b584c02c85469889558128856ac3..ae81a8dafa7f0da946cdce99cbefdd6f184f5bcd 100644
--- a/webrtc/api/androidvideocapturer.cc
+++ b/webrtc/api/androidvideocapturer.cc
@@ -180,7 +180,10 @@ void AndroidVideoCapturer::OnIncomingFrame(
const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
int rotation,
int64_t time_stamp) {
- RTC_CHECK(thread_checker_.CalledOnValidThread());
+ // NOTE: The frame_factory hack isn't thread safe. It works because
pbos-webrtc 2016/05/20 13:22:47 Should there be a TODO here?
nisse-webrtc 2016/05/20 13:32:26 I have a different cl which deletes that frame fac
+ // all calls to this method are from the same Java thread. In
+ // addition, calls are currently syncronized on the caller's
+ // AndroidVideoCapturerJni:capturer_lock_.
frame_factory_->UpdateCapturedFrame(buffer, rotation, time_stamp);
SignalFrameCaptured(this, frame_factory_->GetCapturedFrame());
frame_factory_->ClearCapturedFrame();
« no previous file with comments | « no previous file | webrtc/api/java/jni/androidvideocapturer_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698