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

Unified Diff: remoting/client/audio_decode_scheduler.h

Issue 10843031: Piping for audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed an #include to a forward declaration 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
Index: remoting/client/audio_decode_scheduler.h
diff --git a/remoting/client/audio_decode_scheduler.h b/remoting/client/audio_decode_scheduler.h
new file mode 100644
index 0000000000000000000000000000000000000000..db1fafe26e51f81fd623716371e8f69282f045c6
--- /dev/null
+++ b/remoting/client/audio_decode_scheduler.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
+#define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "remoting/protocol/audio_stub.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace remoting {
+
+namespace protocol {
+class SessionConfig;
+} // namespace protocol
+
+class AudioDecoder;
+class AudioPacket;
+class AudioPlayer;
+
+class AudioDecodeScheduler : public protocol::AudioStub {
+ public:
+ AudioDecodeScheduler(
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner,
+ scoped_ptr<AudioPlayer> audio_player);
+ ~AudioDecodeScheduler();
+
+ // Initializes decoder with the information from the protocol config.
+ void Initialize(const protocol::SessionConfig& config);
+
+ // AudioStub implementation.
+ virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
+ const base::Closure& done) OVERRIDE;
+
+ private:
+ void DecodePacket(scoped_ptr<AudioPacket> packet, const base::Closure& done);
Sergey Ulanov 2012/08/03 17:59:55 please add some short comments for this and then e
kxing 2012/08/03 20:55:13 Done.
+
+ void ProcessDecodedPacket(scoped_ptr<AudioPacket> packet);
+
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner_;
+ scoped_ptr<AudioDecoder> decoder_;
+ scoped_ptr<AudioPlayer> audio_player_;
+
+ DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_

Powered by Google App Engine
This is Rietveld 408576698