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

Issue 2013433003: WIP: Android Camera2 capture implementation (Closed)

Created:
4 years, 7 months ago by magjed_webrtc
Modified:
4 years, 5 months ago
Reviewers:
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

WIP: Android Camera2 capture implementation The Java interface is here: webrtc/api/java/src/org/webrtc/VideoCapturer.java The Camera(1) implementation is here: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java The Camera2 implementation is the new file: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid2.java The camera implementations should probably be renamed to Camera1Capturer and Camera2Capturer to not be confused with the interface. The file webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java should only contain generic enumeration stuff for both camera1 and camera2, but now most parts are hardcoded to camera1. There is an Enumerator interface in that file that currently looks like this: public interface Enumerator { /** * Returns a list of supported CaptureFormats for the camera with index |cameraId|. */ List<CaptureFormat> getSupportedFormats(int cameraId); } that Camera1Enumerator and Camera2Enumerator implements. It needs to be changed to something like: public interface Enumerator { /** * Returns device names that can be used to create a new VideoCapturer. */ List<String> getDeviceNames(); boolean isFrontFacing(String cameraid); /** * Returns a list of supported CaptureFormats for |cameraId|. */ List<CaptureFormat> getSupportedFormats(String cameraId); } Also, we need to add tests for camera2. We probably need to refactor the tests first so they can be used for both implementations. Hopefully we only need to support capturing to Surface/texture for camera2, i.e. not byte-buffer capture. This CL should also be split up into many smaller ones.

Patch Set 1 : Refactor enumeration for re-use with camera2 #

Patch Set 2 : Camera2 #

Patch Set 3 : Fix CaptureFormat jni parsing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+944 lines, -208 lines) Patch
M webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java View 2 chunks +8 lines, -9 lines 0 comments Download
M webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java View 9 chunks +15 lines, -15 lines 0 comments Download
A + webrtc/api/java/android/org/webrtc/Camera1Enumerator.java View 3 chunks +25 lines, -3 lines 0 comments Download
M webrtc/api/java/android/org/webrtc/Camera2Enumerator.java View 3 chunks +36 lines, -18 lines 0 comments Download
M webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java View 5 chunks +104 lines, -35 lines 0 comments Download
D webrtc/api/java/android/org/webrtc/CameraEnumerator.java View 1 chunk +0 lines, -84 lines 0 comments Download
M webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java View 1 6 chunks +23 lines, -24 lines 0 comments Download
A webrtc/api/java/android/org/webrtc/VideoCapturerAndroid2.java View 1 1 chunk +686 lines, -0 lines 0 comments Download
M webrtc/api/java/jni/androidvideocapturer_jni.cc View 1 2 1 chunk +19 lines, -6 lines 0 comments Download
M webrtc/api/java/jni/classreferenceholder.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M webrtc/api/java/src/org/webrtc/VideoCapturer.java View 1 3 chunks +4 lines, -2 lines 0 comments Download
M webrtc/base/java/src/org/webrtc/ThreadUtils.java View 1 1 chunk +9 lines, -0 lines 0 comments Download
M webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java View 4 chunks +6 lines, -6 lines 0 comments Download
M webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java View 1 7 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (5 generated)
magjed_webrtc
Sami - Please take a look. This is work in progress.
4 years, 7 months ago (2016-05-25 11:22:04 UTC) #3
magjed_webrtc
4 years, 7 months ago (2016-05-25 11:54:07 UTC) #6
I wrote some comments about what needs to be done in the CL description.

Powered by Google App Engine
This is Rietveld 408576698