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

Issue 12604003: Android: cleans up hand-written JNI for video_capture_device_android.cc (Closed)

Created:
7 years, 9 months ago by bulach
Modified:
7 years, 9 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Android: cleans up hand-written JNI for video_capture_device_android.cc It's dangerous to rely on hand-written, run-time binding for JNI. By wrapping the usage in a thin class, we get build-time type-safety. It also clarifies the boundaries, and make the code on each side clearer. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187295

Patch Set 1 : Patch #

Total comments: 2

Patch Set 2 : Nits #

Total comments: 1

Patch Set 3 : Rebase #

Total comments: 4

Patch Set 4 : Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -50 lines) Patch
M media/base/android/java/src/org/chromium/media/VideoCapture.java View 1 2 3 2 chunks +40 lines, -1 line 0 comments Download
M media/media.gyp View 1 2 1 chunk +0 lines, -13 lines 0 comments Download
M media/video/capture/android/video_capture_device_android.cc View 3 chunks +11 lines, -36 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
bulach
ptal.. main motivation here is to rely the auto-generated infrastructure for more type-safety and clarify ...
7 years, 9 months ago (2013-03-07 12:29:01 UTC) #1
Andrew Hayden (chromium.org)
https://codereview.chromium.org/12604003/diff/2001/media/base/android/java/src/org/chromium/media/VideoCapture.java File media/base/android/java/src/org/chromium/media/VideoCapture.java (right): https://codereview.chromium.org/12604003/diff/2001/media/base/android/java/src/org/chromium/media/VideoCapture.java#newcode334 media/base/android/java/src/org/chromium/media/VideoCapture.java:334: return "camera " + mId + " facing " ...
7 years, 9 months ago (2013-03-07 15:48:49 UTC) #2
Yaron
lgtm https://codereview.chromium.org/12604003/diff/2001/media/base/android/java/src/org/chromium/media/VideoCapture.java File media/base/android/java/src/org/chromium/media/VideoCapture.java (right): https://codereview.chromium.org/12604003/diff/2001/media/base/android/java/src/org/chromium/media/VideoCapture.java#newcode308 media/base/android/java/src/org/chromium/media/VideoCapture.java:308: private final int mId; Nit: Indent all of ...
7 years, 9 months ago (2013-03-07 16:53:52 UTC) #3
bulach
thanks! all comments addressed.
7 years, 9 months ago (2013-03-07 17:03:54 UTC) #4
wjia(left Chromium)
lgtm with one question and one suggestion. Thanks for doing this! It would be great ...
7 years, 9 months ago (2013-03-07 17:26:41 UTC) #5
bulach
thanks both! wjia: the problem is that the inner system class doesn't expose methods, only ...
7 years, 9 months ago (2013-03-08 09:58:16 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12604003/5002
7 years, 9 months ago (2013-03-08 09:58:47 UTC) #7
commit-bot: I haz the power
Failed to apply patch for media/media.gyp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 9 months ago (2013-03-08 09:58:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12604003/17001
7 years, 9 months ago (2013-03-08 14:25:59 UTC) #9
commit-bot: I haz the power
Presubmit check for 12604003-17001 failed and returned exit status 1. INFO:root:Found 3 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-08 14:26:03 UTC) #10
bulach
+dalecurtis for media/ OWNER
7 years, 9 months ago (2013-03-08 15:05:00 UTC) #11
DaleCurtis
mostly rubberstamp lgtm % nits. https://codereview.chromium.org/12604003/diff/17001/media/base/android/java/src/org/chromium/media/VideoCapture.java File media/base/android/java/src/org/chromium/media/VideoCapture.java (right): https://codereview.chromium.org/12604003/diff/17001/media/base/android/java/src/org/chromium/media/VideoCapture.java#newcode138 media/base/android/java/src/org/chromium/media/VideoCapture.java:138: Log.e(TAG, "allocate: can not ...
7 years, 9 months ago (2013-03-08 20:32:47 UTC) #12
bulach
thanks Dale! nits addressed but please note that .java files follow this style-guide: http://dev.chromium.org/developers/coding-style/java which ...
7 years, 9 months ago (2013-03-11 09:55:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12604003/25001
7 years, 9 months ago (2013-03-11 09:56:14 UTC) #14
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=120616
7 years, 9 months ago (2013-03-11 12:07:45 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12604003/25001
7 years, 9 months ago (2013-03-11 12:10:20 UTC) #16
commit-bot: I haz the power
7 years, 9 months ago (2013-03-11 14:40:55 UTC) #17
Message was sent while issue was closed.
Change committed as 187295

Powered by Google App Engine
This is Rietveld 408576698