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

Unified Diff: media/video/capture/win/video_capture_device_win.cc

Issue 517273004: Win Video Capture: add DirectShow WDM devices capabilities enumeration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 3 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
« no previous file with comments | « media/video/capture/win/video_capture_device_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/win/video_capture_device_win.cc
diff --git a/media/video/capture/win/video_capture_device_win.cc b/media/video/capture/win/video_capture_device_win.cc
index 93ade085652b7f5f26734993e0a275149a3bb6fa..877c543cc187a34fc4b4ef7926fb7bb6628d4d44 100644
--- a/media/video/capture/win/video_capture_device_win.cc
+++ b/media/video/capture/win/video_capture_device_win.cc
@@ -23,9 +23,8 @@ namespace media {
// Finds and creates a DirectShow Video Capture filter matching the device_name.
// static
-HRESULT VideoCaptureDeviceWin::GetDeviceFilter(
- const VideoCaptureDevice::Name& device_name,
- IBaseFilter** filter) {
+HRESULT VideoCaptureDeviceWin::GetDeviceFilter(const std::string& device_id,
+ IBaseFilter** filter) {
DCHECK(filter);
ScopedComPtr<ICreateDevEnum> dev_enum;
@@ -65,7 +64,7 @@ HRESULT VideoCaptureDeviceWin::GetDeviceFilter(
}
if (name.type() == VT_BSTR) {
std::string device_path(base::SysWideToUTF8(V_BSTR(&name)));
- if (device_path.compare(device_name.id()) == 0) {
+ if (device_path.compare(device_id) == 0) {
// We have found the requested device
hr = moniker->BindToObject(0, 0, IID_IBaseFilter,
capture_filter.ReceiveVoid());
@@ -224,7 +223,7 @@ VideoCaptureDeviceWin::~VideoCaptureDeviceWin() {
bool VideoCaptureDeviceWin::Init() {
DCHECK(CalledOnValidThread());
- HRESULT hr = GetDeviceFilter(device_name_, capture_filter_.Receive());
+ HRESULT hr = GetDeviceFilter(device_name_.id(), capture_filter_.Receive());
if (!capture_filter_) {
DLOG(ERROR) << "Failed to create capture filter: "
<< logging::SystemErrorCodeToString(hr);
« no previous file with comments | « media/video/capture/win/video_capture_device_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698