| Index: remoting/protocol/video_writer.h
|
| diff --git a/remoting/protocol/video_writer.h b/remoting/protocol/video_writer.h
|
| index 06bc4694717ad828c89dd7cd8941be62750b0389..79c8e971cac809ba461cc6e7f2ea93b3f7c90e88 100644
|
| --- a/remoting/protocol/video_writer.h
|
| +++ b/remoting/protocol/video_writer.h
|
| @@ -2,47 +2,33 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -// VideoWriter is a generic interface used by ConnectionToClient to
|
| -// write into the video stream. ProtobufVideoWriter implements this
|
| -// interface for protobuf video streams.
|
| -
|
| #ifndef REMOTING_PROTOCOL_VIDEO_WRITER_H_
|
| #define REMOTING_PROTOCOL_VIDEO_WRITER_H_
|
|
|
| -#include "base/basictypes.h"
|
| -#include "base/callback.h"
|
| +#include <string>
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "remoting/protocol/buffered_socket_writer.h"
|
| +#include "remoting/protocol/channel_dispatcher_base.h"
|
| #include "remoting/protocol/video_stub.h"
|
|
|
| namespace remoting {
|
| namespace protocol {
|
|
|
| -class Session;
|
| -class SessionConfig;
|
| -
|
| -class VideoWriter : public VideoStub {
|
| +class VideoWriter : public ChannelDispatcherBase, public VideoStub {
|
| public:
|
| + VideoWriter();
|
| virtual ~VideoWriter();
|
|
|
| - // The callback is called when initialization is finished. The
|
| - // parameter is set to true on success.
|
| - typedef base::Callback<void(bool)> InitializedCallback;
|
| -
|
| - static scoped_ptr<VideoWriter> Create(const SessionConfig& config);
|
| + // VideoStub interface.
|
| + virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
|
| + const base::Closure& done) OVERRIDE;
|
|
|
| - // Initializes the writer.
|
| - virtual void Init(Session* session, const InitializedCallback& callback) = 0;
|
| -
|
| - // Stops writing. Must be called on the network thread before this
|
| - // object is destroyed.
|
| - virtual void Close() = 0;
|
| -
|
| - // Returns true if the channel is connected.
|
| - virtual bool is_connected() = 0;
|
| + private:
|
| + void OnInitialized();
|
|
|
| - protected:
|
| - VideoWriter() { }
|
| + BufferedSocketWriter buffered_writer_;
|
|
|
| - private:
|
| DISALLOW_COPY_AND_ASSIGN(VideoWriter);
|
| };
|
|
|
|
|