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

Unified Diff: webrtc/api/java/src/org/webrtc/VideoCapturer.java

Issue 1783793002: VideoCapturer: Update interface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing perkj@s comments Created 4 years, 9 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 | « webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/src/org/webrtc/VideoCapturer.java
diff --git a/webrtc/api/java/src/org/webrtc/VideoCapturer.java b/webrtc/api/java/src/org/webrtc/VideoCapturer.java
index 8db8b2118006350dc98d855bbe6ac5808f084c77..5a515d2261f675d55bc815fa034ab63a34e279a4 100644
--- a/webrtc/api/java/src/org/webrtc/VideoCapturer.java
+++ b/webrtc/api/java/src/org/webrtc/VideoCapturer.java
@@ -83,16 +83,29 @@ public interface VideoCapturer {
int width, int height, int framerate);
}
- List<CameraEnumerationAndroid.CaptureFormat> getSupportedFormats();
- SurfaceTextureHelper getSurfaceTextureHelper();
+ /**
+ * Returns a list with all the formats this VideoCapturer supports.
+ */
+ List<CameraEnumerationAndroid.CaptureFormat> getSupportedFormats();
+ /**
+ * Start capturing frames in a format that is as close as possible to |width| x |height| and
+ * |framerate|. If the VideoCapturer wants to deliver texture frames, it should do this by
+ * rendering on the SurfaceTexture in |surfaceTextureHelper|, register itself as a listener,
+ * and forward the texture frames to CapturerObserver.onTextureFrameCaptured().
+ */
void startCapture(
- final int width, final int height, final int framerate,
- final Context applicationContext, final CapturerObserver frameObserver);
+ int width, int height, int framerate, SurfaceTextureHelper surfaceTextureHelper,
+ Context applicationContext, CapturerObserver frameObserver);
- // Blocks until capture is stopped.
+ /**
+ * Stop capturing. This function should block until capture is actually stopped.
+ */
void stopCapture() throws InterruptedException;
+ /**
+ * Perform any final cleanup here. No more capturing will be done after this call.
+ */
void dispose();
}
« no previous file with comments | « webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698