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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
882 // Post the request to UI for permission approval. | 882 // Post the request to UI for permission approval. |
883 PostRequestToUI(*it); | 883 PostRequestToUI(*it); |
884 break; | 884 break; |
885 } | 885 } |
886 } | 886 } |
887 label_list.clear(); | 887 label_list.clear(); |
888 --active_enumeration_ref_count_[stream_type]; | 888 --active_enumeration_ref_count_[stream_type]; |
889 DCHECK_GE(active_enumeration_ref_count_[stream_type], 0); | 889 DCHECK_GE(active_enumeration_ref_count_[stream_type], 0); |
890 } | 890 } |
891 | 891 |
892 void MediaStreamManager::DeviceCapabilitiesEnumerated( | |
893 const StreamDeviceInfo& device_info, | |
894 const media::VideoCaptureCapabilities& capabilities) { | |
895 | |
tommi (sloooow) - chröme
2013/10/25 14:15:34
remove this empty line.
If there are plans for th
mcasas
2013/10/28 12:50:08
Done & done.
| |
896 media::VideoCaptureCapabilities::const_iterator format; | |
897 for (format = capabilities.begin(); format != capabilities.end(); ++format) { | |
898 DCHECK_GE(format->width, 1); | |
899 DCHECK_GE(format->height, 1); | |
900 DCHECK_GE(format->frame_rate, 1); | |
901 DVLOG(1) << " Device format (" << format->width << "x" << format->height | |
902 << ")@" << format->frame_rate << "fps"; | |
903 } | |
904 } | |
905 | |
892 void MediaStreamManager::Error(MediaStreamType stream_type, | 906 void MediaStreamManager::Error(MediaStreamType stream_type, |
893 int capture_session_id, | 907 int capture_session_id, |
894 MediaStreamProviderError error) { | 908 MediaStreamProviderError error) { |
895 // Find the device for the error call. | 909 // Find the device for the error call. |
896 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 910 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
897 DVLOG(1) << "Error(" | 911 DVLOG(1) << "Error(" |
898 << "{stream_type = " << stream_type << "} ," | 912 << "{stream_type = " << stream_type << "} ," |
899 << "{capture_session_id = " << capture_session_id << "})"; | 913 << "{capture_session_id = " << capture_session_id << "})"; |
900 | 914 |
901 | 915 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1195 } | 1209 } |
1196 | 1210 |
1197 // Always do enumeration even though some enumeration is in progress, | 1211 // Always do enumeration even though some enumeration is in progress, |
1198 // because those enumeration commands could be sent before these devices | 1212 // because those enumeration commands could be sent before these devices |
1199 // change. | 1213 // change. |
1200 ++active_enumeration_ref_count_[stream_type]; | 1214 ++active_enumeration_ref_count_[stream_type]; |
1201 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); | 1215 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); |
1202 } | 1216 } |
1203 | 1217 |
1204 } // namespace content | 1218 } // namespace content |
OLD | NEW |