| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/capture/video/win/video_capture_device_factory_win.h" | 5 #include "media/capture/video/win/video_capture_device_factory_win.h" |
| 6 | 6 |
| 7 #include <mfapi.h> | 7 #include <mfapi.h> |
| 8 #include <mferror.h> | 8 #include <mferror.h> |
| 9 #include <objbase.h> | 9 #include <objbase.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 base::win::ScopedComPtr<IPin> output_capture_pin( | 272 base::win::ScopedComPtr<IPin> output_capture_pin( |
| 273 VideoCaptureDeviceWin::GetPin(capture_filter.Get(), PINDIR_OUTPUT, | 273 VideoCaptureDeviceWin::GetPin(capture_filter.Get(), PINDIR_OUTPUT, |
| 274 PIN_CATEGORY_CAPTURE, GUID_NULL)); | 274 PIN_CATEGORY_CAPTURE, GUID_NULL)); |
| 275 if (!output_capture_pin.Get()) { | 275 if (!output_capture_pin.Get()) { |
| 276 DLOG(ERROR) << "Failed to get capture output pin"; | 276 DLOG(ERROR) << "Failed to get capture output pin"; |
| 277 return; | 277 return; |
| 278 } | 278 } |
| 279 | 279 |
| 280 ScopedComPtr<IAMStreamConfig> stream_config; | 280 ScopedComPtr<IAMStreamConfig> stream_config; |
| 281 hr = output_capture_pin.QueryInterface(stream_config.Receive()); | 281 hr = output_capture_pin.CopyTo(stream_config.Receive()); |
| 282 if (FAILED(hr)) { | 282 if (FAILED(hr)) { |
| 283 DLOG(ERROR) << "Failed to get IAMStreamConfig interface from " | 283 DLOG(ERROR) << "Failed to get IAMStreamConfig interface from " |
| 284 "capture device: " << logging::SystemErrorCodeToString(hr); | 284 "capture device: " << logging::SystemErrorCodeToString(hr); |
| 285 return; | 285 return; |
| 286 } | 286 } |
| 287 | 287 |
| 288 int count = 0, size = 0; | 288 int count = 0, size = 0; |
| 289 hr = stream_config->GetNumberOfCapabilities(&count, &size); | 289 hr = stream_config->GetNumberOfCapabilities(&count, &size); |
| 290 if (FAILED(hr)) { | 290 if (FAILED(hr)) { |
| 291 DLOG(ERROR) << "GetNumberOfCapabilities failed: " | 291 DLOG(ERROR) << "GetNumberOfCapabilities failed: " |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 } | 461 } |
| 462 | 462 |
| 463 // static | 463 // static |
| 464 VideoCaptureDeviceFactory* | 464 VideoCaptureDeviceFactory* |
| 465 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( | 465 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( |
| 466 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 466 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
| 467 return new VideoCaptureDeviceFactoryWin(); | 467 return new VideoCaptureDeviceFactoryWin(); |
| 468 } | 468 } |
| 469 | 469 |
| 470 } // namespace media | 470 } // namespace media |
| OLD | NEW |