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

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: Delete VideoBroadcaster thread checker 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
Index: webrtc/api/androidvideocapturer.cc
diff --git a/webrtc/api/androidvideocapturer.cc b/webrtc/api/androidvideocapturer.cc
index 71a94fedb060b584c02c85469889558128856ac3..407daeef729e0a24f57a9222d7f237a290870c91 100644
--- a/webrtc/api/androidvideocapturer.cc
+++ b/webrtc/api/androidvideocapturer.cc
@@ -180,7 +180,9 @@ void AndroidVideoCapturer::OnIncomingFrame(
const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
int rotation,
int64_t time_stamp) {
- RTC_CHECK(thread_checker_.CalledOnValidThread());
+ // NOTE: Calls to this method may come on any thread, but they are
magjed_webrtc 2016/05/18 15:12:50 They come from the Java thread. It's the same thre
nisse-webrtc 2016/05/18 15:31:31 Should be ok, then. Would it make sense with a thr
+ // syncronized by the caller, using
+ // 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') | webrtc/api/java/jni/androidvideocapturer_jni.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698