| Index: remoting/protocol/audio_reader.h
|
| diff --git a/remoting/protocol/audio_reader.h b/remoting/protocol/audio_reader.h
|
| index 2d708db939f1f89b4abcb4ea389629a6cd95f1f4..b17977c7a3e9ad2836157a9e13258af7279bdb37 100644
|
| --- a/remoting/protocol/audio_reader.h
|
| +++ b/remoting/protocol/audio_reader.h
|
| @@ -10,6 +10,7 @@
|
| #include "remoting/proto/audio.pb.h"
|
| #include "remoting/protocol/audio_stub.h"
|
| #include "remoting/protocol/message_reader.h"
|
| +#include "remoting/protocol/channel_dispatcher_base.h"
|
|
|
| namespace net {
|
| class StreamSocket;
|
| @@ -21,7 +22,7 @@ namespace protocol {
|
| class Session;
|
| class SessionConfig;
|
|
|
| -class AudioReader {
|
| +class AudioReader : public ChannelDispatcherBase {
|
| public:
|
| // The callback is called when initialization is finished. The
|
| // parameter is set to true on success.
|
| @@ -29,30 +30,21 @@ class AudioReader {
|
|
|
| virtual ~AudioReader();
|
|
|
| + void set_audio_stub(AudioStub* audio_stub) { audio_stub_ = audio_stub; }
|
| +
|
| static scoped_ptr<AudioReader> Create(const SessionConfig& config);
|
|
|
| - // Initializies the reader.
|
| - void Init(Session* session,
|
| - AudioStub* audio_stub,
|
| - const InitializedCallback& callback);
|
| - bool is_connected();
|
| + protected:
|
| + virtual void OnInitialized() OVERRIDE;
|
|
|
| private:
|
| explicit AudioReader(AudioPacket::Encoding encoding);
|
|
|
| - void OnChannelReady(scoped_ptr<net::StreamSocket> socket);
|
| void OnNewData(scoped_ptr<AudioPacket> packet,
|
| const base::Closure& done_task);
|
|
|
| - Session* session_;
|
| -
|
| - InitializedCallback initialized_callback_;
|
| -
|
| AudioPacket::Encoding encoding_;
|
|
|
| - // TODO(sergeyu): Remove |channel_| and let |reader_| own it.
|
| - scoped_ptr<net::StreamSocket> channel_;
|
| -
|
| ProtobufMessageReader<AudioPacket> reader_;
|
|
|
| // The stub that processes all received packets.
|
|
|