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

Issue 1321903002: CameraEnumerationAndroid: Make getSupportedFormats() an interface (Closed)

Created:
5 years, 3 months ago by magjed_webrtc
Modified:
5 years, 3 months ago
Reviewers:
tommi
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, qiang.lu, niklas.enbom, yujie_mao (webrtc), Andrew MacDonald
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

CameraEnumerationAndroid: Make getSupportedFormats() an interface Enumerating camera capabilities in the deprecated android.hardware.Camera interface is really slow because of the need to open and release the camera. By making getSupportedFormats() an interface, we allow apps the opportunity to inject their own implementation, such as storing the supported formats offline in the device's internal storage. It will also be possible to add an implementation of getSupportedFormats() using the new android.hardware.Camera2 interface in a follow-up CL. R=tommi@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/c252dabbd6bc98b0f725d221e58431128d4eed07

Patch Set 1 #

Patch Set 2 : add Override and fix init() comment #

Patch Set 3 : Enumera all cameras on first call #

Patch Set 4 : nit: Fix comment #

Total comments: 2

Patch Set 5 : Release camera in finally clause #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -80 lines) Patch
M talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java View 2 chunks +2 lines, -4 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/CameraEnumerationAndroid.java View 3 chunks +18 lines, -69 lines 0 comments Download
A talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java View 1 2 3 4 1 chunk +102 lines, -0 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java View 1 2 chunks +4 lines, -7 lines 0 comments Download
M talk/app/webrtc/java/jni/classreferenceholder.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M talk/libjingle.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
magjed_webrtc
Please take a look.
5 years, 3 months ago (2015-08-31 07:49:44 UTC) #2
tommi
lgtm
5 years, 3 months ago (2015-08-31 07:55:06 UTC) #3
magjed_webrtc
Please take another look. I reverted back to the old behaviour of enumerating all cameras. ...
5 years, 3 months ago (2015-08-31 10:18:16 UTC) #4
tommi
lgtm with .release() moved. https://codereview.webrtc.org/1321903002/diff/60001/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java File talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java (right): https://codereview.webrtc.org/1321903002/diff/60001/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java#newcode68 talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java:68: camera.release(); move to finally (as ...
5 years, 3 months ago (2015-08-31 10:25:06 UTC) #5
magjed_webrtc
https://codereview.webrtc.org/1321903002/diff/60001/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java File talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java (right): https://codereview.webrtc.org/1321903002/diff/60001/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java#newcode68 talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java:68: camera.release(); On 2015/08/31 10:25:06, tommi (webrtc) wrote: > move ...
5 years, 3 months ago (2015-08-31 11:18:35 UTC) #6
magjed_webrtc
5 years, 3 months ago (2015-08-31 11:19:26 UTC) #7
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
c252dabbd6bc98b0f725d221e58431128d4eed07 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698