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

Issue 265263004: Mac Video Capture Device: split VCD into VCD and Factory. (Closed)

Created:
6 years, 7 months ago by mcasas
Modified:
6 years, 7 months ago
CC:
chromium-reviews, fischman+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
Visibility:
Public.

Description

Mac Video Capture Device: split VCD into VCD and Factory. VideoCaptureDeviceMac includes factory and non-factory parts. This CL splits them into VideoCaptureDeviceMac and VideoCaptureDeviceFactoryMac. The latter inherits the previous class' static methods: Create(), GetDeviceNames() and GetDeviceSupportedFormats(). All video factory code previously in MediaStreamManager is moved into VideoCaptureFactory. This includes the use of the flag |kUseFakeDeviceForMediaStream|. This flag is moved correspondingly into media_switches.cc -- (but note that this flag is still used in MediaStreamManager for the Fake Audio parts). File media_switches.cc is included in several test files where the flag is used. VideoCaptureDeviceTest is splitted as well into: a) Tests that were exercising only the FakeVCD (FakeVideoCaptureDeviceTest). b) All other tests, that use the underlying OS webcam. This VideoCaptureDeviceTest gets a Factory and uses it instead of static methods. A unit test is added to VCDFMac, doing little for the moment but I'm planning to add support for testing at least the blacklisting -- req from rsesek@ in another CL. BUG=288562, 323913, 255552 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269271

Patch Set 1 : #

Patch Set 2 : perkj@ suggestion: Factory method in VCDFactory. #

Total comments: 19

Patch Set 3 : perkj@s comments #

Total comments: 2

Patch Set 4 : Corrected tests that needed include media_switches.h #

Total comments: 4

Patch Set 5 : perkj@s suggestions and nits. #

Total comments: 8

Patch Set 6 : perkj@s comments; removed inclusion+DEPS of media_switches.h in content_switches.h #

Total comments: 4

Patch Set 7 : perkj@s nits #

Patch Set 8 : Including media_switches.h in some more files. #

Patch Set 9 : Included media_switches.h in android test. #

Patch Set 10 : Reconnected VCDFMac::Create() check for device name; VCDTest::OpenInvalidDevice needs Mac API Type. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -880 lines) Patch
M chrome/browser/apps/speech_recognition_browsertest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/apps/web_view_browsertest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/chrome_media_stream_infobar_browsertest.cc View 1 2 3 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/chrome_webrtc_disable_encryption_flag_browsertest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/ppapi/ppapi_test.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/media/webrtc_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/media/webrtc_internals_browsertest.cc View 1 2 3 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host_unittest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 2 chunks +5 lines, -19 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager_unittest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host_unittest.cc View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M content/shell/DEPS View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M content/shell/android/browsertests_apk/content_browser_tests_android.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/test/content_test_launcher.cc View 1 2 3 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/test/webrtc_content_browsertest_base.cc View 1 2 3 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/base/media_switches.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M media/base/media_switches.cc View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 4 chunks +9 lines, -1 line 0 comments Download
A + media/video/capture/fake_video_capture_device_unittest.cc View 1 2 3 4 8 chunks +32 lines, -316 lines 0 comments Download
A + media/video/capture/mac/video_capture_device_factory_mac.h View 1 2 2 chunks +12 lines, -9 lines 0 comments Download
A + media/video/capture/mac/video_capture_device_factory_mac.mm View 1 2 3 4 5 6 7 8 9 5 chunks +48 lines, -309 lines 0 comments Download
A media/video/capture/mac/video_capture_device_factory_mac_unittest.mm View 1 chunk +42 lines, -0 lines 0 comments Download
M media/video/capture/mac/video_capture_device_mac.h View 2 chunks +9 lines, -8 lines 0 comments Download
M media/video/capture/mac/video_capture_device_mac.mm View 1 2 3 4 5 6 4 chunks +19 lines, -95 lines 0 comments Download
M media/video/capture/video_capture_device_factory.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M media/video/capture/video_capture_device_factory.cc View 1 2 3 4 1 chunk +37 lines, -1 line 0 comments Download
M media/video/capture/video_capture_device_unittest.cc View 1 2 3 4 5 6 7 8 9 15 chunks +25 lines, -117 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
mcasas
perkj@ could you plz have a first look and tell if I'm going in the ...
6 years, 7 months ago (2014-05-05 16:45:58 UTC) #1
perkj_chrome
Yes I think this is the correct path. https://codereview.chromium.org/265263004/diff/80001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/265263004/diff/80001/content/browser/renderer_host/media/media_stream_manager.cc#newcode1444 content/browser/renderer_host/media/media_stream_manager.cc:1444: if ...
6 years, 7 months ago (2014-05-06 06:44:46 UTC) #2
mcasas
perkj@ PTAL. Please note the otherwise added comment: ... "the use of the flag |kUseFakeDeviceForMediaStream|. ...
6 years, 7 months ago (2014-05-06 07:26:29 UTC) #3
perkj_chrome
Can you upload a new cl with git cl upload --similarity=20 to make it easier ...
6 years, 7 months ago (2014-05-06 11:32:42 UTC) #4
mcasas
perkj@ PTAL. Taken in your suggestion of including media_switches.h into content_switches.h. https://codereview.chromium.org/265263004/diff/100001/media/video/capture/video_capture_device_factory.cc File media/video/capture/video_capture_device_factory.cc (right): ...
6 years, 7 months ago (2014-05-06 12:47:20 UTC) #5
perkj_chrome
Looks good with the below fixed. Just wondering if its ok to inlcude media_switches in ...
6 years, 7 months ago (2014-05-06 18:25:59 UTC) #6
mcasas
jochen@: content/public/common/DEPS context: moved a flag from content_switches.h into media_switches.h, and to avoid having to ...
6 years, 7 months ago (2014-05-07 06:38:36 UTC) #7
jochen (gone - plz use gerrit)
On 2014/05/07 06:38:36, mcasas wrote: > jochen@: content/public/common/DEPS > > context: moved a flag from ...
6 years, 7 months ago (2014-05-07 06:58:02 UTC) #8
mcasas
perkj@ LGTY? https://codereview.chromium.org/265263004/diff/140001/media/video/capture/mac/video_capture_device_factory_mac.mm File media/video/capture/mac/video_capture_device_factory_mac.mm (right): https://codereview.chromium.org/265263004/diff/140001/media/video/capture/mac/video_capture_device_factory_mac.mm#newcode38 media/video/capture/mac/video_capture_device_factory_mac.mm:38: VideoCaptureDevice::Names device_names; On 2014/05/06 18:26:00, perkj wrote: ...
6 years, 7 months ago (2014-05-07 07:49:11 UTC) #9
perkj_chrome
LGTM with a nit https://codereview.chromium.org/265263004/diff/160001/media/video/capture/mac/video_capture_device_mac.mm File media/video/capture/mac/video_capture_device_mac.mm (right): https://codereview.chromium.org/265263004/diff/160001/media/video/capture/mac/video_capture_device_mac.mm#newcode44 media/video/capture/mac/video_capture_device_mac.mm:44: // TODO(mcasas): Remove the following ...
6 years, 7 months ago (2014-05-07 10:46:48 UTC) #10
perkj_chrome
https://codereview.chromium.org/265263004/diff/160001/content/public/common/DEPS File content/public/common/DEPS (right): https://codereview.chromium.org/265263004/diff/160001/content/public/common/DEPS#newcode4 content/public/common/DEPS:4: ], revert this change
6 years, 7 months ago (2014-05-07 10:47:32 UTC) #11
mcasas
jochen@: 6 files, namely: chrome/browser/{apps,media}/*test.cc content/public/common/content_switches.{h,cc} dalecurtis@: media/base/media_switches.{h,cc} and media/media.gyp Context for both of you ...
6 years, 7 months ago (2014-05-07 12:18:23 UTC) #12
jochen (gone - plz use gerrit)
lgtm
6 years, 7 months ago (2014-05-07 12:45:27 UTC) #13
DaleCurtis
{media.gyp,media_switches} lgtm
6 years, 7 months ago (2014-05-07 17:10:29 UTC) #14
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 7 months ago (2014-05-07 17:36:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/265263004/200001
6 years, 7 months ago (2014-05-07 17:39:53 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 23:41:47 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-08 04:21:05 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-08 05:02:00 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium
6 years, 7 months ago (2014-05-08 05:02:01 UTC) #20
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 7 months ago (2014-05-08 06:38:18 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/265263004/220001
6 years, 7 months ago (2014-05-08 06:40:06 UTC) #22
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 7 months ago (2014-05-08 09:34:19 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/265263004/240001
6 years, 7 months ago (2014-05-08 09:38:08 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-08 22:37:29 UTC) #25
commit-bot: I haz the power
Change committed as 269271
6 years, 7 months ago (2014-05-09 13:53:37 UTC) #26
mcasas
6 years, 7 months ago (2014-05-09 14:28:14 UTC) #27
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/273063002/ by mcasas@chromium.org.

The reason for reverting is: Some backoffice bots broke due to
|kUseFakeDeviceForMediaStream| not being correctly defined - reverting until M36
storm passes and then I'll figure those out..

Powered by Google App Engine
This is Rietveld 408576698