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

Side by Side Diff: remoting/client/chromoting_client.cc

Issue 10795066: Support for both 44.1 kHz and 48 kHz on the client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small cleanup Created 8 years, 5 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
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/client/chromoting_client.h" 5 #include "remoting/client/chromoting_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/client/audio_player.h" 8 #include "remoting/client/audio_player.h"
9 #include "remoting/client/client_context.h" 9 #include "remoting/client/client_context.h"
10 #include "remoting/client/client_user_interface.h" 10 #include "remoting/client/client_user_interface.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 int ChromotingClient::GetPendingVideoPackets() { 139 int ChromotingClient::GetPendingVideoPackets() {
140 DCHECK(task_runner_->BelongsToCurrentThread()); 140 DCHECK(task_runner_->BelongsToCurrentThread());
141 return received_packets_.size(); 141 return received_packets_.size();
142 } 142 }
143 143
144 void ChromotingClient::ProcessAudioPacket(scoped_ptr<AudioPacket> packet, 144 void ChromotingClient::ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
145 const base::Closure& done) { 145 const base::Closure& done) {
146 audio_player_->ProcessAudioPacket(packet.Pass()); 146 audio_player_->ProcessAudioPacket(packet.Pass());
147 if (!audio_player_->IsRunning() && connection_->config().is_audio_enabled())
148 audio_player_->Start();
149 done.Run(); 147 done.Run();
150 } 148 }
151 149
152 void ChromotingClient::DispatchPacket() { 150 void ChromotingClient::DispatchPacket() {
153 DCHECK(task_runner_->BelongsToCurrentThread()); 151 DCHECK(task_runner_->BelongsToCurrentThread());
154 CHECK(!packet_being_processed_); 152 CHECK(!packet_being_processed_);
155 153
156 if (received_packets_.empty()) { 154 if (received_packets_.empty()) {
157 // Nothing to do! 155 // Nothing to do!
158 return; 156 return;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 213 }
216 214
217 void ChromotingClient::Initialize() { 215 void ChromotingClient::Initialize() {
218 DCHECK(task_runner_->BelongsToCurrentThread()); 216 DCHECK(task_runner_->BelongsToCurrentThread());
219 217
220 // Initialize the decoder. 218 // Initialize the decoder.
221 rectangle_decoder_->Initialize(connection_->config()); 219 rectangle_decoder_->Initialize(connection_->config());
222 } 220 }
223 221
224 } // namespace remoting 222 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698