| 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/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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 366 } |
| 367 return pc_factory_.get() != NULL; | 367 return pc_factory_.get() != NULL; |
| 368 } | 368 } |
| 369 | 369 |
| 370 bool MediaStreamDependencyFactory::PeerConnectionFactoryCreated() { | 370 bool MediaStreamDependencyFactory::PeerConnectionFactoryCreated() { |
| 371 return pc_factory_.get() != NULL; | 371 return pc_factory_.get() != NULL; |
| 372 } | 372 } |
| 373 | 373 |
| 374 scoped_refptr<webrtc::PeerConnectionInterface> | 374 scoped_refptr<webrtc::PeerConnectionInterface> |
| 375 MediaStreamDependencyFactory::CreatePeerConnection( | 375 MediaStreamDependencyFactory::CreatePeerConnection( |
| 376 const webrtc::JsepInterface::IceServers& ice_servers, | 376 const webrtc::PeerConnectionInterface::IceServers& ice_servers, |
| 377 const webrtc::MediaConstraintsInterface* constraints, | 377 const webrtc::MediaConstraintsInterface* constraints, |
| 378 WebKit::WebFrame* web_frame, | 378 WebKit::WebFrame* web_frame, |
| 379 webrtc::PeerConnectionObserver* observer) { | 379 webrtc::PeerConnectionObserver* observer) { |
| 380 CHECK(web_frame); | 380 CHECK(web_frame); |
| 381 CHECK(observer); | 381 CHECK(observer); |
| 382 scoped_refptr<P2PPortAllocatorFactory> pa_factory = | 382 scoped_refptr<P2PPortAllocatorFactory> pa_factory = |
| 383 new talk_base::RefCountedObject<P2PPortAllocatorFactory>( | 383 new talk_base::RefCountedObject<P2PPortAllocatorFactory>( |
| 384 p2p_socket_dispatcher_.get(), | 384 p2p_socket_dispatcher_.get(), |
| 385 network_manager_, | 385 network_manager_, |
| 386 socket_factory_.get(), | 386 socket_factory_.get(), |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 } | 474 } |
| 475 | 475 |
| 476 scoped_refptr<webrtc::LocalAudioTrackInterface> | 476 scoped_refptr<webrtc::LocalAudioTrackInterface> |
| 477 MediaStreamDependencyFactory::CreateLocalAudioTrack( | 477 MediaStreamDependencyFactory::CreateLocalAudioTrack( |
| 478 const std::string& id, | 478 const std::string& id, |
| 479 webrtc::AudioSourceInterface* source) { | 479 webrtc::AudioSourceInterface* source) { |
| 480 return pc_factory_->CreateAudioTrack(id, source).get(); | 480 return pc_factory_->CreateAudioTrack(id, source).get(); |
| 481 } | 481 } |
| 482 | 482 |
| 483 webrtc::SessionDescriptionInterface* | 483 webrtc::SessionDescriptionInterface* |
| 484 MediaStreamDependencyFactory::CreateSessionDescription(const std::string& type, | 484 MediaStreamDependencyFactory::CreateSessionDescription( |
| 485 const std::string& sdp) { | 485 const std::string& type, |
| 486 return webrtc::CreateSessionDescription(type, sdp); | 486 const std::string& sdp, |
| 487 webrtc::SdpParseError* error) { |
| 488 return webrtc::CreateSessionDescription(type, sdp, error); |
| 487 } | 489 } |
| 488 | 490 |
| 489 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate( | 491 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate( |
| 490 const std::string& sdp_mid, | 492 const std::string& sdp_mid, |
| 491 int sdp_mline_index, | 493 int sdp_mline_index, |
| 492 const std::string& sdp) { | 494 const std::string& sdp) { |
| 493 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp); | 495 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp); |
| 494 } | 496 } |
| 495 | 497 |
| 496 WebRtcAudioDeviceImpl* | 498 WebRtcAudioDeviceImpl* |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 // processed before returning. We wait for the above task to finish before | 591 // processed before returning. We wait for the above task to finish before |
| 590 // letting the the function continue to avoid any potential race issues. | 592 // letting the the function continue to avoid any potential race issues. |
| 591 chrome_worker_thread_.Stop(); | 593 chrome_worker_thread_.Stop(); |
| 592 } else { | 594 } else { |
| 593 NOTREACHED() << "Worker thread not running."; | 595 NOTREACHED() << "Worker thread not running."; |
| 594 } | 596 } |
| 595 } | 597 } |
| 596 } | 598 } |
| 597 | 599 |
| 598 } // namespace content | 600 } // namespace content |
| OLD | NEW |