OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/client_context.h" | 5 #include "remoting/client/client_context.h" |
6 | 6 |
7 namespace remoting { | 7 namespace remoting { |
8 | 8 |
9 ClientContext::ClientContext(base::SingleThreadTaskRunner* main_task_runner) | 9 ClientContext::ClientContext(base::SingleThreadTaskRunner* main_task_runner) |
10 : main_task_runner_(main_task_runner), | 10 : main_task_runner_(main_task_runner), |
11 decode_thread_("ChromotingClientDecodeThread") { | 11 decode_thread_("ChromotingClientDecodeThread"), |
Wez
2012/08/07 18:29:05
nit: ChromotingClientVideoDecodeThread, etc
| |
12 audio_decode_thread_("ChromotingClientAudioDecodeThread") { | |
12 } | 13 } |
13 | 14 |
14 ClientContext::~ClientContext() { | 15 ClientContext::~ClientContext() { |
15 } | 16 } |
16 | 17 |
17 void ClientContext::Start() { | 18 void ClientContext::Start() { |
18 // Start all the threads. | 19 // Start all the threads. |
19 decode_thread_.Start(); | 20 decode_thread_.Start(); |
21 audio_decode_thread_.Start(); | |
20 } | 22 } |
21 | 23 |
22 void ClientContext::Stop() { | 24 void ClientContext::Stop() { |
23 // Stop all the threads. | 25 // Stop all the threads. |
24 decode_thread_.Stop(); | 26 decode_thread_.Stop(); |
27 audio_decode_thread_.Stop(); | |
25 } | 28 } |
26 | 29 |
27 base::SingleThreadTaskRunner* ClientContext::main_task_runner() { | 30 base::SingleThreadTaskRunner* ClientContext::main_task_runner() { |
28 return main_task_runner_; | 31 return main_task_runner_; |
29 } | 32 } |
30 | 33 |
31 base::SingleThreadTaskRunner* ClientContext::decode_task_runner() { | 34 base::SingleThreadTaskRunner* ClientContext::decode_task_runner() { |
32 return decode_thread_.message_loop_proxy(); | 35 return decode_thread_.message_loop_proxy(); |
33 } | 36 } |
34 | 37 |
38 base::SingleThreadTaskRunner* ClientContext::audio_decode_task_runner() { | |
39 return audio_decode_thread_.message_loop_proxy(); | |
40 } | |
41 | |
35 } // namespace remoting | 42 } // namespace remoting |
OLD | NEW |