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 Review URL: https://codereview.chromium.org/276383002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271800 0039d316-1c4b-4281-b951-d872f2087c98
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment