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

Unified Diff: remoting/protocol/connection_to_host.h

Issue 2384063004: Move audio decoding to protocol layer (Closed)
Patch Set: Created 4 years, 2 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/protocol/connection_to_host.h
diff --git a/remoting/protocol/connection_to_host.h b/remoting/protocol/connection_to_host.h
index 4a8d537b2580fbdd5f0a9a6ce4c23981c0eab4a6..2f894ad5a33ba3fe49511edc7a36e3ff014f201e 100644
--- a/remoting/protocol/connection_to_host.h
+++ b/remoting/protocol/connection_to_host.h
@@ -9,8 +9,13 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "remoting/protocol/errors.h"
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
namespace remoting {
namespace protocol {
@@ -71,8 +76,13 @@ class ConnectionToHost {
virtual void set_client_stub(ClientStub* client_stub) = 0;
virtual void set_clipboard_stub(ClipboardStub* clipboard_stub) = 0;
virtual void set_video_renderer(VideoRenderer* video_renderer) = 0;
- // If no audio stub is specified then audio will not be requested.
- virtual void set_audio_stub(AudioStub* audio_stub) = 0;
+
+ // Initializes audio stream. Must be called before Connect().
+ // |audio_decode_task_runner| will be used for audio decoding. |audio_stub|
+ // will be called on the main thread.
+ virtual void InitializeAudio(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner,
+ base::WeakPtr<AudioStub> audio_stub) = 0;
// Initiates a connection using |session|. |event_callback| will be notified
// of changes in the state of the connection and must outlive the

Powered by Google App Engine
This is Rietveld 408576698