OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // VideoWriter is a generic interface for a video stream writer. RtpVideoWriter |
| 6 // and ProtobufVideoWriter implement this interface for RTP and protobuf video |
| 7 // streams. VideoWriter is used by ConnectionToClient to write into the video |
| 8 // stream. |
| 9 |
| 10 #ifndef REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
| 11 #define REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
| 12 |
| 13 #include "base/basictypes.h" |
| 14 #include "remoting/proto/video.pb.h" |
| 15 |
| 16 namespace remoting { |
| 17 |
| 18 class ChromotocolConfig; |
| 19 class ChromotocolConnection; |
| 20 |
| 21 // TODO(sergeyu): VideoWriter should implement VideoStub interface. |
| 22 class VideoWriter { |
| 23 public: |
| 24 virtual ~VideoWriter(); |
| 25 |
| 26 static VideoWriter* Create(const ChromotocolConfig* config); |
| 27 |
| 28 // Initializes the writer. |
| 29 virtual void Init(ChromotocolConnection* connection) = 0; |
| 30 |
| 31 // Sends the |packet|. |
| 32 virtual void SendPacket(const VideoPacket& packet) = 0; |
| 33 |
| 34 // Returns number of packets currently pending in the buffer. |
| 35 virtual int GetPendingPackets() = 0; |
| 36 |
| 37 virtual void Close() = 0; |
| 38 |
| 39 protected: |
| 40 VideoWriter() { } |
| 41 |
| 42 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(VideoWriter); |
| 44 }; |
| 45 |
| 46 } // namespace remoting |
| 47 |
| 48 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
OLD | NEW |