OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "remoting/client/jni/chromoting_jni_instance.h" | 5 #include "remoting/client/jni/chromoting_jni_instance.h" |
6 | 6 |
7 #include <android/log.h> | 7 #include <android/log.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 client_.reset(new ChromotingClient( | 326 client_.reset(new ChromotingClient( |
327 client_config_, client_context_.get(), connection_.get(), | 327 client_config_, client_context_.get(), connection_.get(), |
328 this, video_renderer_.get(), scoped_ptr<AudioPlayer>())); | 328 this, video_renderer_.get(), scoped_ptr<AudioPlayer>())); |
329 | 329 |
330 | 330 |
331 signaling_.reset(new XmppSignalStrategy( | 331 signaling_.reset(new XmppSignalStrategy( |
332 net::ClientSocketFactory::GetDefaultFactory(), | 332 net::ClientSocketFactory::GetDefaultFactory(), |
333 jni_runtime_->url_requester(), xmpp_config_)); | 333 jni_runtime_->url_requester(), xmpp_config_)); |
334 | 334 |
335 NetworkSettings network_settings(NetworkSettings::NAT_TRAVERSAL_FULL); | 335 NetworkSettings network_settings(NetworkSettings::NAT_TRAVERSAL_ENABLED); |
336 | 336 |
337 // Use Chrome's network stack to allocate ports for peer-to-peer channels. | 337 // Use Chrome's network stack to allocate ports for peer-to-peer channels. |
338 scoped_ptr<ChromiumPortAllocator> port_allocator( | 338 scoped_ptr<ChromiumPortAllocator> port_allocator( |
339 ChromiumPortAllocator::Create(jni_runtime_->url_requester(), | 339 ChromiumPortAllocator::Create(jni_runtime_->url_requester(), |
340 network_settings)); | 340 network_settings)); |
341 | 341 |
342 scoped_ptr<protocol::TransportFactory> transport_factory( | 342 scoped_ptr<protocol::TransportFactory> transport_factory( |
343 new protocol::LibjingleTransportFactory( | 343 new protocol::LibjingleTransportFactory( |
344 signaling_.get(), | 344 signaling_.get(), |
345 port_allocator.PassAs<cricket::HttpPortAllocatorBase>(), | 345 port_allocator.PassAs<cricket::HttpPortAllocatorBase>(), |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 stats->video_decode_ms()->Average(), | 419 stats->video_decode_ms()->Average(), |
420 stats->video_paint_ms()->Average(), | 420 stats->video_paint_ms()->Average(), |
421 stats->round_trip_ms()->Average()); | 421 stats->round_trip_ms()->Average()); |
422 | 422 |
423 jni_runtime_->network_task_runner()->PostDelayedTask( | 423 jni_runtime_->network_task_runner()->PostDelayedTask( |
424 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), | 424 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), |
425 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); | 425 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); |
426 } | 426 } |
427 | 427 |
428 } // namespace remoting | 428 } // namespace remoting |
OLD | NEW |