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

Unified Diff: talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java

Issue 1372813002: Android VideoCapturer: Send ByteBuffer instead of byte[] (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 | talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
index 0fe827d1f9c658151dd05cb10edf0106e218700d..73ed381ad9ce65a2060eb5f3be8dea6ba88be098 100644
--- a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
+++ b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
@@ -35,6 +35,7 @@ import android.util.Size;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
import org.webrtc.VideoRenderer.I420Frame;
+import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -104,11 +105,11 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
}
@Override
- public void OnFrameCaptured(byte[] frame, int length, int width, int height,
+ public void OnFrameCaptured(ByteBuffer frame, int width, int height,
int rotation, long timeStamp) {
synchronized (frameLock) {
++framesCaptured;
- frameSize = length;
+ frameSize = frame.capacity();
hbos 2015/09/28 12:35:51 Should limit() be used instead of capacity()? Or m
magjed_webrtc 2015/09/28 14:42:42 I know for sure that capacity() is exactly like pr
timestamps.add(timeStamp);
frameLock.notify();
}
« no previous file with comments | « no previous file | talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698