Index: remoting/protocol/webrtc_connection_to_client.cc |
diff --git a/remoting/protocol/webrtc_connection_to_client.cc b/remoting/protocol/webrtc_connection_to_client.cc |
index 895ee3403597fbd17ad7310dee0e2e3e36df4297..be663ab88605cff06a7995bf4fb80307fb0e0228 100644 |
--- a/remoting/protocol/webrtc_connection_to_client.cc |
+++ b/remoting/protocol/webrtc_connection_to_client.cc |
@@ -21,6 +21,7 @@ |
#include "remoting/protocol/input_stub.h" |
#include "remoting/protocol/message_pipe.h" |
#include "remoting/protocol/transport_context.h" |
+#include "remoting/protocol/webrtc_audio_stream.h" |
#include "remoting/protocol/webrtc_transport.h" |
#include "remoting/protocol/webrtc_video_stream.h" |
#include "third_party/webrtc/api/mediastreaminterface.h" |
@@ -37,13 +38,15 @@ namespace protocol { |
WebrtcConnectionToClient::WebrtcConnectionToClient( |
std::unique_ptr<protocol::Session> session, |
scoped_refptr<protocol::TransportContext> transport_context, |
- scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner) |
+ scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) |
: transport_( |
new WebrtcTransport(jingle_glue::JingleThreadWrapper::current(), |
transport_context, |
this)), |
session_(std::move(session)), |
video_encode_task_runner_(video_encode_task_runner), |
+ audio_task_runner_(audio_task_runner), |
control_dispatcher_(new HostControlDispatcher()), |
event_dispatcher_(new HostEventDispatcher()), |
weak_factory_(this) { |
@@ -84,8 +87,12 @@ std::unique_ptr<VideoStream> WebrtcConnectionToClient::StartVideoStream( |
std::unique_ptr<AudioStream> WebrtcConnectionToClient::StartAudioStream( |
std::unique_ptr<AudioSource> audio_source) { |
- NOTIMPLEMENTED(); |
- return nullptr; |
+ std::unique_ptr<WebrtcAudioStream> stream(new WebrtcAudioStream()); |
+ if (!stream->Start(audio_task_runner_, std::move(audio_source), |
+ transport_.get())) { |
+ return nullptr; |
Jamie
2016/10/04 23:36:06
Do we get an error log in Start()? If not then ple
Sergey Ulanov
2016/10/05 21:52:23
Actually Start() is not expected to fail. Updated
|
+ } |
+ return std::move(stream); |
} |
// Return pointer to ClientStub. |