From 12773eaa8c9920d6aebf2c10d7876da1c85eb5e7 Mon Sep 17 00:00:00 2001 From: "tommi@webrtc.org" Date: Fri, 16 Nov 2012 09:03:12 +0000 Subject: [PATCH] Minor cleanup of the videocapture code. No "real" code change :) Remove declaration of a function that doesn't exist. Remove call to GetProductId from video_capture_factory_windows that's not necessary. This was the only dependency on device_info_windows.h outside of video_capture_windows.cc. TEST=There's no code change, so no manual testing is required. BUG=none Review URL: https://webrtc-codereview.appspot.com/936025 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3114 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../modules/video_capture/windows/device_info_windows.cc | 2 +- .../windows/video_capture_factory_windows.cc | 9 --------- .../video_capture/windows/video_capture_windows.h | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/webrtc/modules/video_capture/windows/device_info_windows.cc b/webrtc/modules/video_capture/windows/device_info_windows.cc index 5f3171ec8c..a149a2e361 100644 --- a/webrtc/modules/video_capture/windows/device_info_windows.cc +++ b/webrtc/modules/video_capture/windows/device_info_windows.cc @@ -712,7 +712,7 @@ void DeviceInfoWindows::GetProductId(const char* devicePath, "Failed to get the product Id"); return; } - // Find the second occurence + // Find the second occurrence. pos = strchr(pos + 1, '&'); WebRtc_UWord32 bytesToCopy = (WebRtc_UWord32)(pos - startPos); if (pos && (bytesToCopy <= productUniqueIdUTF8Length) && bytesToCopy diff --git a/webrtc/modules/video_capture/windows/video_capture_factory_windows.cc b/webrtc/modules/video_capture/windows/video_capture_factory_windows.cc index 13820d6d7a..41805c262e 100644 --- a/webrtc/modules/video_capture/windows/video_capture_factory_windows.cc +++ b/webrtc/modules/video_capture/windows/video_capture_factory_windows.cc @@ -10,7 +10,6 @@ #include "ref_count.h" #include "video_capture_windows.h" -#include "trace.h" namespace webrtc { @@ -20,17 +19,9 @@ VideoCaptureModule* VideoCaptureImpl::Create( const WebRtc_Word32 id, const char* deviceUniqueIdUTF8) { - if (deviceUniqueIdUTF8 == NULL) - { return NULL; - } - char productId[kVideoCaptureProductIdLength]; - videocapturemodule::DeviceInfoWindows::GetProductId(deviceUniqueIdUTF8, - productId, - sizeof(productId)); - RefCountImpl* newCaptureModule = new RefCountImpl(id); diff --git a/webrtc/modules/video_capture/windows/video_capture_windows.h b/webrtc/modules/video_capture/windows/video_capture_windows.h index a888a9faf8..6b83505303 100644 --- a/webrtc/modules/video_capture/windows/video_capture_windows.h +++ b/webrtc/modules/video_capture/windows/video_capture_windows.h @@ -29,10 +29,6 @@ class CaptureSinkFilter; class VideoCaptureDS: public VideoCaptureImpl { public: - - static VideoCaptureModule* Create(const WebRtc_Word32 id, - const WebRtc_UWord8* deviceUniqueIdUTF8); - VideoCaptureDS(const WebRtc_Word32 id); virtual WebRtc_Word32 Init(const WebRtc_Word32 id,