DescriptionVideoCaptureDeviceWin: 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. #Messages
Total messages: 19 (0 generated)
|