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

Side by Side Diff: remoting/host/chromoting_host.cc

Issue 10907041: Implement Linux audio capturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/audio_capturer_win.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "remoting/base/constants.h" 12 #include "remoting/base/constants.h"
13 #include "remoting/codec/audio_encoder.h" 13 #include "remoting/codec/audio_encoder.h"
14 #include "remoting/codec/audio_encoder_speex.h" 14 #include "remoting/codec/audio_encoder_speex.h"
15 #include "remoting/codec/audio_encoder_verbatim.h" 15 #include "remoting/codec/audio_encoder_verbatim.h"
16 #include "remoting/codec/video_encoder.h" 16 #include "remoting/codec/video_encoder.h"
17 #include "remoting/codec/video_encoder_row_based.h" 17 #include "remoting/codec/video_encoder_row_based.h"
18 #include "remoting/codec/video_encoder_vp8.h" 18 #include "remoting/codec/video_encoder_vp8.h"
19 #include "remoting/host/audio_capturer.h"
19 #include "remoting/host/audio_scheduler.h" 20 #include "remoting/host/audio_scheduler.h"
20 #include "remoting/host/chromoting_host_context.h" 21 #include "remoting/host/chromoting_host_context.h"
21 #include "remoting/host/desktop_environment.h" 22 #include "remoting/host/desktop_environment.h"
22 #include "remoting/host/event_executor.h" 23 #include "remoting/host/event_executor.h"
23 #include "remoting/host/host_config.h" 24 #include "remoting/host/host_config.h"
24 #include "remoting/host/screen_recorder.h" 25 #include "remoting/host/screen_recorder.h"
25 #include "remoting/protocol/connection_to_client.h" 26 #include "remoting/protocol/connection_to_client.h"
26 #include "remoting/protocol/client_stub.h" 27 #include "remoting/protocol/client_stub.h"
27 #include "remoting/protocol/host_stub.h" 28 #include "remoting/protocol/host_stub.h"
28 #include "remoting/protocol/input_stub.h" 29 #include "remoting/protocol/input_stub.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 state_(kInitial), 77 state_(kInitial),
77 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()), 78 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()),
78 login_backoff_(&kDefaultBackoffPolicy), 79 login_backoff_(&kDefaultBackoffPolicy),
79 authenticating_client_(false), 80 authenticating_client_(false),
80 reject_authenticating_client_(false) { 81 reject_authenticating_client_(false) {
81 DCHECK(context_); 82 DCHECK(context_);
82 DCHECK(signal_strategy); 83 DCHECK(signal_strategy);
83 DCHECK(desktop_environment_); 84 DCHECK(desktop_environment_);
84 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); 85 DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
85 86
86 if (!desktop_environment_->audio_capturer()) { 87 if (!AudioCapturer::IsSupported()) {
87 // Disable audio by replacing our list of supported audio configurations 88 // Disable audio by replacing our list of supported audio configurations
88 // with the NONE config. 89 // with the NONE config.
89 protocol_config_->mutable_audio_configs()->clear(); 90 protocol_config_->mutable_audio_configs()->clear();
90 protocol_config_->mutable_audio_configs()->push_back( 91 protocol_config_->mutable_audio_configs()->push_back(
91 protocol::ChannelConfig()); 92 protocol::ChannelConfig());
92 } 93 }
93 } 94 }
94 95
95 ChromotingHost::~ChromotingHost() { 96 ChromotingHost::~ChromotingHost() {
96 DCHECK(clients_.empty()); 97 DCHECK(clients_.empty());
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 OnShutdown()); 505 OnShutdown());
505 506
506 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); 507 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin();
507 it != shutdown_tasks_.end(); ++it) { 508 it != shutdown_tasks_.end(); ++it) {
508 it->Run(); 509 it->Run();
509 } 510 }
510 shutdown_tasks_.clear(); 511 shutdown_tasks_.clear();
511 } 512 }
512 513
513 } // namespace remoting 514 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/audio_capturer_win.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698