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

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

Issue 2984633002: Add a field trial to produce VideoFrames in camera capturers. (Closed)
Patch Set: Update log message. Created 3 years, 5 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/CameraCapturer.java
diff --git a/webrtc/sdk/android/src/java/org/webrtc/CameraCapturer.java b/webrtc/sdk/android/src/java/org/webrtc/CameraCapturer.java
index 859b7f745331841016ff78ba52b34a27b1d4af09..800363abda20c246422efef0ade9bba9f2fa107e 100644
--- a/webrtc/sdk/android/src/java/org/webrtc/CameraCapturer.java
+++ b/webrtc/sdk/android/src/java/org/webrtc/CameraCapturer.java
@@ -177,31 +177,11 @@ abstract class CameraCapturer implements CameraVideoCapturer {
}
@Override
- public void onByteBufferFrameCaptured(
- CameraSession session, byte[] data, int width, int height, int rotation, long timestamp) {
- checkIsOnCameraThread();
- synchronized (stateLock) {
- if (session != currentSession) {
- Logging.w(TAG, "onByteBufferFrameCaptured from another session.");
- return;
- }
- if (!firstFrameObserved) {
- eventsHandler.onFirstFrameAvailable();
- firstFrameObserved = true;
- }
- cameraStatistics.addFrame();
- capturerObserver.onByteBufferFrameCaptured(data, width, height, rotation, timestamp);
- }
- }
-
- @Override
- public void onTextureFrameCaptured(CameraSession session, int width, int height,
- int oesTextureId, float[] transformMatrix, int rotation, long timestamp) {
+ public void onFrameCaptured(CameraSession session, VideoFrame frame) {
checkIsOnCameraThread();
synchronized (stateLock) {
if (session != currentSession) {
Logging.w(TAG, "onTextureFrameCaptured from another session.");
- surfaceHelper.returnTextureFrame();
return;
}
if (!firstFrameObserved) {
@@ -209,8 +189,7 @@ abstract class CameraCapturer implements CameraVideoCapturer {
firstFrameObserved = true;
}
cameraStatistics.addFrame();
- capturerObserver.onTextureFrameCaptured(
- width, height, oesTextureId, transformMatrix, rotation, timestamp);
+ capturerObserver.onFrameCaptured(frame);
}
}
};

Powered by Google App Engine
This is Rietveld 408576698