Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1920)

Unified Diff: remoting/host/chromoting_host_context.cc

Issue 10914029: Use a separate thread for audio capturing and encoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/chromoting_host_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_context.cc
diff --git a/remoting/host/chromoting_host_context.cc b/remoting/host/chromoting_host_context.cc
index 480de732922a9282de5dac6a984b884150f6f2ec..b1105676cfd743ba251712d83e8deb446428ec65 100644
--- a/remoting/host/chromoting_host_context.cc
+++ b/remoting/host/chromoting_host_context.cc
@@ -17,6 +17,7 @@ ChromotingHostContext::ChromotingHostContext(
: network_thread_("ChromotingNetworkThread"),
capture_thread_("ChromotingCaptureThread"),
encode_thread_("ChromotingEncodeThread"),
+ audio_thread_("ChromotingAudioThread"),
desktop_thread_("ChromotingDesktopThread"),
file_thread_("ChromotingFileIOThread"),
ui_task_runner_(ui_task_runner) {
@@ -28,6 +29,8 @@ ChromotingHostContext::~ChromotingHostContext() {
bool ChromotingHostContext::Start() {
// Start all the threads.
bool started = capture_thread_.Start() && encode_thread_.Start() &&
+ audio_thread_.StartWithOptions(base::Thread::Options(
+ MessageLoop::TYPE_IO, 0)) &&
network_thread_.StartWithOptions(base::Thread::Options(
MessageLoop::TYPE_IO, 0)) &&
desktop_thread_.Start() &&
@@ -50,6 +53,10 @@ base::SingleThreadTaskRunner* ChromotingHostContext::encode_task_runner() {
return encode_thread_.message_loop_proxy();
}
+base::SingleThreadTaskRunner* ChromotingHostContext::audio_task_runner() {
+ return audio_thread_.message_loop_proxy();
+}
+
base::SingleThreadTaskRunner* ChromotingHostContext::network_task_runner() {
return network_thread_.message_loop_proxy();
}
« no previous file with comments | « remoting/host/chromoting_host_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698