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 24 matching lines...) Expand all Loading... |
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 // Returns true if the channel is connected. |
| 46 virtual bool is_connected() = 0; |
| 47 |
45 protected: | 48 protected: |
46 VideoWriter() { } | 49 VideoWriter() { } |
47 | 50 |
48 private: | 51 private: |
49 DISALLOW_COPY_AND_ASSIGN(VideoWriter); | 52 DISALLOW_COPY_AND_ASSIGN(VideoWriter); |
50 }; | 53 }; |
51 | 54 |
52 } // namespace protocol | 55 } // namespace protocol |
53 } // namespace remoting | 56 } // namespace remoting |
54 | 57 |
55 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ | 58 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ |
OLD | NEW |