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

Unified Diff: media/video/capture/win/video_capture_device_mf_win.h

Issue 276383002: VideoCaptureDeviceWin: Extract class-static method into a Factory (both MF/DS) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased factory win. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/video/capture/win/video_capture_device_mf_win.h
diff --git a/media/video/capture/win/video_capture_device_mf_win.h b/media/video/capture/win/video_capture_device_mf_win.h
index a1bda9f288c589f738582daedf02ccb00b59f00c..476a455a2ac73ec69ca60536ddc334f4640a2166 100644
--- a/media/video/capture/win/video_capture_device_mf_win.h
+++ b/media/video/capture/win/video_capture_device_mf_win.h
@@ -30,12 +30,13 @@ class MEDIA_EXPORT VideoCaptureDeviceMFWin
: public base::NonThreadSafe,
public VideoCaptureDevice {
public:
+ static bool FormatFromGuid(const GUID& guid, VideoPixelFormat* format);
+
explicit VideoCaptureDeviceMFWin(const Name& device_name);
virtual ~VideoCaptureDeviceMFWin();
// Opens the device driver for this device.
- // This function is used by the static VideoCaptureDevice::Create function.
- bool Init();
+ bool Init(const base::win::ScopedComPtr<IMFMediaSource>& source);
// VideoCaptureDevice implementation.
virtual void AllocateAndStart(const VideoCaptureParams& params,
@@ -43,18 +44,6 @@ class MEDIA_EXPORT VideoCaptureDeviceMFWin
OVERRIDE;
virtual void StopAndDeAllocate() OVERRIDE;
- // Returns true iff the current platform supports the Media Foundation API
- // and that the DLLs are available. On Vista this API is an optional download
- // but the API is advertised as a part of Windows 7 and onwards. However,
- // we've seen that the required DLLs are not available in some Win7
- // distributions such as Windows 7 N and Windows 7 KN.
- static bool PlatformSupported();
-
- static void GetDeviceNames(Names* device_names);
-
- static void GetDeviceSupportedFormats(const Name& device,
- VideoCaptureFormats* formats);
-
// Captured new video data.
void OnIncomingCapturedData(const uint8* data,
int length,
« no previous file with comments | « media/video/capture/win/video_capture_device_factory_win.cc ('k') | media/video/capture/win/video_capture_device_mf_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698