Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // VideoWriter is a generic interface for a video stream writer. RtpVideoWriter | 5 // VideoWriter is a generic interface for a video stream writer. RtpVideoWriter |
| 6 // and ProtobufVideoWriter implement this interface for RTP and protobuf video | 6 // and ProtobufVideoWriter implement this interface for RTP and protobuf video |
| 7 // streams. VideoWriter is used by ConnectionToClient to write into the video | 7 // streams. VideoWriter is used by ConnectionToClient to write into the video |
| 8 // stream. | 8 // stream. |
| 9 | 9 |
| 10 #ifndef REMOTING_PROTOCOL_VIDEO_WRITER_H_ | 10 #ifndef REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
| 11 #define REMOTING_PROTOCOL_VIDEO_WRITER_H_ | 11 #define REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "remoting/protocol/video_stub.h" | 14 #include "remoting/protocol/video_stub.h" |
| 15 | 15 |
| 16 namespace remoting { | 16 namespace remoting { |
| 17 namespace protocol { | 17 namespace protocol { |
| 18 | 18 |
| 19 class Session; | 19 class Session; |
| 20 class SessionConfig; | 20 class SessionConfig; |
| 21 | 21 |
| 22 // TODO(sergeyu): VideoWriter should implement VideoStub interface. | 22 // TODO(sergeyu): VideoWriter should implement VideoStub interface. |
|
Wez
2011/06/30 21:01:29
nit: Comment is out of date?
Sergey Ulanov
2011/06/30 21:17:22
Done.
| |
| 23 class VideoWriter : public VideoStub { | 23 class VideoWriter : public VideoStub { |
| 24 public: | 24 public: |
| 25 virtual ~VideoWriter(); | 25 virtual ~VideoWriter(); |
| 26 | 26 |
| 27 static VideoWriter* Create(const SessionConfig* config); | 27 static VideoWriter* Create(const SessionConfig* config); |
| 28 | 28 |
| 29 // Initializes the writer. | 29 // Initializes the writer. |
| 30 virtual void Init(Session* session) = 0; | 30 virtual void Init(Session* session) = 0; |
| 31 | 31 |
| 32 // Stops writing. Must be called on the network thread before this | |
| 33 // object is destroyed. | |
| 34 virtual void Close() = 0; | |
| 35 | |
| 32 protected: | 36 protected: |
| 33 VideoWriter() { } | 37 VideoWriter() { } |
| 34 | 38 |
| 35 private: | 39 private: |
| 36 DISALLOW_COPY_AND_ASSIGN(VideoWriter); | 40 DISALLOW_COPY_AND_ASSIGN(VideoWriter); |
| 37 }; | 41 }; |
| 38 | 42 |
| 39 } // namespace protocol | 43 } // namespace protocol |
| 40 } // namespace remoting | 44 } // namespace remoting |
| 41 | 45 |
| 42 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ | 46 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
| OLD | NEW |