Chromium Code Reviews| 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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1979 | 1979 |
| 1980 void MediaStreamManager::OnDevicesChanged( | 1980 void MediaStreamManager::OnDevicesChanged( |
| 1981 base::SystemMonitor::DeviceType device_type) { | 1981 base::SystemMonitor::DeviceType device_type) { |
| 1982 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 1982 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 1983 | 1983 |
| 1984 // NOTE: This method is only called in response to physical audio/video device | 1984 // NOTE: This method is only called in response to physical audio/video device |
| 1985 // changes (from the operating system). | 1985 // changes (from the operating system). |
| 1986 | 1986 |
| 1987 MediaStreamType stream_type; | 1987 MediaStreamType stream_type; |
| 1988 if (device_type == base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE) { | 1988 if (device_type == base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE) { |
| 1989 DVLOG(1) << "OnDevicesChanged(DEVTYPE_AUDIO_CAPTURE)"; | |
|
xians
2014/08/12 11:59:09
do you still want these debug loggings? If not, pl
henrika (OOO until Aug 14)
2014/08/12 12:04:39
I find them useful and would like to keep.
| |
| 1989 stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; | 1990 stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; |
| 1990 } else if (device_type == base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE) { | 1991 } else if (device_type == base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE) { |
| 1992 DVLOG(1) << "OnDevicesChanged(MEDIA_DEVICE_VIDEO_CAPTURE)"; | |
| 1991 stream_type = MEDIA_DEVICE_VIDEO_CAPTURE; | 1993 stream_type = MEDIA_DEVICE_VIDEO_CAPTURE; |
| 1992 } else { | 1994 } else { |
| 1993 return; // Uninteresting device change. | 1995 return; // Uninteresting device change. |
| 1994 } | 1996 } |
| 1995 | 1997 |
| 1996 // Always do enumeration even though some enumeration is in progress, | 1998 // Always do enumeration even though some enumeration is in progress, |
| 1997 // because those enumeration commands could be sent before these devices | 1999 // because those enumeration commands could be sent before these devices |
| 1998 // change. | 2000 // change. |
| 1999 ++active_enumeration_ref_count_[stream_type]; | 2001 ++active_enumeration_ref_count_[stream_type]; |
| 2000 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); | 2002 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 2015 if (it->device.type == MEDIA_DESKTOP_VIDEO_CAPTURE) { | 2017 if (it->device.type == MEDIA_DESKTOP_VIDEO_CAPTURE) { |
| 2016 video_capture_manager_->SetDesktopCaptureWindowId(it->session_id, | 2018 video_capture_manager_->SetDesktopCaptureWindowId(it->session_id, |
| 2017 window_id); | 2019 window_id); |
| 2018 break; | 2020 break; |
| 2019 } | 2021 } |
| 2020 } | 2022 } |
| 2021 } | 2023 } |
| 2022 } | 2024 } |
| 2023 | 2025 |
| 2024 } // namespace content | 2026 } // namespace content |
| OLD | NEW |