| 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_MF_WIN_H_ | 9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ |
| 10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ | 10 #define MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // This function is used by the static VideoCaptureDevice::Create function. | 37 // This function is used by the static VideoCaptureDevice::Create function. |
| 38 bool Init(); | 38 bool Init(); |
| 39 | 39 |
| 40 // VideoCaptureDevice implementation. | 40 // VideoCaptureDevice implementation. |
| 41 virtual void Allocate(const VideoCaptureCapability& capture_format, | 41 virtual void Allocate(const VideoCaptureCapability& capture_format, |
| 42 VideoCaptureDevice::EventHandler* observer) OVERRIDE; | 42 VideoCaptureDevice::EventHandler* observer) OVERRIDE; |
| 43 virtual void Start() OVERRIDE; | 43 virtual void Start() OVERRIDE; |
| 44 virtual void Stop() OVERRIDE; | 44 virtual void Stop() OVERRIDE; |
| 45 virtual void DeAllocate() OVERRIDE; | 45 virtual void DeAllocate() OVERRIDE; |
| 46 virtual const Name& device_name() OVERRIDE; | 46 virtual const Name& device_name() OVERRIDE; |
| 47 virtual void GetDeviceSupportedFormats( |
| 48 VideoCaptureFormats* capture_formats) OVERRIDE; |
| 47 | 49 |
| 48 // Returns true iff the current platform supports the Media Foundation API | 50 // Returns true iff the current platform supports the Media Foundation API |
| 49 // and that the DLLs are available. On Vista this API is an optional download | 51 // and that the DLLs are available. On Vista this API is an optional download |
| 50 // but the API is advertised as a part of Windows 7 and onwards. However, | 52 // but the API is advertised as a part of Windows 7 and onwards. However, |
| 51 // we've seen that the required DLLs are not available in some Win7 | 53 // we've seen that the required DLLs are not available in some Win7 |
| 52 // distributions such as Windows 7 N and Windows 7 KN. | 54 // distributions such as Windows 7 N and Windows 7 KN. |
| 53 static bool PlatformSupported(); | 55 static bool PlatformSupported(); |
| 54 | 56 |
| 55 static void GetDeviceNames(Names* device_names); | 57 static void GetDeviceNames(Names* device_names); |
| 56 | 58 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 74 VideoCaptureDevice::EventHandler* observer_; | 76 VideoCaptureDevice::EventHandler* observer_; |
| 75 base::win::ScopedComPtr<IMFSourceReader> reader_; | 77 base::win::ScopedComPtr<IMFSourceReader> reader_; |
| 76 bool capture_; | 78 bool capture_; |
| 77 | 79 |
| 78 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin); | 80 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin); |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 } // namespace media | 83 } // namespace media |
| 82 | 84 |
| 83 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ | 85 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ |
| OLD | NEW |