OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 408 } |
409 | 409 |
410 // TODO(sergeyu): Move this to SessionManager? | 410 // TODO(sergeyu): Move this to SessionManager? |
411 Encoder* ChromotingHost::CreateEncoder(const protocol::SessionConfig* config) { | 411 Encoder* ChromotingHost::CreateEncoder(const protocol::SessionConfig* config) { |
412 const protocol::ChannelConfig& video_config = config->video_config(); | 412 const protocol::ChannelConfig& video_config = config->video_config(); |
413 | 413 |
414 if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { | 414 if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { |
415 return EncoderRowBased::CreateVerbatimEncoder(); | 415 return EncoderRowBased::CreateVerbatimEncoder(); |
416 } else if (video_config.codec == protocol::ChannelConfig::CODEC_ZIP) { | 416 } else if (video_config.codec == protocol::ChannelConfig::CODEC_ZIP) { |
417 return EncoderRowBased::CreateZlibEncoder(); | 417 return EncoderRowBased::CreateZlibEncoder(); |
418 } | 418 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) { |
419 // TODO(sergeyu): Enable VP8 on ARM builds. | |
420 #if !defined(ARCH_CPU_ARM_FAMILY) | |
421 else if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) { | |
422 return new remoting::EncoderVp8(); | 419 return new remoting::EncoderVp8(); |
423 } | 420 } |
424 #endif | |
425 | 421 |
426 return NULL; | 422 return NULL; |
427 } | 423 } |
428 | 424 |
429 std::string ChromotingHost::GenerateHostAuthToken( | 425 std::string ChromotingHost::GenerateHostAuthToken( |
430 const std::string& encoded_client_token) { | 426 const std::string& encoded_client_token) { |
431 // TODO(ajwong): Return the signature of this instead. | 427 // TODO(ajwong): Return the signature of this instead. |
432 return encoded_client_token; | 428 return encoded_client_token; |
433 } | 429 } |
434 | 430 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 | 599 |
604 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); | 600 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); |
605 it != shutdown_tasks_.end(); ++it) { | 601 it != shutdown_tasks_.end(); ++it) { |
606 (*it)->Run(); | 602 (*it)->Run(); |
607 delete *it; | 603 delete *it; |
608 } | 604 } |
609 shutdown_tasks_.clear(); | 605 shutdown_tasks_.clear(); |
610 } | 606 } |
611 | 607 |
612 } // namespace remoting | 608 } // namespace remoting |
OLD | NEW |