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 // This is an application of a minimal host process in a Chromoting | 5 // This is an application of a minimal host process in a Chromoting |
6 // system. It serves the purpose of gluing different pieces together | 6 // system. It serves the purpose of gluing different pieces together |
7 // to make a functional host process for testing. | 7 // to make a functional host process for testing. |
8 // | 8 // |
9 // It peforms the following functionality: | 9 // It peforms the following functionality: |
10 // 1. Connect to the GTalk network and register the machine as a host. | 10 // 1. Connect to the GTalk network and register the machine as a host. |
11 // 2. Accepts connection through libjingle. | 11 // 2. Accepts connection through libjingle. |
12 // 3. Receive mouse / keyboard events through libjingle. | 12 // 3. Receive mouse / keyboard events through libjingle. |
13 // 4. Sends screen capture through libjingle. | 13 // 4. Sends screen capture through libjingle. |
14 | 14 |
15 #include <stdlib.h> | 15 #include <stdlib.h> |
16 | 16 |
17 #include <iostream> | 17 #include <ostream> |
18 #include <string> | 18 #include <string> |
19 | 19 |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 | 21 |
22 #include "base/at_exit.h" | 22 #include "base/at_exit.h" |
23 #include "base/bind.h" | 23 #include "base/bind.h" |
24 #include "base/callback.h" | 24 #include "base/callback.h" |
25 #include "base/command_line.h" | 25 #include "base/command_line.h" |
26 #include "base/environment.h" | 26 #include "base/environment.h" |
27 #include "base/file_path.h" | 27 #include "base/file_path.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 LOG(ERROR) << "Unknown video codec: " << video_codec; | 309 LOG(ERROR) << "Unknown video codec: " << video_codec; |
310 return 1; | 310 return 1; |
311 } | 311 } |
312 config->mutable_video_configs()->push_back(ChannelConfig( | 312 config->mutable_video_configs()->push_back(ChannelConfig( |
313 transport, remoting::protocol::kDefaultStreamVersion, codec)); | 313 transport, remoting::protocol::kDefaultStreamVersion, codec)); |
314 simple_host.set_protocol_config(config.release()); | 314 simple_host.set_protocol_config(config.release()); |
315 } | 315 } |
316 | 316 |
317 return simple_host.Run(); | 317 return simple_host.Run(); |
318 } | 318 } |
OLD | NEW |