Stop AndroidVideoCapturer asynchronously.
The purpose is to avoid a deadlock between the C++ thread calling Stop and the Java thread that provides video frames.
BUG=4318
R=glaznev@webrtc.org, magjed@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/35249004
Cr-Commit-Position: refs/heads/master@{#8425}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8425 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/androidvideocapturer.h b/talk/app/webrtc/androidvideocapturer.h
index ef72cd6..ed31cd2 100644
--- a/talk/app/webrtc/androidvideocapturer.h
+++ b/talk/app/webrtc/androidvideocapturer.h
@@ -44,9 +44,9 @@
virtual void Start(int width, int height, int framerate,
AndroidVideoCapturer* capturer) = 0;
- // Stops capturing. The implementation must synchronously stop the capturer.
+ // Stops capturing.
// The delegate may not call into AndroidVideoCapturer after this call.
- virtual bool Stop() = 0;
+ virtual void Stop() = 0;
// Must returns a JSON string "{{width=xxx, height=xxx, framerate = xxx}}"
virtual std::string GetSupportedFormats() = 0;
@@ -74,13 +74,6 @@
AndroidVideoCapturerDelegate* delegate() { return delegate_.get(); }
private:
- void OnCapturerStarted_w(bool success);
-
- void OnIncomingFrame_w(signed char* frame_data,
- int length,
- int rotation,
- int64 time_stamp);
-
// cricket::VideoCapturer implementation.
// Video frames will be delivered using
// cricket::VideoCapturer::SignalFrameCaptured on the thread that calls Start.