commit f90a7535692e0642d8f9b496b36cff409c3d8740 Author: David Fifield david@bamsoftware.com Date: Sun Nov 30 21:58:01 2014 -0800
Update webrtc-cmd.patch.
https://trac.torproject.org/projects/tor/ticket/5578#comment:37 --- webrtc/webrtc-cmd.patch | 64 +++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 30 deletions(-)
diff --git a/webrtc/webrtc-cmd.patch b/webrtc/webrtc-cmd.patch index 16fcd34..e1793aa 100644 --- a/webrtc/webrtc-cmd.patch +++ b/webrtc/webrtc-cmd.patch @@ -1,9 +1,10 @@ -diff --git a/talk/examples/peerconnection/webrtc_cmd.cc b/talk/examples/peerconnection/webrtc_cmd.cc -new file mode 100644 -index 0000000..df5ec3c ---- /dev/null -+++ b/talk/examples/peerconnection/webrtc_cmd.cc -@@ -0,0 +1,320 @@ +Index: talk/examples/peerconnection/webrtc_cmd.cc +=================================================================== +diff --git a/trunk/talk/examples/peerconnection/webrtc_cmd.cc b/trunk/talk/examples/peerconnection/webrtc_cmd.cc +new file mode 10644 +--- /dev/null (revision 0) ++++ b/trunk/talk/examples/peerconnection/webrtc_cmd.cc (working copy) +@@ -0,0 +1,319 @@ +/* + * Copyright 2013, Pierre St Juste + * Copyright 2014, Chris Ball @@ -39,15 +40,15 @@ index 0000000..df5ec3c +#include "talk/app/webrtc/datachannelinterface.h" +#include "talk/app/webrtc/test/fakeconstraints.h" +#include "talk/app/webrtc/test/mockpeerconnectionobservers.h" -+#include "talk/base/json.h" -+#include "talk/base/logging.h" -+#include "talk/base/ssladapter.h" -+#include "talk/base/sslstreamadapter.h" -+#include "talk/base/thread.h" ++#include "webrtc/base/json.h" ++#include "webrtc/base/logging.h" ++#include "webrtc/base/ssladapter.h" ++#include "webrtc/base/sslstreamadapter.h" ++#include "webrtc/base/thread.h" +#include "talk/app/webrtc/test/fakedtlsidentityservice.h" + -+using talk_base::scoped_ptr; -+using talk_base::scoped_refptr; ++using rtc::scoped_ptr; ++using rtc::scoped_refptr; +using webrtc::MediaStreamInterface; +using webrtc::CreatePeerConnectionFactory; +using webrtc::DataChannelInterface; @@ -88,7 +89,7 @@ index 0000000..df5ec3c + bool IsOpen() const { return state_ == DataChannelInterface::kOpen; } + + private: -+ talk_base::scoped_refptrwebrtc::DataChannelInterface channel_; ++ rtc::scoped_refptrwebrtc::DataChannelInterface channel_; + DataChannelInterface::DataState state_; +}; + @@ -97,7 +98,7 @@ index 0000000..df5ec3c + public: + static DummySetSessionDescriptionObserver* Create() { + return -+ new talk_base::RefCountedObject<DummySetSessionDescriptionObserver>(); ++ new rtc::RefCountedObject<DummySetSessionDescriptionObserver>(); + } + virtual void OnSuccess() { + LOG(INFO) << __FUNCTION__; @@ -151,15 +152,15 @@ index 0000000..df5ec3c + virtual int AddRef() { return 1; } + virtual int Release() { return 0; } + private: -+ talk_base::scoped_refptrwebrtc::PeerConnectionFactoryInterface ++ rtc::scoped_refptrwebrtc::PeerConnectionFactoryInterface + peer_connection_factory_; + webrtc::PeerConnectionInterface::IceServers servers_; + webrtc::PeerConnectionInterface::IceServer server_; + webrtc::FakeConstraints constraints_; -+ talk_base::scoped_refptrwebrtc::PeerConnectionInterface peer_connection_; -+ talk_base::scoped_refptrwebrtc::AudioTrackInterface audio_track_; -+ talk_base::scoped_refptrwebrtc::MediaStreamInterface stream_; -+ talk_base::scoped_refptrwebrtc::DataChannelInterface data_channel_; ++ rtc::scoped_refptrwebrtc::PeerConnectionInterface peer_connection_; ++ rtc::scoped_refptrwebrtc::AudioTrackInterface audio_track_; ++ rtc::scoped_refptrwebrtc::MediaStreamInterface stream_; ++ rtc::scoped_refptrwebrtc::DataChannelInterface data_channel_; +}; + +const char kStunServerUri[] = "stun:stun.l.google.com:19302"; @@ -172,17 +173,16 @@ index 0000000..df5ec3c + servers_.push_back(server_); + constraints_.SetMandatoryReceiveAudio(false); + constraints_.SetMandatoryReceiveVideo(false); -+ constraints_.AddOptional(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, webrtc::MediaConstraintsInterface::kValueTrue); +} + +bool WebRtcConnectionManager::InitConnection() { -+ FakeIdentityService* dtls_service = talk_base::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeIdentityService() : NULL; ++ FakeIdentityService* dtls_service = rtc::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeIdentityService() : NULL; + peer_connection_ = peer_connection_factory_->CreatePeerConnection(servers_, NULL, NULL, dtls_service, this); + audio_track_ = peer_connection_factory_->CreateAudioTrack(kAudioLabel, + NULL); + stream_ = peer_connection_factory_->CreateLocalMediaStream(kStreamLabel); + stream_->AddTrack(audio_track_); -+ peer_connection_->AddStream(stream_, &constraints_); ++ peer_connection_->AddStream(stream_); + data_channel_ = peer_connection_->CreateDataChannel("test1", NULL); + data_channel_->RegisterObserver(new ChatDataChannelObserver(data_channel_)); + return true; @@ -270,7 +270,7 @@ index 0000000..df5ec3c +int main(int argc, char **argv) { + WebRtcConnectionManager manager; + -+ talk_base::InitializeSSL(NULL); ++ rtc::InitializeSSL(NULL); + + while (1) { + std::string input; @@ -320,15 +320,16 @@ index 0000000..df5ec3c + } + } + } -+ talk_base::CleanupSSL(); ++ rtc::CleanupSSL(); + return 0; +} + -diff --git a/talk/libjingle_examples.gyp b/talk/libjingle_examples.gyp -index f69c5dc..33e3d76 100755 ---- a/talk/libjingle_examples.gyp -+++ b/talk/libjingle_examples.gyp -@@ -104,6 +104,18 @@ +Index: talk/libjingle_examples.gyp +=================================================================== +diff --git a/trunk/talk/libjingle_examples.gyp b/trunk/talk/libjingle_examples.gyp +--- a/trunk/talk/libjingle_examples.gyp (revision 7765) ++++ b/trunk/talk/libjingle_examples.gyp (working copy) +@@ -104,6 +104,21 @@ # TODO(ronghuawu): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [ 4309, ], }, # target peerconnection_server @@ -340,6 +341,9 @@ index f69c5dc..33e3d76 100755 + ], + 'dependencies': [ + 'libjingle.gyp:libjingle', ++ '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp', ++ 'libjingle.gyp:libjingle_peerconnection', ++ '<@(libjingle_tests_additional_deps)', + ], + # TODO(ronghuawu): crbug.com/167187 fix size_t to int truncations. + 'msvs_disabled_warnings': [ 4309, ],