Chromium Code Reviews| Index: media/video/capture/win/capability_list_win.h |
| diff --git a/media/video/capture/win/capability_list_win.h b/media/video/capture/win/capability_list_win.h |
| index c381b4b5d0f685a84bf34a64602e6fe6e1f012be..c7055000bd3accfc00fa816cc034ef6e622750fa 100644 |
| --- a/media/video/capture/win/capability_list_win.h |
| +++ b/media/video/capture/win/capability_list_win.h |
| @@ -11,49 +11,22 @@ |
| #include <list> |
| -#include "base/basictypes.h" |
| -#include "base/threading/non_thread_safe.h" |
| #include "media/video/capture/video_capture_types.h" |
| namespace media { |
| struct VideoCaptureCapabilityWin { |
|
mcasas
2014/10/13 08:18:47
Calling VideoBlaWin to a structure under folder
vi
|
| - explicit VideoCaptureCapabilityWin(int index) |
| - : stream_index(index), |
| - frame_rate_numerator(0), |
| - frame_rate_denominator(1) {} |
| + VideoCaptureCapabilityWin(int index, const VideoCaptureFormat& format) |
| + : stream_index(index), supported_format(format) {} |
| int stream_index; |
| - // Internally to Media Foundation Api type devices we use rational framerates |
| - // so framerates can be properly represented, f.i. 29.971fps= 30000/1001. |
| - int frame_rate_numerator; |
| - int frame_rate_denominator; |
| VideoCaptureFormat supported_format; |
| }; |
| -class CapabilityList : public base::NonThreadSafe { |
| - public: |
| - CapabilityList(); |
| - ~CapabilityList(); |
| +typedef std::list<VideoCaptureCapabilityWin> CapabilityList; |
| - bool empty() const { return capabilities_.empty(); } |
| - |
| - // Appends an entry to the list. |
| - void Add(const VideoCaptureCapabilityWin& capability); |
| - |
| - // Loops through the list of capabilities and returns an index of the best |
| - // matching capability. The algorithm prioritizes height, width, frame rate |
| - // and color format in that order. |
| - const VideoCaptureCapabilityWin& GetBestMatchedFormat( |
| - int requested_width, |
| - int requested_height, |
| - float requested_frame_rate) const; |
| - |
| - private: |
| - typedef std::list<VideoCaptureCapabilityWin> Capabilities; |
| - Capabilities capabilities_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(CapabilityList); |
| -}; |
| +CapabilityList::const_iterator GetBestMatchedCapability( |
|
mcasas
2014/10/13 08:18:47
Why const?
|
| + const VideoCaptureFormat& requested, |
| + const CapabilityList& capabilities); |
| } // namespace media |