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

Issue 1014943005: Android CaptureAPI Types (Closed)

Created:
5 years, 9 months ago by emircan
Modified:
5 years, 9 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, avayvod+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

I extended the current CaptureAPIType exposure on chrome://media-internals page to work on ANDROID with the enum types defined below. enum CaptureApiType { API1, API2_LEGACY, API2_FULL, API2_LIMITED, TANGO, API_TYPE_UNKNOWN }; Enums are sourced from media/video/capture/video_capture_device.h file and auto-generated on the Android Java side by using java_cpp_enum scripts. They correspond to the same int values, and this is how it is communicated to cpp side on media/video/capture/android/video_capture_device_factory_android.cc. +------------+ |VideoCapture| +--+-------+-+ | | +----------------+-+ +-+-----------------+ |VideoCaptureCamera| |VideoCaptureCamera2| +---+------------+-+ +-------------------+ | | +-------------+-----+ ----+-------------+ |VideoCaptureAndroid| |VideoCaptureTango| +-------------------+ +-----------------+ On Java side, camera class structure is as above. CaptureApiType is defined by static getCaptureApiType() methods in each child. Note that media/video/capture/android/imageformat_list.h is deleted as it is currently not used. Instead, enums defined on media/video/capture/android/video_capture_device_factory_android.h were autogenerated on Java side using java_cpp_enum scripts. BUG=458743 TEST=Built with gyp and deployed: - on Nexus 7, shows API2_LEGACY - on Nexus 5, shows API2_LIMITED for front camera and API2_FULL for back camera I added Android tests to MediaInternalsVideoCaptureDeviceTest.* and tested on Nexus 7. Looked for the adding unittests on video_capture_device_unittest but ANDROID tests are currently disabled with a TODO specified[0]. I will investigate further, but let me know if you have suggestions. [0] https://code.google.com/p/chromium/codesearch#chromium/src/media/video/capture/video_capture_device_unittest.cc&l=42 Committed: https://crrev.com/86e26b25645c2661089e72df2e2625745dc6e758 Cr-Commit-Position: refs/heads/master@{#322066}

Patch Set 1 : #

Patch Set 2 : Added MediaInternalsVideoCaptureDeviceTest.* #

Total comments: 14

Patch Set 3 : mcasas@ comments and FakeVCD fix. #

Patch Set 4 : Fixed naming. #

Patch Set 5 : Rebased. #

Patch Set 6 : Removed android_webview changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -30 lines) Patch
M content/browser/media/media_internals.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/media/media_internals_unittest.cc View 1 2 3 4 4 chunks +13 lines, -1 line 0 comments Download
M media/base/android/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/VideoCaptureCamera2.java View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/VideoCaptureTango.java View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M media/video/capture/android/imageformat_list.h View 1 chunk +0 lines, -18 lines 0 comments Download
M media/video/capture/android/video_capture_device_factory_android.cc View 1 chunk +6 lines, -1 line 0 comments Download
M media/video/capture/fake_video_capture_device_factory.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M media/video/capture/video_capture_device.h View 1 2 3 4 4 chunks +24 lines, -7 lines 0 comments Download
M media/video/capture/video_capture_device.cc View 1 2 3 4 2 chunks +26 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
emircan
5 years, 9 months ago (2015-03-18 21:22:05 UTC) #5
emircan
PTAL.
5 years, 9 months ago (2015-03-18 22:37:20 UTC) #6
mcasas
Almost there: A few things. https://codereview.chromium.org/1014943005/diff/80001/android_webview/libwebviewchromium.gypi File android_webview/libwebviewchromium.gypi (right): https://codereview.chromium.org/1014943005/diff/80001/android_webview/libwebviewchromium.gypi#newcode33 android_webview/libwebviewchromium.gypi:33: '../media/media.gyp:media_android_capturapitype', Why not "_java" ...
5 years, 9 months ago (2015-03-19 01:55:14 UTC) #7
emircan
I added a fix for FakeVCD tests. Please take a look. https://codereview.chromium.org/1014943005/diff/80001/android_webview/libwebviewchromium.gypi File android_webview/libwebviewchromium.gypi (right): ...
5 years, 9 months ago (2015-03-19 19:52:23 UTC) #8
mcasas
I think we can improve the wording, i.e. API2_LEGACY --> API_V2_LEGACY and "Camera API2" --> ...
5 years, 9 months ago (2015-03-20 17:46:42 UTC) #9
emircan
On 2015/03/20 17:46:42, mcasas wrote: > I think we can improve the wording, i.e. > ...
5 years, 9 months ago (2015-03-20 21:12:04 UTC) #10
emircan
I still need OWNERS review. dalecurtis@ please take a look.
5 years, 9 months ago (2015-03-20 21:12:49 UTC) #12
DaleCurtis
+qinmin for android review.
5 years, 9 months ago (2015-03-21 01:18:35 UTC) #14
qinmin
On 2015/03/21 01:18:35, DaleCurtis wrote: > +qinmin for android review. android change LGTM
5 years, 9 months ago (2015-03-23 20:37:13 UTC) #15
emircan
I still need OWNERS review for android_webview/* and content/* files. boliu@ and dalecurtis@ please take ...
5 years, 9 months ago (2015-03-23 20:51:46 UTC) #17
boliu
On 2015/03/23 20:51:46, emircan wrote: > I still need OWNERS review for android_webview/* and content/* ...
5 years, 9 months ago (2015-03-23 21:24:35 UTC) #18
DaleCurtis
rs lgtm
5 years, 9 months ago (2015-03-23 23:05:19 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1014943005/150001
5 years, 9 months ago (2015-03-24 19:39:05 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:150001)
5 years, 9 months ago (2015-03-24 20:30:01 UTC) #23
commit-bot: I haz the power
5 years, 9 months ago (2015-03-24 20:31:09 UTC) #24
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/86e26b25645c2661089e72df2e2625745dc6e758
Cr-Commit-Position: refs/heads/master@{#322066}

Powered by Google App Engine
This is Rietveld 408576698