Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 11270012: Adding audio support to the new webmediaplyer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a lock to protect the |renderer_| Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/renderer/media/media_stream_dependency_factory.h" 5 #include "content/renderer/media/media_stream_dependency_factory.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 return webrtc::CreateSessionDescription(type, sdp); 285 return webrtc::CreateSessionDescription(type, sdp);
286 } 286 }
287 287
288 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate( 288 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate(
289 const std::string& sdp_mid, 289 const std::string& sdp_mid,
290 int sdp_mline_index, 290 int sdp_mline_index,
291 const std::string& sdp) { 291 const std::string& sdp) {
292 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp); 292 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp);
293 } 293 }
294 294
295 WebRtcAudioDeviceImpl*
296 MediaStreamDependencyFactory::GetWebRtcAudioDevice() {
297 return audio_device_;
298 }
299
295 void MediaStreamDependencyFactory::SetAudioDeviceSessionId(int session_id) { 300 void MediaStreamDependencyFactory::SetAudioDeviceSessionId(int session_id) {
296 audio_device_->SetSessionId(session_id); 301 audio_device_->SetSessionId(session_id);
297 } 302 }
298 303
299 void MediaStreamDependencyFactory::InitializeWorkerThread( 304 void MediaStreamDependencyFactory::InitializeWorkerThread(
300 talk_base::Thread** thread, 305 talk_base::Thread** thread,
301 base::WaitableEvent* event) { 306 base::WaitableEvent* event) {
302 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); 307 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
303 jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true); 308 jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true);
304 *thread = jingle_glue::JingleThreadWrapper::current(); 309 *thread = jingle_glue::JingleThreadWrapper::current();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // processed before returning. We wait for the above task to finish before 392 // processed before returning. We wait for the above task to finish before
388 // letting the the function continue to avoid any potential race issues. 393 // letting the the function continue to avoid any potential race issues.
389 chrome_worker_thread_.Stop(); 394 chrome_worker_thread_.Stop();
390 } else { 395 } else {
391 NOTREACHED() << "Worker thread not running."; 396 NOTREACHED() << "Worker thread not running.";
392 } 397 }
393 } 398 }
394 } 399 }
395 400
396 } // namespace content 401 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698