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

Issue 276383002: VideoCaptureDeviceWin: Extract class-static method into a Factory (both MF/DS) (Closed)

Created:
6 years, 7 months ago by mcasas
Modified:
6 years, 7 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, feature-media-reviews_chromium.org, wjia+watch_chromium.org, mcasas+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

VideoCaptureDeviceWin: Extract class-static method into a Factory (both MF/DS) This CL extends the separation Factory/device initiated in the other CLs part of the bug. Aside from code cleanup, it allows for better testing (via dependency injection) of the factory parts (this is specially important for blacklisted devices, of which there are none in Win ATM). It can also be used to modify the GetDeviceNames() method to an asynchronous API. Both VideoCaptureDeviceWin and VideoCaptureDeviceMFwin (using DirectShow and MediaFoundation APIs resp.), have a number of static methods Create(), GetDeviceNames() and GetDeviceSupportedFormats(). Plus, there are overarching versions of those at the VideoCaptureDevice level, that do library initialisation and appropriate forwarding to one or the other implementation. This CL extracts all of those class-static methods and moves them to a single VideoCaptureDeviceFactoryWin. ScopedMediaType, previously file-level data type moves to the public def of VideoCaptureDeviceWin since is used in the Factory. Every file-static function and variable that could, has been moved to the Factory file. Previous file-level static functions that are used in the Factory and the VCD have been changed to VCD static methods and used in both ends. TBR= dalecurtis@chromium.org (media/media.gyp) BUG=323913 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271800

Patch Set 1 : #

Total comments: 16

Patch Set 2 : tommi@s comments. #

Total comments: 2

Patch Set 3 : tommi@s second round of comments #

Patch Set 4 : Rebase #

Patch Set 5 : Rebased factory win. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+579 lines, -501 lines) Patch
M media/media.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M media/video/capture/video_capture_device_factory.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M media/video/capture/video_capture_device_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
A + media/video/capture/win/video_capture_device_factory_win.h View 1 2 3 4 2 chunks +14 lines, -9 lines 0 comments Download
A media/video/capture/win/video_capture_device_factory_win.cc View 1 2 3 4 1 chunk +437 lines, -0 lines 0 comments Download
M media/video/capture/win/video_capture_device_mf_win.h View 1 2 chunks +3 lines, -14 lines 0 comments Download
M media/video/capture/win/video_capture_device_mf_win.cc View 1 8 chunks +29 lines, -184 lines 0 comments Download
M media/video/capture/win/video_capture_device_win.h View 1 2 chunks +29 lines, -5 lines 0 comments Download
M media/video/capture/win/video_capture_device_win.cc View 1 2 3 4 6 chunks +58 lines, -287 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
mcasas
tommi@ PTAL. Although methods in VCDFWin come from either VCDWin or VCDMFWin, they only show ...
6 years, 7 months ago (2014-05-15 12:03:55 UTC) #1
tommi (sloooow) - chröme
On 2014/05/15 12:03:55, mcasas wrote: > tommi@ PTAL. > > Although methods in VCDFWin come ...
6 years, 7 months ago (2014-05-15 13:56:47 UTC) #2
tommi (sloooow) - chröme
https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_factory_win.cc File media/video/capture/win/video_capture_device_factory_win.cc (right): https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_factory_win.cc#newcode45 media/video/capture/win/video_capture_device_factory_win.cc:45: // initializing MF. See the comments where LoadMediaFoundationDlls is ...
6 years, 7 months ago (2014-05-15 15:18:33 UTC) #3
mcasas
tommi@ PTAL. https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_factory_win.cc File media/video/capture/win/video_capture_device_factory_win.cc (right): https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_factory_win.cc#newcode45 media/video/capture/win/video_capture_device_factory_win.cc:45: // initializing MF. On 2014/05/15 15:18:33, tommi ...
6 years, 7 months ago (2014-05-15 16:03:23 UTC) #4
tommi (sloooow) - chröme
https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_win.cc File media/video/capture/win/video_capture_device_win.cc (right): https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_win.cc#newcode198 media/video/capture/win/video_capture_device_win.cc:198: NOTIMPLEMENTED(); On 2014/05/15 16:03:23, mcasas wrote: > On 2014/05/15 ...
6 years, 7 months ago (2014-05-19 10:51:36 UTC) #5
mcasas
PTAL. https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_win.cc File media/video/capture/win/video_capture_device_win.cc (right): https://codereview.chromium.org/276383002/diff/60001/media/video/capture/win/video_capture_device_win.cc#newcode198 media/video/capture/win/video_capture_device_win.cc:198: NOTIMPLEMENTED(); On 2014/05/19 10:51:37, tommi wrote: > On ...
6 years, 7 months ago (2014-05-19 12:59:49 UTC) #6
tommi (sloooow) - chröme
lgtm
6 years, 7 months ago (2014-05-20 12:23:25 UTC) #7
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 7 months ago (2014-05-20 12:35:32 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/276383002/100001
6 years, 7 months ago (2014-05-20 12:36:11 UTC) #9
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-20 13:08:07 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-20 13:12:52 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_chromium_gn_compile_rel/builds/5744) ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/builds/153503) ios_rel_device ...
6 years, 7 months ago (2014-05-20 13:12:53 UTC) #12
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 7 months ago (2014-05-20 14:23:51 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/276383002/120001
6 years, 7 months ago (2014-05-20 14:24:26 UTC) #14
mcasas
The CQ bit was unchecked by mcasas@chromium.org
6 years, 7 months ago (2014-05-20 14:42:16 UTC) #15
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 7 months ago (2014-05-20 18:04:11 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/276383002/220001
6 years, 7 months ago (2014-05-20 18:04:56 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-20 20:59:17 UTC) #18
commit-bot: I haz the power
6 years, 7 months ago (2014-05-21 01:49:23 UTC) #19
Message was sent while issue was closed.
Change committed as 271800

Powered by Google App Engine
This is Rietveld 408576698