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 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 audio_input_device_manager()->UseFakeDevice(); | 1627 audio_input_device_manager()->UseFakeDevice(); |
1628 } | 1628 } |
1629 | 1629 |
1630 video_capture_manager_ = | 1630 video_capture_manager_ = |
1631 new VideoCaptureManager(media::VideoCaptureDeviceFactory::CreateFactory( | 1631 new VideoCaptureManager(media::VideoCaptureDeviceFactory::CreateFactory( |
1632 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); | 1632 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); |
1633 #if defined(OS_WIN) | 1633 #if defined(OS_WIN) |
1634 // Use an STA Video Capture Thread to try to avoid crashes on enumeration of | 1634 // Use an STA Video Capture Thread to try to avoid crashes on enumeration of |
1635 // buggy third party Direct Show modules, http://crbug.com/428958. | 1635 // buggy third party Direct Show modules, http://crbug.com/428958. |
1636 video_capture_thread_.init_com_with_mta(false); | 1636 video_capture_thread_.init_com_with_mta(false); |
1637 // TODO(pkasting): Remove ScopedTracker below once crbug.com/457525 is fixed. | 1637 { |
1638 tracked_objects::ScopedTracker tracking_profile1( | 1638 // TODO(pkasting): Remove ScopedTracker below once crbug.com/457525 is |
1639 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1639 // fixed. |
1640 "457525 MediaStreamManager::InitializeDeviceManagersOnIOThread1")); | 1640 tracked_objects::ScopedTracker tracking_profile( |
1641 CHECK(video_capture_thread_.Start()); | 1641 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
1642 // TODO(pkasting): Remove ScopedTracker below once crbug.com/457525 is fixed. | 1642 "457525 " |
1643 tracked_objects::ScopedTracker tracking_profile2( | 1643 "MediaStreamManager::InitializeDeviceManagersOnIOThread -> Start")); |
1644 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1644 CHECK(video_capture_thread_.Start()); |
1645 "457525 MediaStreamManager::InitializeDeviceManagersOnIOThread2")); | 1645 } |
1646 video_capture_manager_->Register(this, | 1646 video_capture_manager_->Register(this, |
1647 video_capture_thread_.message_loop_proxy()); | 1647 video_capture_thread_.message_loop_proxy()); |
1648 #else | 1648 #else |
1649 video_capture_manager_->Register(this, device_task_runner_); | 1649 video_capture_manager_->Register(this, device_task_runner_); |
1650 #endif | 1650 #endif |
1651 } | 1651 } |
1652 | 1652 |
1653 void MediaStreamManager::Opened(MediaStreamType stream_type, | 1653 void MediaStreamManager::Opened(MediaStreamType stream_type, |
1654 int capture_session_id) { | 1654 int capture_session_id) { |
1655 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 1655 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2170 } | 2170 } |
2171 } | 2171 } |
2172 | 2172 |
2173 void MediaStreamManager::SetKeyboardMicOnDeviceThread() { | 2173 void MediaStreamManager::SetKeyboardMicOnDeviceThread() { |
2174 DCHECK(device_task_runner_->BelongsToCurrentThread()); | 2174 DCHECK(device_task_runner_->BelongsToCurrentThread()); |
2175 audio_manager_->SetHasKeyboardMic(); | 2175 audio_manager_->SetHasKeyboardMic(); |
2176 } | 2176 } |
2177 #endif | 2177 #endif |
2178 | 2178 |
2179 } // namespace content | 2179 } // namespace content |
OLD | NEW |