| 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_ |
| 11 | 11 |
| 12 #include <mfidl.h> | 12 #include <mfidl.h> |
| 13 #include <mfreadwrite.h> | 13 #include <mfreadwrite.h> |
| 14 | 14 |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
| 18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
| 19 #include "base/win/scoped_comptr.h" | 19 #include "base/win/scoped_comptr.h" |
| 20 #include "media/base/media_export.h" |
| 20 #include "media/video/capture/video_capture_device.h" | 21 #include "media/video/capture/video_capture_device.h" |
| 21 | 22 |
| 22 interface IMFSourceReader; | 23 interface IMFSourceReader; |
| 23 | 24 |
| 24 namespace media { | 25 namespace media { |
| 25 | 26 |
| 26 class MFReaderCallback; | 27 class MFReaderCallback; |
| 27 | 28 |
| 28 class VideoCaptureDeviceMFWin | 29 class MEDIA_EXPORT VideoCaptureDeviceMFWin |
| 29 : public base::NonThreadSafe, | 30 : public base::NonThreadSafe, |
| 30 public VideoCaptureDevice { | 31 public VideoCaptureDevice { |
| 31 public: | 32 public: |
| 32 explicit VideoCaptureDeviceMFWin(const Name& device_name); | 33 explicit VideoCaptureDeviceMFWin(const Name& device_name); |
| 33 virtual ~VideoCaptureDeviceMFWin(); | 34 virtual ~VideoCaptureDeviceMFWin(); |
| 34 | 35 |
| 35 // Opens the device driver for this device. | 36 // Opens the device driver for this device. |
| 36 // This function is used by the static VideoCaptureDevice::Create function. | 37 // This function is used by the static VideoCaptureDevice::Create function. |
| 37 bool Init(); | 38 bool Init(); |
| 38 | 39 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 VideoCaptureDevice::EventHandler* observer_; | 76 VideoCaptureDevice::EventHandler* observer_; |
| 76 base::win::ScopedComPtr<IMFSourceReader> reader_; | 77 base::win::ScopedComPtr<IMFSourceReader> reader_; |
| 77 bool capture_; | 78 bool capture_; |
| 78 | 79 |
| 79 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin); | 80 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin); |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 } // namespace media | 83 } // namespace media |
| 83 | 84 |
| 84 #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 |