OLD | NEW |
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 #include "content/browser/renderer_host/media/media_stream_manager.h" | 5 #include "content/browser/renderer_host/media/media_stream_manager.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 // Post the request to UI for permission approval. | 906 // Post the request to UI for permission approval. |
907 PostRequestToUI(*it); | 907 PostRequestToUI(*it); |
908 break; | 908 break; |
909 } | 909 } |
910 } | 910 } |
911 label_list.clear(); | 911 label_list.clear(); |
912 --active_enumeration_ref_count_[stream_type]; | 912 --active_enumeration_ref_count_[stream_type]; |
913 DCHECK_GE(active_enumeration_ref_count_[stream_type], 0); | 913 DCHECK_GE(active_enumeration_ref_count_[stream_type], 0); |
914 } | 914 } |
915 | 915 |
| 916 void MediaStreamManager::DeviceCapabilitiesEnumerated( |
| 917 const StreamDeviceInfo& device_info, |
| 918 const media::VideoCaptureCapabilities& capabilities) { |
| 919 // TODO(mcasas): http://crbug.com/309554, this method will be further |
| 920 // implemented by returning the device capabilities to VideoCaptureHost. |
| 921 media::VideoCaptureCapabilities::const_iterator format; |
| 922 for (format = capabilities.begin(); format != capabilities.end(); ++format) { |
| 923 DCHECK_GE(format->width, 1); |
| 924 DCHECK_GE(format->height, 1); |
| 925 DCHECK_GE(format->frame_rate, 1); |
| 926 DVLOG(1) << " Device format (" << format->width << "x" << format->height |
| 927 << ")@" << format->frame_rate << "fps"; |
| 928 } |
| 929 } |
| 930 |
916 void MediaStreamManager::Error(MediaStreamType stream_type, | 931 void MediaStreamManager::Error(MediaStreamType stream_type, |
917 int capture_session_id, | 932 int capture_session_id, |
918 MediaStreamProviderError error) { | 933 MediaStreamProviderError error) { |
919 // Find the device for the error call. | 934 // Find the device for the error call. |
920 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 935 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
921 DVLOG(1) << "Error(" | 936 DVLOG(1) << "Error(" |
922 << "{stream_type = " << stream_type << "} ," | 937 << "{stream_type = " << stream_type << "} ," |
923 << "{capture_session_id = " << capture_session_id << "})"; | 938 << "{capture_session_id = " << capture_session_id << "})"; |
924 | 939 |
925 | 940 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 } | 1234 } |
1220 | 1235 |
1221 // Always do enumeration even though some enumeration is in progress, | 1236 // Always do enumeration even though some enumeration is in progress, |
1222 // because those enumeration commands could be sent before these devices | 1237 // because those enumeration commands could be sent before these devices |
1223 // change. | 1238 // change. |
1224 ++active_enumeration_ref_count_[stream_type]; | 1239 ++active_enumeration_ref_count_[stream_type]; |
1225 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); | 1240 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); |
1226 } | 1241 } |
1227 | 1242 |
1228 } // namespace content | 1243 } // namespace content |
OLD | NEW |