Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: media/video/capture/win/capability_list_win.h

Issue 11418307: Revert 170912 - need more delayloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/media.gyp ('k') | media/video/capture/win/capability_list_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 // Windows specific implementation of VideoCaptureDevice.
6 // DirectShow is used for capturing. DirectShow provide its own threads
7 // for capturing.
8
9 #ifndef MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_
10 #define MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_
11
12 #include <list>
13
14 #include "base/threading/non_thread_safe.h"
15 #include "media/video/capture/video_capture_types.h"
16
17 namespace media {
18
19 struct VideoCaptureCapabilityWin : public VideoCaptureCapability {
20 explicit VideoCaptureCapabilityWin(int index) : stream_index(index) {}
21 int stream_index;
22 };
23
24 class CapabilityList : public base::NonThreadSafe {
25 public:
26 CapabilityList();
27 ~CapabilityList();
28
29 bool empty() const { return capabilities_.empty(); }
30
31 // Appends an entry to the list.
32 void Add(const VideoCaptureCapabilityWin& capability);
33
34 // Loops through the list of capabilities and returns an index of the best
35 // matching capability. The algorithm prioritizes height, width, frame rate
36 // and color format in that order.
37 const VideoCaptureCapabilityWin& GetBestMatchedCapability(
38 int requested_width, int requested_height,
39 int requested_frame_rate) const;
40
41 private:
42 typedef std::list<VideoCaptureCapabilityWin> Capabilities;
43 Capabilities capabilities_;
44
45 DISALLOW_COPY_AND_ASSIGN(CapabilityList);
46 };
47
48 } // namespace media
49
50 #endif // MEDIA_VIDEO_CAPTURE_WIN_CAPABILITY_LIST_WIN_H_
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | media/video/capture/win/capability_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698