| Index: media/video/capture/win/video_capture_device_factory_win.cc
|
| diff --git a/media/video/capture/win/video_capture_device_factory_win.cc b/media/video/capture/win/video_capture_device_factory_win.cc
|
| index ad2922bd94ea48cdd1d2cbc7be1734daa755a48f..c46daba474c062d0d78d57367a5d58bf7a98497c 100644
|
| --- a/media/video/capture/win/video_capture_device_factory_win.cc
|
| +++ b/media/video/capture/win/video_capture_device_factory_win.cc
|
| @@ -122,10 +122,6 @@ static void GetDeviceNamesDirectShow(Names* device_names) {
|
| if (hr != S_OK)
|
| continue;
|
|
|
| - // Name of a fake DirectShow filter that exist on computers with
|
| - // GTalk installed.
|
| - static const char kGoogleCameraAdapter[] = "google camera adapter";
|
| -
|
| // Enumerate all video capture devices.
|
| ScopedComPtr<IMoniker> moniker;
|
| int index = 0;
|
| @@ -149,16 +145,17 @@ static void GetDeviceNamesDirectShow(Names* device_names) {
|
| // Google Camera Adapter is not a real DirectShow camera device.
|
| // VFW are very old Video for Windows drivers that can not be used.
|
| const wchar_t* str_ptr = V_BSTR(&name);
|
| - const int name_length = arraysize(kGoogleCameraAdapter) - 1;
|
| -
|
| - if ((wcsstr(str_ptr, L"(VFW)") == NULL) &&
|
| - lstrlenW(str_ptr) < name_length ||
|
| - (!(LowerCaseEqualsASCII(str_ptr, str_ptr + name_length,
|
| - kGoogleCameraAdapter)))) {
|
| - std::string id;
|
| - std::string device_name(base::SysWideToUTF8(str_ptr));
|
| + // Name of a fake DirectShow filter that exist on computers with
|
| + // GTalk installed.
|
| + static const char kGoogleCameraAdapter[] = "google camera adapter";
|
| + if (wcsstr(str_ptr, L"(VFW)") == NULL &&
|
| + !LowerCaseEqualsASCII(str_ptr,
|
| + str_ptr + arraysize(kGoogleCameraAdapter) - 1,
|
| + kGoogleCameraAdapter)) {
|
| + const std::string device_name(base::SysWideToUTF8(str_ptr));
|
| name.Reset();
|
| hr = prop_bag->Read(L"DevicePath", name.Receive(), 0);
|
| + std::string id;
|
| if (FAILED(hr) || name.type() != VT_BSTR) {
|
| id = device_name;
|
| } else {
|
|
|