Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / media / capture / video / win / capability_list_win.h
blob47166c1ec403b01d19f5d2b2815cf37688173ee5
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
3 // found in the LICENSE file.
5 // Windows specific implementation of VideoCaptureDevice.
6 // DirectShow is used for capturing. DirectShow provide its own threads
7 // for capturing.
9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_
10 #define MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_
12 #include <list>
13 #include <windows.h>
15 #include "media/base/video_capture_types.h"
17 namespace media {
19 struct CapabilityWin {
20 CapabilityWin(int index, const VideoCaptureFormat& format)
21 : stream_index(index), supported_format(format), info_header() {}
23 // Used by VideoCaptureDeviceWin.
24 CapabilityWin(int index,
25 const VideoCaptureFormat& format,
26 const BITMAPINFOHEADER& info_header)
27 : stream_index(index),
28 supported_format(format),
29 info_header(info_header) {}
31 const int stream_index;
32 const VideoCaptureFormat supported_format;
34 // |info_header| is only valid if DirectShow is used.
35 const BITMAPINFOHEADER info_header;
38 typedef std::list<CapabilityWin> CapabilityList;
40 const CapabilityWin& GetBestMatchedCapability(
41 const VideoCaptureFormat& requested,
42 const CapabilityList& capabilities);
44 } // namespace media
46 #endif // MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_