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 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1663 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
1664 "457525 MediaStreamManager::InitializeDeviceManagersOnIOThread 4")); | 1664 "457525 MediaStreamManager::InitializeDeviceManagersOnIOThread 4")); |
1665 video_capture_manager_ = | 1665 video_capture_manager_ = |
1666 new VideoCaptureManager(media::VideoCaptureDeviceFactory::CreateFactory( | 1666 new VideoCaptureManager(media::VideoCaptureDeviceFactory::CreateFactory( |
1667 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); | 1667 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI))); |
1668 #if defined(OS_WIN) | 1668 #if defined(OS_WIN) |
1669 // Use an STA Video Capture Thread to try to avoid crashes on enumeration of | 1669 // Use an STA Video Capture Thread to try to avoid crashes on enumeration of |
1670 // buggy third party Direct Show modules, http://crbug.com/428958. | 1670 // buggy third party Direct Show modules, http://crbug.com/428958. |
1671 video_capture_thread_.init_com_with_mta(false); | 1671 video_capture_thread_.init_com_with_mta(false); |
1672 CHECK(video_capture_thread_.Start()); | 1672 CHECK(video_capture_thread_.Start()); |
1673 video_capture_manager_->Register(this, | 1673 video_capture_manager_->Register(this, video_capture_thread_.task_runner()); |
1674 video_capture_thread_.message_loop_proxy()); | |
1675 #else | 1674 #else |
1676 video_capture_manager_->Register(this, device_task_runner_); | 1675 video_capture_manager_->Register(this, device_task_runner_); |
1677 #endif | 1676 #endif |
1678 } | 1677 } |
1679 | 1678 |
1680 void MediaStreamManager::Opened(MediaStreamType stream_type, | 1679 void MediaStreamManager::Opened(MediaStreamType stream_type, |
1681 int capture_session_id) { | 1680 int capture_session_id) { |
1682 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 1681 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
1683 DVLOG(1) << "Opened({stream_type = " << stream_type << "} " | 1682 DVLOG(1) << "Opened({stream_type = " << stream_type << "} " |
1684 << "{capture_session_id = " << capture_session_id << "})"; | 1683 << "{capture_session_id = " << capture_session_id << "})"; |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2197 } | 2196 } |
2198 } | 2197 } |
2199 | 2198 |
2200 void MediaStreamManager::SetKeyboardMicOnDeviceThread() { | 2199 void MediaStreamManager::SetKeyboardMicOnDeviceThread() { |
2201 DCHECK(device_task_runner_->BelongsToCurrentThread()); | 2200 DCHECK(device_task_runner_->BelongsToCurrentThread()); |
2202 audio_manager_->SetHasKeyboardMic(); | 2201 audio_manager_->SetHasKeyboardMic(); |
2203 } | 2202 } |
2204 #endif | 2203 #endif |
2205 | 2204 |
2206 } // namespace content | 2205 } // namespace content |
OLD | NEW |