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

Unified Diff: webrtc/sdk/android/src/java/org/webrtc/AndroidVideoTrackSourceObserver.java

Issue 2982213002: Add support for capturers to capture VideoFrames. (Closed)
Patch Set: Minor changes Created 3 years, 4 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/sdk/android/src/java/org/webrtc/AndroidVideoTrackSourceObserver.java
diff --git a/webrtc/sdk/android/src/java/org/webrtc/AndroidVideoTrackSourceObserver.java b/webrtc/sdk/android/src/java/org/webrtc/AndroidVideoTrackSourceObserver.java
index 323bd5be2ad43fcb82d947db0c4e3e0a2dc460e3..123204791f607b45b3e21d3438641b1f9358862c 100644
--- a/webrtc/sdk/android/src/java/org/webrtc/AndroidVideoTrackSourceObserver.java
+++ b/webrtc/sdk/android/src/java/org/webrtc/AndroidVideoTrackSourceObserver.java
@@ -43,10 +43,18 @@ class AndroidVideoTrackSourceObserver implements VideoCapturer.CapturerObserver
nativeSource, width, height, oesTextureId, transformMatrix, rotation, timestamp);
}
+ @Override
+ public void onFrameCaptured(VideoFrame frame) {
+ nativeOnFrameCaptured(nativeSource, frame.getBuffer().getWidth(), frame.getBuffer().getHeight(),
+ frame.getRotation(), frame.getTimestampNs(), frame.getBuffer());
+ }
+
private native void nativeCapturerStarted(long nativeSource, boolean success);
private native void nativeCapturerStopped(long nativeSource);
private native void nativeOnByteBufferFrameCaptured(long nativeSource, byte[] data, int length,
int width, int height, int rotation, long timeStamp);
private native void nativeOnTextureFrameCaptured(long nativeSource, int width, int height,
int oesTextureId, float[] transformMatrix, int rotation, long timestamp);
+ private native void nativeOnFrameCaptured(long nativeSource, int width, int height, int rotation,
+ long timestampNs, VideoFrame.Buffer frame);
}

Powered by Google App Engine
This is Rietveld 408576698