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_CAPABILITY_LIST_WIN_H_ | 9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_ |
10 #define MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_ | 10 #define MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_ |
11 | 11 |
12 #include <list> | 12 #include <list> |
13 #include <windows.h> | |
13 | 14 |
14 #include "media/video/capture/video_capture_types.h" | 15 #include "media/video/capture/video_capture_types.h" |
15 | 16 |
16 namespace media { | 17 namespace media { |
17 | 18 |
18 struct CapabilityWin { | 19 struct CapabilityWin { |
19 CapabilityWin(int index, const VideoCaptureFormat& format) | 20 CapabilityWin(int index, const VideoCaptureFormat& format) |
20 : stream_index(index), supported_format(format) {} | 21 : stream_index(index), supported_format(format) {} |
21 int stream_index; | 22 |
22 VideoCaptureFormat supported_format; | 23 // Used by the DirectShow implementation VideoCaptureDeviceWin. |
tommi (sloooow) - chröme
2015/02/13 14:50:09
Used by VideoCaptureDeviceWin (?)
| |
24 CapabilityWin(int index, const VideoCaptureFormat& format, | |
25 const BITMAPINFOHEADER& info_header) | |
26 : stream_index(index), | |
27 supported_format(format), | |
28 info_header(info_header) { | |
29 } | |
30 | |
31 const int stream_index; | |
32 const VideoCaptureFormat supported_format; | |
33 | |
34 // |info_header| is only valid if DirectShow is used. | |
35 const BITMAPINFOHEADER info_header; | |
tommi (sloooow) - chröme
2015/02/13 14:50:09
nice constness
| |
23 }; | 36 }; |
24 | 37 |
25 typedef std::list<CapabilityWin> CapabilityList; | 38 typedef std::list<CapabilityWin> CapabilityList; |
26 | 39 |
27 CapabilityWin GetBestMatchedCapability(const VideoCaptureFormat& requested, | 40 const CapabilityWin& GetBestMatchedCapability( |
28 const CapabilityList& capabilities); | 41 const VideoCaptureFormat& requested, |
42 const CapabilityList& capabilities); | |
29 | 43 |
30 } // namespace media | 44 } // namespace media |
31 | 45 |
32 #endif // MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_ | 46 #endif // MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_ |
OLD | NEW |