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

Issue 2066773002: Android: Add Size class. (Closed)

Created:
4 years, 6 months ago by sakal
Modified:
4 years, 6 months ago
Reviewers:
perkj_webrtc
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

Android: Add Size class. The Camera1 and Camera2 API use different size types. Camera1 uses android.hardware.Camera.Size while Camera2 uses android.util.Size. android.util.Size is only available from Lollipop forward so this CL adds a similar Size class in CaptureFormat. The purpose of this CL is to have a common size type that can be reused from both Camera1 and Camera2 helper functions such as CameraEnumerationAndroid.getClosestSupportedSize(). BUG=webrtc:5519 Committed: https://crrev.com/e6c9e88c18e56d2f3084f551911cbf40a427f7f5 Cr-Commit-Position: refs/heads/master@{#13181}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Changes according to perkj's comments #

Patch Set 3 : Fix bug. #

Total comments: 1

Patch Set 4 : Remove Size usage from CaptureFormat for performance and move it to base/java/src/org/webrtc/ #

Patch Set 5 : Better hashing function #

Patch Set 6 : Remove getArea function since it is no longer used. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -27 lines) Patch
M webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java View 1 2 3 4 4 chunks +17 lines, -9 lines 0 comments Download
M webrtc/api/java/android/org/webrtc/CameraEnumerator.java View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java View 1 2 3 4 chunks +13 lines, -18 lines 0 comments Download
A webrtc/base/java/src/org/webrtc/Size.java View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 23 (11 generated)
sakal
On 2016/06/14 12:45:59, sakal wrote: > mailto:sakal@webrtc.org changed reviewers: > + mailto:perkj@webrtc.org Per, please take ...
4 years, 6 months ago (2016-06-14 12:46:13 UTC) #3
perkj_webrtc
Does this affect current products? Is anyone using CaptureFormat directly? https://codereview.webrtc.org/2066773002/diff/1/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java File webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java (right): https://codereview.webrtc.org/2066773002/diff/1/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java#newcode58 ...
4 years, 6 months ago (2016-06-14 13:01:19 UTC) #4
sakal
https://codereview.webrtc.org/2066773002/diff/1/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java File webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java (right): https://codereview.webrtc.org/2066773002/diff/1/webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java#newcode58 webrtc/examples/androidapp/src/org/appspot/apprtc/CaptureQualityController.java:58: return first.size.width * first.size.height - second.size.width * second.size.height; On ...
4 years, 6 months ago (2016-06-14 13:12:51 UTC) #5
sakal
Per, like discussed offline, I changed the code to only use Size class in the ...
4 years, 6 months ago (2016-06-15 13:32:04 UTC) #7
perkj_webrtc
lgtm https://codereview.webrtc.org/2066773002/diff/40001/webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java File webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java (right): https://codereview.webrtc.org/2066773002/diff/40001/webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java#newcode114 webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java:114: public int frameSize() { oh, sorry, we should ...
4 years, 6 months ago (2016-06-16 12:16:31 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066773002/140001
4 years, 6 months ago (2016-06-16 12:40:58 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_arm64_rel/builds/8775)
4 years, 6 months ago (2016-06-16 13:13:35 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066773002/140001
4 years, 6 months ago (2016-06-16 13:36:27 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_arm64_rel/builds/8781)
4 years, 6 months ago (2016-06-16 14:00:36 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066773002/140001
4 years, 6 months ago (2016-06-17 07:01:41 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 6 months ago (2016-06-17 08:02:07 UTC) #21
commit-bot: I haz the power
4 years, 6 months ago (2016-06-17 08:02:20 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/e6c9e88c18e56d2f3084f551911cbf40a427f7f5
Cr-Commit-Position: refs/heads/master@{#13181}

Powered by Google App Engine
This is Rietveld 408576698