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 19 matching lines...) Expand all Loading... |
30 public VideoCaptureDevice { | 30 public VideoCaptureDevice { |
31 public: | 31 public: |
32 explicit VideoCaptureDeviceMFWin(const Name& device_name); | 32 explicit VideoCaptureDeviceMFWin(const Name& device_name); |
33 virtual ~VideoCaptureDeviceMFWin(); | 33 virtual ~VideoCaptureDeviceMFWin(); |
34 | 34 |
35 // Opens the device driver for this device. | 35 // Opens the device driver for this device. |
36 // This function is used by the static VideoCaptureDevice::Create function. | 36 // This function is used by the static VideoCaptureDevice::Create function. |
37 bool Init(); | 37 bool Init(); |
38 | 38 |
39 // VideoCaptureDevice implementation. | 39 // VideoCaptureDevice implementation. |
| 40 virtual VideoEncodingCapabilities GetEncodingCapabilities() OVERRIDE; |
| 41 virtual void TryConfigureEncodedBitstream( |
| 42 const RuntimeVideoEncodingParameters& params) OVERRIDE; |
40 virtual void Allocate(int width, | 43 virtual void Allocate(int width, |
41 int height, | 44 int height, |
42 int frame_rate, | 45 int frame_rate, |
43 VideoCaptureDevice::EventHandler* observer) OVERRIDE; | 46 VideoCaptureDevice::EventHandler* observer) OVERRIDE; |
44 virtual void Start() OVERRIDE; | 47 virtual void Start() OVERRIDE; |
45 virtual void Stop() OVERRIDE; | 48 virtual void Stop() OVERRIDE; |
46 virtual void DeAllocate() OVERRIDE; | 49 virtual void DeAllocate() OVERRIDE; |
47 virtual const Name& device_name() OVERRIDE; | 50 virtual const Name& device_name() OVERRIDE; |
48 | 51 |
49 // Returns true iff the current platform supports the Media Foundation API | 52 // Returns true iff the current platform supports the Media Foundation API |
(...skipping 25 matching lines...) Expand all Loading... |
75 VideoCaptureDevice::EventHandler* observer_; | 78 VideoCaptureDevice::EventHandler* observer_; |
76 base::win::ScopedComPtr<IMFSourceReader> reader_; | 79 base::win::ScopedComPtr<IMFSourceReader> reader_; |
77 bool capture_; | 80 bool capture_; |
78 | 81 |
79 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin); | 82 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceMFWin); |
80 }; | 83 }; |
81 | 84 |
82 } // namespace media | 85 } // namespace media |
83 | 86 |
84 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ | 87 #endif // MEDIA_VIDEO_CAPTURE_WIN_VIDEO_CAPTURE_DEVICE_MF_WIN_H_ |
OLD | NEW |