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

Side by Side Diff: media/video/capture/video_capture_device.h

Issue 637953008: Improve video capture columns in chrome://media-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test for video capture format Created 6 years, 2 months 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
OLDNEW
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 // VideoCaptureDevice is the abstract base class for realizing video capture 5 // VideoCaptureDevice is the abstract base class for realizing video capture
6 // device support in Chromium. It provides the interface for OS dependent 6 // device support in Chromium. It provides the interface for OS dependent
7 // implementations. 7 // implementations.
8 // The class is created and functions are invoked on a thread owned by 8 // The class is created and functions are invoked on a thread owned by
9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS 9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS
10 // specific implementation. 10 // specific implementation.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool operator<(const Name& other) const { 101 bool operator<(const Name& other) const {
102 return unique_id_ < other.id(); 102 return unique_id_ < other.id();
103 } 103 }
104 104
105 #if defined(OS_WIN) || defined(OS_MACOSX) 105 #if defined(OS_WIN) || defined(OS_MACOSX)
106 CaptureApiType capture_api_type() const { 106 CaptureApiType capture_api_type() const {
107 return capture_api_class_.capture_api_type(); 107 return capture_api_class_.capture_api_type();
108 } 108 }
109 #endif 109 #endif
110 #if defined(OS_WIN) 110 #if defined(OS_WIN)
111 const std::string capture_api_type_string() const {
tommi (sloooow) - chröme 2014/10/20 22:09:42 nit: these methods might as well just return const
burnik 2014/10/21 11:27:04 Done.
112 switch(capture_api_type()) {
113 case MEDIA_FOUNDATION:
114 return "MEDIA_FOUNDATION";
115 case DIRECT_SHOW:
116 return "DIRECT_SHOW";
117 case DIRECT_SHOW_WDM_CROSSBAR:
118 return "DIRECT_SHOW_WDM_CROSSBAR";
119 default:
120 NOTREACHED() << "Unknown Video Capture API type!";
121 return "API_TYPE_UNKNOWN";
122 }
123 }
111 // Certain devices need an ID different from the |unique_id_| for 124 // Certain devices need an ID different from the |unique_id_| for
112 // capabilities retrieval. 125 // capabilities retrieval.
113 const std::string& capabilities_id() const { 126 const std::string& capabilities_id() const {
114 return capabilities_id_; 127 return capabilities_id_;
115 } 128 }
116 void set_capabilities_id(const std::string& id) { 129 void set_capabilities_id(const std::string& id) {
117 capabilities_id_ = id; 130 capabilities_id_ = id;
118 } 131 }
119 #endif 132 #endif
120 #if defined(OS_MACOSX) 133 #if defined(OS_MACOSX)
134 const std::string capture_api_type_string() const {
135 switch(capture_api_type()) {
136 case AVFOUNDATION:
137 return "AVFOUNDATION";
138 case QTKIT:
139 return "QTKIT";
140 case DECKLINK:
141 return "DECKLINK";
142 default:
143 NOTREACHED() << "Unknown Video Capture API type!";
144 return "API_TYPE_UNKNOWN";
145 }
146 }
121 TransportType transport_type() const { 147 TransportType transport_type() const {
122 return transport_type_; 148 return transport_type_;
123 } 149 }
124 bool is_blacklisted() const { 150 bool is_blacklisted() const {
125 return is_blacklisted_; 151 return is_blacklisted_;
126 } 152 }
127 void set_is_blacklisted(bool is_blacklisted) { 153 void set_is_blacklisted(bool is_blacklisted) {
128 is_blacklisted_ = is_blacklisted; 154 is_blacklisted_ = is_blacklisted;
129 } 155 }
130 #endif // if defined(OS_WIN) 156 #endif // if defined(OS_WIN)
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 virtual void CaptureImage() {} 346 virtual void CaptureImage() {}
321 347
322 protected: 348 protected:
323 static const int kPowerLine50Hz = 50; 349 static const int kPowerLine50Hz = 50;
324 static const int kPowerLine60Hz = 60; 350 static const int kPowerLine60Hz = 60;
325 }; 351 };
326 352
327 } // namespace media 353 } // namespace media
328 354
329 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 355 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698