PortAllocator is now passed to PeerConnection instead of PeerConnectionFactory in new libjingle release.
Also creator of PortAllocator is responsible for deletion instead of factory. DEPS file has new libjingle rivison. Review URL: http://webrtc-codereview.appspot.com/317006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1172 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f4c8286222
commit
2a61e15bff
2
DEPS
2
DEPS
@ -4,7 +4,7 @@ vars = {
|
||||
"googlecode_url": "http://%s.googlecode.com/svn",
|
||||
"chromium_trunk" : "http://src.chromium.org/svn/trunk",
|
||||
"chromium_revision": "106036",
|
||||
"libjingle_revision": "87",
|
||||
"libjingle_revision": "100",
|
||||
|
||||
# Note: On most bots, clang is not checked out via DEPS but by
|
||||
# tools/clang/scripts/update.sh. The script reads this line here.
|
||||
|
@ -60,17 +60,8 @@ bool Conductor::InitializePeerConnection() {
|
||||
return false;
|
||||
}
|
||||
|
||||
cricket::PortAllocator* port_allocator =
|
||||
new cricket::BasicPortAllocator(
|
||||
new talk_base::BasicNetworkManager(),
|
||||
talk_base::SocketAddress("stun.l.google.com", 19302),
|
||||
talk_base::SocketAddress(),
|
||||
talk_base::SocketAddress(),
|
||||
talk_base::SocketAddress());
|
||||
|
||||
peer_connection_factory_.reset(
|
||||
new webrtc::PeerConnectionFactory(port_allocator,
|
||||
worker_thread_.get()));
|
||||
new webrtc::PeerConnectionFactory(worker_thread_.get()));
|
||||
if (!peer_connection_factory_->Initialize()) {
|
||||
main_wnd_->MessageBox("Error",
|
||||
"Failed to initialize PeerConnectionFactory", true);
|
||||
@ -78,10 +69,17 @@ bool Conductor::InitializePeerConnection() {
|
||||
return false;
|
||||
}
|
||||
|
||||
port_allocator_.reset(new cricket::BasicPortAllocator(
|
||||
new talk_base::BasicNetworkManager(),
|
||||
talk_base::SocketAddress("stun.l.google.com", 19302),
|
||||
talk_base::SocketAddress(),
|
||||
talk_base::SocketAddress(),
|
||||
talk_base::SocketAddress()));
|
||||
|
||||
// Since we only ever use a single PeerConnection instance, we share
|
||||
// the worker thread between the factory and the PC instance.
|
||||
peer_connection_.reset(peer_connection_factory_->CreatePeerConnection(
|
||||
worker_thread_.get()));
|
||||
port_allocator_.get(), worker_thread_.get()));
|
||||
if (!peer_connection_.get()) {
|
||||
main_wnd_->MessageBox("Error",
|
||||
"CreatePeerConnection failed", true);
|
||||
@ -96,9 +94,10 @@ bool Conductor::InitializePeerConnection() {
|
||||
|
||||
void Conductor::DeletePeerConnection() {
|
||||
peer_connection_.reset();
|
||||
worker_thread_.reset();
|
||||
active_streams_.clear();
|
||||
port_allocator_.reset();
|
||||
peer_connection_factory_.reset();
|
||||
worker_thread_.reset();
|
||||
peer_id_ = -1;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
namespace cricket {
|
||||
class VideoRenderer;
|
||||
class PortAllocator;
|
||||
} // namespace cricket
|
||||
|
||||
class Conductor
|
||||
@ -106,6 +107,7 @@ class Conductor
|
||||
MainWindow* main_wnd_;
|
||||
std::deque<std::string*> pending_messages_;
|
||||
std::set<std::string> active_streams_;
|
||||
talk_base::scoped_ptr<cricket::PortAllocator> port_allocator_;
|
||||
};
|
||||
|
||||
#endif // PEERCONNECTION_SAMPLES_CLIENT_CONDUCTOR_H_
|
||||
|
@ -44,6 +44,9 @@
|
||||
'export_dependent_settings': [
|
||||
'<(libjingle_orig)/../expat/expat.gyp:expat',
|
||||
],
|
||||
'include_dirs': [
|
||||
'../../third_party/libyuv/include/',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'FEATURE_ENABLE_SSL',
|
||||
@ -275,6 +278,8 @@
|
||||
'<(libjingle_orig)/source/talk/base/httpcommon.h',
|
||||
'<(libjingle_orig)/source/talk/base/httprequest.cc',
|
||||
'<(libjingle_orig)/source/talk/base/httprequest.h',
|
||||
'<(libjingle_orig)/source/talk/base/ipaddress.cc',
|
||||
'<(libjingle_orig)/source/talk/base/ipaddress.h',
|
||||
'<(libjingle_orig)/source/talk/base/json.cc',
|
||||
'<(libjingle_orig)/source/talk/base/json.h',
|
||||
'<(libjingle_orig)/source/talk/base/linked_ptr.h',
|
||||
@ -473,8 +478,6 @@
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'<(libjingle_orig)/source/talk/p2p/base/candidate.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/channel.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/channel.h',
|
||||
'<(libjingle_orig)/source/talk/p2p/base/common.h',
|
||||
'<(libjingle_orig)/source/talk/p2p/base/constants.cc',
|
||||
'<(libjingle_orig)/source/talk/p2p/base/constants.h',
|
||||
@ -534,6 +537,8 @@
|
||||
'<(libjingle_orig)/source/talk/session/phone/audiomonitor.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/call.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/call.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/channel.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/channel.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/channelmanager.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/channelmanager.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/codec.cc',
|
||||
@ -567,10 +572,19 @@
|
||||
'<(libjingle_orig)/source/talk/session/phone/soundclip.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/srtpfilter.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/srtpfilter.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/ssrcmuxfilter.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/ssrcmuxfilter.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/videocapturer.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/videocapturer.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/videocommon.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/videocommon.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtcpassthroughrender.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/videoframe.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/videoframe.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/voicechannel.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtcpassthroughrender.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtccommon.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtcvideocapturer.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtcvideocapturer.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtcvideoengine.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtcvideoengine.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/webrtcvideoframe.cc',
|
||||
@ -589,14 +603,19 @@
|
||||
'sources': [
|
||||
'<(libjingle_orig)/source/talk/session/phone/gdivideorenderer.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/gdivideorenderer.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/win32devicemanager.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/win32devicemanager.h',
|
||||
],
|
||||
}],
|
||||
['OS=="linux"', {
|
||||
'sources': [
|
||||
'<(libjingle_orig)/source/talk/session/phone/gtkvideorenderer.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/gtkvideorenderer.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/gtkvideorenderer.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/libudevsymboltable.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/libudevsymboltable.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/linuxdevicemanager.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/linuxdevicemanager.h',
|
||||
'<(libjingle_orig)/source/talk/session/phone/v4llookup.cc',
|
||||
'<(libjingle_orig)/source/talk/session/phone/v4llookup.h',
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user