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

Issue 2169013002: Change class VideoCaptureDevice::Name to struct VideoCaptureDeviceDescriptor (Closed)

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

Description

Change class VideoCaptureDevice::Name to struct VideoCaptureDeviceDescriptor. The purpose of this change is to simplify the VideoCaptureDeviceFactory interface in preparation for making it a Mojo interface in a future step. In particular, we want to remove the platform-dependency of the interface. No new functionality added. This is a refactoring. This CL is a step towards the larger goal of Mojofication of Video Capture. For the bigger picture, please refer to the design document at [1]. * Changed VideoCaptureDevice::Name to a struct VideoCaptureDeviceDescriptor with a platform-independent interface. Moved out of video_capture_device.h/cc into new files video_capture_device_descriptor.h/cc. * Instead of a method VideoCaptureDevice::Name::GetModel(), have |model_id| be a public field in struct VideoCaptureDeviceDescriptor. Moved the logic for determining the |model_id| into the platform-specific factory implementations. As a side-effect, this change eliminates the need for code that was added in issue 532272 [2]. * Rename VideoCaptureDeviceFactory::Create() to VideoCaptureDeviceFactory::CreateDevice() * Moved struct VideoCaptureDeviceInfo closer to its usage. Moved from media/capture/video to content/browser/media. [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing [2] http://crbug.com/532272 BUG=584797 TEST=Existing tests still pass (trybots). Verified that issue 532272 does not regress by trying the repro steps in the crbug entry. Successfully conducted an apprtc loopback session on Linux. Committed: https://crrev.com/1c38eb46ec548d21536fbbda949cc598fdc263e9 Cr-Commit-Position: refs/heads/master@{#409199}

Patch Set 1 : Refactoring of VideoCaptureDeviceFactory interface #

Total comments: 28

Patch Set 2 : Addressed emircan's comments #

Total comments: 40

Patch Set 3 : Addressed mcasas' comments #

Total comments: 5

Patch Set 4 : Addressed emircan's comments. #

Total comments: 16

Patch Set 5 : Addressed mcasas' comments #

Patch Set 6 : Fix build errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+878 lines, -930 lines) Patch
M content/browser/media/media_internals.h View 1 2 3 4 3 chunks +6 lines, -2 lines 0 comments Download
M content/browser/media/media_internals.cc View 1 2 3 4 1 chunk +12 lines, -8 lines 0 comments Download
M content/browser/media/media_internals_unittest.cc View 1 2 3 4 5 2 chunks +38 lines, -40 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 7 chunks +14 lines, -17 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.h View 1 2 3 4 7 chunks +13 lines, -12 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 4 11 chunks +69 lines, -36 lines 0 comments Download
M media/capture/BUILD.gn View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/capture/capture.gyp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M media/capture/video/android/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/android/java/src/org/chromium/media/VideoCaptureAndroid.java View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M media/capture/video/android/java/src/org/chromium/media/VideoCaptureTango.java View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.h View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.cc View 2 chunks +6 lines, -11 lines 0 comments Download
M media/capture/video/android/video_capture_device_factory_android.h View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M media/capture/video/android/video_capture_device_factory_android.cc View 1 2 3 4 chunks +26 lines, -22 lines 0 comments Download
M media/capture/video/fake_video_capture_device_factory.h View 1 2 1 chunk +6 lines, -5 lines 0 comments Download
M media/capture/video/fake_video_capture_device_factory.cc View 1 2 3 4 2 chunks +15 lines, -20 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 2 3 5 chunks +24 lines, -21 lines 0 comments Download
M media/capture/video/file_video_capture_device_factory.h View 1 2 3 1 chunk +9 lines, -5 lines 0 comments Download
M media/capture/video/file_video_capture_device_factory.cc View 1 2 3 4 1 chunk +17 lines, -18 lines 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate.h View 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M media/capture/video/linux/video_capture_device_chromeos.h View 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/linux/video_capture_device_chromeos.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M media/capture/video/linux/video_capture_device_factory_linux.h View 1 2 1 chunk +8 lines, -5 lines 0 comments Download
M media/capture/video/linux/video_capture_device_factory_linux.cc View 1 2 5 chunks +67 lines, -17 lines 0 comments Download
M media/capture/video/linux/video_capture_device_linux.h View 2 chunks +3 lines, -2 lines 0 comments Download
M media/capture/video/linux/video_capture_device_linux.cc View 4 chunks +5 lines, -49 lines 0 comments Download
M media/capture/video/mac/video_capture_device_avfoundation_mac.h View 1 chunk +2 lines, -2 lines 0 comments Download
M media/capture/video/mac/video_capture_device_avfoundation_mac.mm View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M media/capture/video/mac/video_capture_device_decklink_mac.h View 1 chunk +6 lines, -4 lines 0 comments Download
M media/capture/video/mac/video_capture_device_decklink_mac.mm View 1 2 3 10 chunks +24 lines, -21 lines 0 comments Download
M media/capture/video/mac/video_capture_device_factory_mac.h View 1 2 1 chunk +6 lines, -10 lines 0 comments Download
M media/capture/video/mac/video_capture_device_factory_mac.mm View 1 2 3 3 chunks +46 lines, -51 lines 0 comments Download
M media/capture/video/mac/video_capture_device_factory_mac_unittest.mm View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M media/capture/video/mac/video_capture_device_mac.h View 1 2 4 chunks +8 lines, -3 lines 0 comments Download
M media/capture/video/mac/video_capture_device_mac.mm View 1 2 3 6 chunks +43 lines, -36 lines 0 comments Download
M media/capture/video/video_capture_device.h View 2 chunks +1 line, -133 lines 0 comments Download
M media/capture/video/video_capture_device.cc View 1 chunk +0 lines, -122 lines 0 comments Download
A media/capture/video/video_capture_device_descriptor.h View 1 2 3 4 1 chunk +91 lines, -0 lines 0 comments Download
A media/capture/video/video_capture_device_descriptor.cc View 1 2 3 4 1 chunk +77 lines, -0 lines 0 comments Download
M media/capture/video/video_capture_device_factory.h View 1 2 2 chunks +21 lines, -13 lines 0 comments Download
M media/capture/video/video_capture_device_factory.cc View 1 2 1 chunk +8 lines, -9 lines 0 comments Download
M media/capture/video/video_capture_device_info.h View 1 2 1 chunk +0 lines, -29 lines 0 comments Download
M media/capture/video/video_capture_device_info.cc View 1 2 1 chunk +0 lines, -24 lines 0 comments Download
M media/capture/video/video_capture_device_unittest.cc View 1 2 3 4 13 chunks +67 lines, -61 lines 0 comments Download
M media/capture/video/win/video_capture_device_factory_win.h View 1 2 3 1 chunk +6 lines, -5 lines 0 comments Download
M media/capture/video/win/video_capture_device_factory_win.cc View 1 2 3 4 10 chunks +76 lines, -39 lines 0 comments Download
M media/capture/video/win/video_capture_device_mf_win.h View 2 chunks +3 lines, -2 lines 0 comments Download
M media/capture/video/win/video_capture_device_mf_win.cc View 2 chunks +3 lines, -28 lines 0 comments Download
M media/capture/video/win/video_capture_device_win.h View 2 chunks +3 lines, -2 lines 0 comments Download
M media/capture/video/win/video_capture_device_win.cc View 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 116 (98 generated)
chfremer
emircan@ and mcasas@, I am already adding you as reviewers to this not-yet-complete CL to ...
4 years, 5 months ago (2016-07-21 18:09:50 UTC) #3
chfremer
This is now ready for review. Since lots of files had to be touched I'll ...
4 years, 5 months ago (2016-07-25 18:48:28 UTC) #43
emircan
https://codereview.chromium.org/2169013002/diff/220001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2169013002/diff/220001/content/browser/renderer_host/media/video_capture_manager.cc#newcode930 content/browser/renderer_host/media/video_capture_manager.cc:930: devices.push_back(StreamDeviceInfo(stream_type, it.GetNameAndModel(), Use emplace_back(). https://codereview.chromium.org/2169013002/diff/220001/media/capture/video/linux/v4l2_capture_delegate.h File media/capture/video/linux/v4l2_capture_delegate.h (right): https://codereview.chromium.org/2169013002/diff/220001/media/capture/video/linux/v4l2_capture_delegate.h#newcode29 ...
4 years, 5 months ago (2016-07-25 22:56:40 UTC) #49
chfremer
https://codereview.chromium.org/2169013002/diff/220001/media/capture/video/mac/video_capture_device_mac.h File media/capture/video/mac/video_capture_device_mac.h (right): https://codereview.chromium.org/2169013002/diff/220001/media/capture/video/mac/video_capture_device_mac.h#newcode58 media/capture/video/mac/video_capture_device_mac.h:58: const VideoCaptureDeviceDescriptor& device_descriptor); On 2016/07/25 22:56:40, emircan wrote: > ...
4 years, 4 months ago (2016-07-26 16:56:35 UTC) #50
mcasas
Looking good, just a few comments/questions. https://codereview.chromium.org/2169013002/diff/240001/content/browser/media/media_internals_unittest.cc File content/browser/media/media_internals_unittest.cc (right): https://codereview.chromium.org/2169013002/diff/240001/content/browser/media/media_internals_unittest.cc#newcode117 content/browser/media/media_internals_unittest.cc:117: // https://crbug.com/630694 What's ...
4 years, 4 months ago (2016-07-26 23:52:04 UTC) #51
chfremer
PTAL https://codereview.chromium.org/2169013002/diff/240001/content/browser/media/media_internals_unittest.cc File content/browser/media/media_internals_unittest.cc (right): https://codereview.chromium.org/2169013002/diff/240001/content/browser/media/media_internals_unittest.cc#newcode117 content/browser/media/media_internals_unittest.cc:117: // https://crbug.com/630694 The TODO is to remove the ...
4 years, 4 months ago (2016-07-27 23:10:18 UTC) #56
mcasas
https://codereview.chromium.org/2169013002/diff/240001/content/browser/media/media_internals_unittest.cc File content/browser/media/media_internals_unittest.cc (right): https://codereview.chromium.org/2169013002/diff/240001/content/browser/media/media_internals_unittest.cc#newcode117 content/browser/media/media_internals_unittest.cc:117: // https://crbug.com/630694 On 2016/07/27 23:10:17, chfremer wrote: > The ...
4 years, 4 months ago (2016-07-28 00:05:42 UTC) #57
emircan
lgtm % nits below. Also, please address the bot issues. https://codereview.chromium.org/2169013002/diff/220001/media/capture/video/video_capture_device_descriptor.h File media/capture/video/video_capture_device_descriptor.h (right): https://codereview.chromium.org/2169013002/diff/220001/media/capture/video/video_capture_device_descriptor.h#newcode62 ...
4 years, 4 months ago (2016-07-28 21:23:02 UTC) #62
chfremer
@mcasas: PTAL Addressed comments by mcasas and emircan * Move |model_id| from VideoCaptureDeviceInfo to VideoCaptureDeviceDescriptor. ...
4 years, 4 months ago (2016-07-29 18:09:51 UTC) #88
mcasas
LGTM % comments below (most prominently, try hard to nuke VideoCaptureDeviceInfo). Also, recommend changing the ...
4 years, 4 months ago (2016-07-30 00:06:12 UTC) #91
chfremer
Added patch set to address mcasas' comments. @rockot Could you please have a quick look ...
4 years, 4 months ago (2016-08-01 18:53:12 UTC) #96
chfremer
avi@chromium.org: Please review changes in content/browser/* dalecurtis@chromium.org: Please review changes in media/capture/BUILD.gn media/capture/capture.gyp
4 years, 4 months ago (2016-08-01 19:07:56 UTC) #100
Ken Rockot(use gerrit already)
On 2016/08/01 at 18:53:12, chfremer wrote: > Added patch set to address mcasas' comments. > ...
4 years, 4 months ago (2016-08-01 19:10:06 UTC) #102
Avi (use Gerrit)
content/browser lgtm
4 years, 4 months ago (2016-08-01 19:11:52 UTC) #103
chfremer
On 2016/08/01 19:10:06, Ken Rockot wrote: > On 2016/08/01 at 18:53:12, chfremer wrote: > > ...
4 years, 4 months ago (2016-08-01 21:00:40 UTC) #104
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2169013002/440001
4 years, 4 months ago (2016-08-02 15:49:47 UTC) #112
commit-bot: I haz the power
Committed patchset #6 (id:440001)
4 years, 4 months ago (2016-08-02 15:54:51 UTC) #114
commit-bot: I haz the power
4 years, 4 months ago (2016-08-02 15:57:54 UTC) #116
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/1c38eb46ec548d21536fbbda949cc598fdc263e9
Cr-Commit-Position: refs/heads/master@{#409199}

Powered by Google App Engine
This is Rietveld 408576698