| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 class VideoWriter : public VideoStub { | 27 class VideoWriter : public VideoStub { |
| 28 public: | 28 public: |
| 29 virtual ~VideoWriter(); | 29 virtual ~VideoWriter(); |
| 30 | 30 |
| 31 // The callback is called when initialization is finished. The | 31 // The callback is called when initialization is finished. The |
| 32 // parameter is set to true on success. | 32 // parameter is set to true on success. |
| 33 typedef base::Callback<void(bool)> InitializedCallback; | 33 typedef base::Callback<void(bool)> InitializedCallback; |
| 34 | 34 |
| 35 static VideoWriter* Create(base::MessageLoopProxy* message_loop, | 35 static VideoWriter* Create(base::MessageLoopProxy* message_loop, |
| 36 const SessionConfig* config); | 36 const SessionConfig& config); |
| 37 | 37 |
| 38 // Initializes the writer. | 38 // Initializes the writer. |
| 39 virtual void Init(Session* session, const InitializedCallback& callback) = 0; | 39 virtual void Init(Session* session, const InitializedCallback& callback) = 0; |
| 40 | 40 |
| 41 // Stops writing. Must be called on the network thread before this | 41 // Stops writing. Must be called on the network thread before this |
| 42 // object is destroyed. | 42 // object is destroyed. |
| 43 virtual void Close() = 0; | 43 virtual void Close() = 0; |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 VideoWriter() { } | 46 VideoWriter() { } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 DISALLOW_COPY_AND_ASSIGN(VideoWriter); | 49 DISALLOW_COPY_AND_ASSIGN(VideoWriter); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace protocol | 52 } // namespace protocol |
| 53 } // namespace remoting | 53 } // namespace remoting |
| 54 | 54 |
| 55 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ | 55 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
| OLD | NEW |