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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 29423003: Added video capture capabilities retrieval and caching to VideoCaptureManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi@'s round of comments addressed. More UT. Capabilities reset on closing device. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index ff0cdd9931c387684b3a4bd70643ca1a4b96c19c..cc88270e86a5ce18e94c5a9cb6ec4d055156aa6f 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -913,6 +913,21 @@ void MediaStreamManager::DevicesEnumerated(
DCHECK_GE(active_enumeration_ref_count_[stream_type], 0);
}
+void MediaStreamManager::DeviceCapabilitiesEnumerated(
+ const StreamDeviceInfo& device_info,
+ const media::VideoCaptureCapabilities& capabilities) {
+ // TODO(mcasas): http://crbug.com/309554, this method will be further
+ // implemented by returning the device capabilities to VideoCaptureHost.
+ media::VideoCaptureCapabilities::const_iterator format;
+ for (format = capabilities.begin(); format != capabilities.end(); ++format) {
+ DCHECK_GE(format->width, 1);
+ DCHECK_GE(format->height, 1);
+ DCHECK_GE(format->frame_rate, 1);
+ DVLOG(1) << " Device format (" << format->width << "x" << format->height
+ << ")@" << format->frame_rate << "fps";
+ }
+}
+
void MediaStreamManager::Error(MediaStreamType stream_type,
int capture_session_id,
MediaStreamProviderError error) {

Powered by Google App Engine
This is Rietveld 408576698