| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Windows specific implementation of VideoCaptureDevice. | 5 // Windows specific implementation of VideoCaptureDevice. |
| 6 // DirectShow is used for capturing. DirectShow provide its own threads | 6 // DirectShow is used for capturing. DirectShow provide its own threads |
| 7 // for capturing. | 7 // for capturing. |
| 8 | 8 |
| 9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| 10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void Free(); | 46 void Free(); |
| 47 AM_MEDIA_TYPE** Receive(); | 47 AM_MEDIA_TYPE** Receive(); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 void FreeMediaType(AM_MEDIA_TYPE* mt); | 50 void FreeMediaType(AM_MEDIA_TYPE* mt); |
| 51 void DeleteMediaType(AM_MEDIA_TYPE* mt); | 51 void DeleteMediaType(AM_MEDIA_TYPE* mt); |
| 52 | 52 |
| 53 AM_MEDIA_TYPE* media_type_; | 53 AM_MEDIA_TYPE* media_type_; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 static HRESULT GetDeviceFilter(const Name& device_name, | 56 static HRESULT GetDeviceFilter(const std::string& device_id, |
| 57 IBaseFilter** filter); | 57 IBaseFilter** filter); |
| 58 static bool PinMatchesCategory(IPin* pin, REFGUID category); | 58 static bool PinMatchesCategory(IPin* pin, REFGUID category); |
| 59 static base::win::ScopedComPtr<IPin> GetPin(IBaseFilter* filter, | 59 static base::win::ScopedComPtr<IPin> GetPin(IBaseFilter* filter, |
| 60 PIN_DIRECTION pin_dir, | 60 PIN_DIRECTION pin_dir, |
| 61 REFGUID category); | 61 REFGUID category); |
| 62 static VideoPixelFormat TranslateMediaSubtypeToPixelFormat( | 62 static VideoPixelFormat TranslateMediaSubtypeToPixelFormat( |
| 63 const GUID& sub_type); | 63 const GUID& sub_type); |
| 64 | 64 |
| 65 explicit VideoCaptureDeviceWin(const Name& device_name); | 65 explicit VideoCaptureDeviceWin(const Name& device_name); |
| 66 virtual ~VideoCaptureDeviceWin(); | 66 virtual ~VideoCaptureDeviceWin(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Map of all capabilities this device support. | 107 // Map of all capabilities this device support. |
| 108 CapabilityList capabilities_; | 108 CapabilityList capabilities_; |
| 109 VideoCaptureFormat capture_format_; | 109 VideoCaptureFormat capture_format_; |
| 110 | 110 |
| 111 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); | 111 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceWin); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace media | 114 } // namespace media |
| 115 | 115 |
| 116 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ | 116 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_WIN_H_ |
| OLD | NEW |