From 1328cd6d7bb5339034b22a939f1792c1deadedd7 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Wed, 3 Aug 2011 19:38:00 +0000 Subject: Disable RTP support in remoting protocol code. Also disabled Zip encoder/decoder. TEST=Compiles,connects BUG=91538 Review URL: http://codereview.chromium.org/7563010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95286 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/protocol/jingle_session.cc | 25 ++++++------------------- remoting/protocol/jingle_session.h | 2 -- remoting/protocol/jingle_session_unittest.cc | 3 ++- remoting/protocol/session_config.cc | 12 ++---------- 4 files changed, 10 insertions(+), 32 deletions(-) (limited to 'remoting') diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc index 1ff3b48..0fa7ccb 100644 --- a/remoting/protocol/jingle_session.cc +++ b/remoting/protocol/jingle_session.cc @@ -34,8 +34,6 @@ namespace { const char kControlChannelName[] = "control"; const char kEventChannelName[] = "event"; const char kVideoChannelName[] = "video"; -const char kVideoRtpChannelName[] = "videortp"; -const char kVideoRtcpChannelName[] = "videortcp"; const int kMasterKeyLength = 16; const int kChannelKeyLength = 16; @@ -163,8 +161,6 @@ void JingleSession::CloseInternal(int result, bool failed) { control_channel_socket_.reset(); event_channel_socket_.reset(); video_channel_socket_.reset(); - video_rtp_channel_socket_.reset(); - video_rtcp_channel_socket_.reset(); STLDeleteContainerPairSecondPointers(channel_connectors_.begin(), channel_connectors_.end()); @@ -235,12 +231,14 @@ net::Socket* JingleSession::video_channel() { net::Socket* JingleSession::video_rtp_channel() { DCHECK(CalledOnValidThread()); - return video_rtp_channel_socket_.get(); + NOTREACHED(); + return NULL; } net::Socket* JingleSession::video_rtcp_channel() { DCHECK(CalledOnValidThread()); - return video_rtcp_channel_socket_.get(); + NOTREACHED(); + return NULL; } const std::string& JingleSession::jid() { @@ -427,7 +425,7 @@ bool JingleSession::InitializeConfigFromDescription( } scoped_ptr config( - content_description->config()->GetFinalConfig()); + content_description->config()->GetFinalConfig()); if (!config.get()) { LOG(ERROR) << "Connection response does not specify configuration"; return false; @@ -515,12 +513,6 @@ void JingleSession::CreateChannels() { CreateStreamChannel(kControlChannelName, stream_callback); CreateStreamChannel(kEventChannelName, stream_callback); CreateStreamChannel(kVideoChannelName, stream_callback); - - DatagramChannelCallback datagram_callback( - base::Bind(&JingleSession::OnChannelConnected, - base::Unretained(this))); - CreateDatagramChannel(kVideoRtpChannelName, datagram_callback); - CreateDatagramChannel(kVideoRtcpChannelName, datagram_callback); } void JingleSession::OnStreamChannelConnected(const std::string& name, @@ -543,17 +535,12 @@ void JingleSession::OnChannelConnected(const std::string& name, event_channel_socket_.reset(socket); } else if (name == kVideoChannelName) { video_channel_socket_.reset(socket); - } else if (name == kVideoRtpChannelName) { - video_rtp_channel_socket_.reset(socket); - } else if (name == kVideoRtcpChannelName) { - video_rtcp_channel_socket_.reset(socket); } else { NOTREACHED(); } if (control_channel_socket_.get() && event_channel_socket_.get() && - video_channel_socket_.get() && video_rtp_channel_socket_.get() && - video_rtcp_channel_socket_.get()) { + video_channel_socket_.get()) { // TODO(sergeyu): State should be set to CONNECTED in OnAccept // independent of the channels state. SetState(CONNECTED); diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h index e91a45c..6cb15f2 100644 --- a/remoting/protocol/jingle_session.h +++ b/remoting/protocol/jingle_session.h @@ -186,8 +186,6 @@ class JingleSession : public protocol::Session, scoped_ptr control_channel_socket_; scoped_ptr event_channel_socket_; scoped_ptr video_channel_socket_; - scoped_ptr video_rtp_channel_socket_; - scoped_ptr video_rtcp_channel_socket_; ScopedRunnableMethodFactory task_factory_; diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc index 9c155de2..1d09521 100644 --- a/remoting/protocol/jingle_session_unittest.cc +++ b/remoting/protocol/jingle_session_unittest.cc @@ -723,7 +723,8 @@ TEST_F(JingleSessionTest, TestEventChannel) { } // Verify that data can be transmitted over the video RTP channel. -TEST_F(JingleSessionTest, TestVideoRtpChannel) { +// Disabled because RTP support is disabled, see crbug.com/91538 . +TEST_F(JingleSessionTest, DISABLED_TestVideoRtpChannel) { CreateServerPair(); ASSERT_TRUE(InitiateConnection(kTestSharedSecret)); scoped_refptr tester( diff --git a/remoting/protocol/session_config.cc b/remoting/protocol/session_config.cc index db4f071..c173418 100644 --- a/remoting/protocol/session_config.cc +++ b/remoting/protocol/session_config.cc @@ -89,7 +89,7 @@ SessionConfig* SessionConfig::CreateDefault() { ChannelConfig::CODEC_UNDEFINED)); result->SetVideoConfig(ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kDefaultStreamVersion, - ChannelConfig::CODEC_ZIP)); + ChannelConfig::CODEC_VP8)); return result; } @@ -111,6 +111,7 @@ SessionConfig* CandidateSessionConfig::Select( ChannelConfig control_config; ChannelConfig event_config; ChannelConfig video_config; + if (!SelectCommonChannelConfig( control_configs_, client_config->control_configs_, &control_config) || !SelectCommonChannelConfig( @@ -213,18 +214,9 @@ CandidateSessionConfig* CandidateSessionConfig::CreateDefault() { ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kDefaultStreamVersion, ChannelConfig::CODEC_UNDEFINED)); - - result->mutable_video_configs()->push_back( - ChannelConfig(ChannelConfig::TRANSPORT_STREAM, - kDefaultStreamVersion, - ChannelConfig::CODEC_VP8)); result->mutable_video_configs()->push_back( ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kDefaultStreamVersion, - ChannelConfig::CODEC_ZIP)); - result->mutable_video_configs()->push_back( - ChannelConfig(ChannelConfig::TRANSPORT_SRTP, - kDefaultStreamVersion, ChannelConfig::CODEC_VP8)); return result; } -- cgit v1.1