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

Unified Diff: remoting/client/chromoting_client.cc

Issue 10843031: Piping for audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/chromoting_client.cc
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index f0dd8c79c477c216e6c5c9b1e14c1d0d599c70bc..a48ebeeb2fd39cf882ed04b3522ccdee01eb8335 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -9,6 +9,7 @@
#include "remoting/client/client_context.h"
#include "remoting/client/client_user_interface.h"
#include "remoting/client/rectangle_update_decoder.h"
+#include "remoting/codec/audio_decoder.h"
#include "remoting/proto/audio.pb.h"
#include "remoting/proto/video.pb.h"
#include "remoting/protocol/authentication_method.h"
@@ -143,7 +144,9 @@ int ChromotingClient::GetPendingVideoPackets() {
void ChromotingClient::ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
const base::Closure& done) {
- audio_player_->ProcessAudioPacket(packet.Pass());
+ scoped_ptr<AudioPacket> decoded_packet =
Sergey Ulanov 2012/08/01 17:43:54 Add DCHECK to verify that this method is called on
kxing 2012/08/01 22:15:38 Done.
+ audio_decoder_->Decode(packet.Pass());
Sergey Ulanov 2012/08/01 17:43:54 We shouldn't be decoding audio on the main plugin
kxing 2012/08/01 22:15:38 Done.
+ audio_player_->ProcessAudioPacket(decoded_packet.Pass());
done.Run();
}
@@ -217,6 +220,10 @@ void ChromotingClient::Initialize() {
// Initialize the decoder.
rectangle_decoder_->Initialize(connection_->config());
+ if (connection_->config().is_audio_enabled()) {
+ audio_decoder_.reset(
+ AudioDecoder::CreateAudioDecoder(connection_->config()).release());
+ }
}
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698