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 // VideoReader is a generic interface for a video stream reader. RtpVideoReader | 5 // VideoReader is a generic interface for a video stream reader. RtpVideoReader |
6 // and ProtobufVideoReader implement this interface for RTP and protobuf video | 6 // and ProtobufVideoReader implement this interface for RTP and protobuf video |
7 // streams. VideoReader is used by ConnectionToHost to read video stream. | 7 // streams. VideoReader is used by ConnectionToHost to read video stream. |
8 | 8 |
9 #ifndef REMOTING_PROTOCOL_VIDEO_READER_H_ | 9 #ifndef REMOTING_PROTOCOL_VIDEO_READER_H_ |
10 #define REMOTING_PROTOCOL_VIDEO_READER_H_ | 10 #define REMOTING_PROTOCOL_VIDEO_READER_H_ |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "remoting/protocol/video_stub.h" | 13 #include "remoting/protocol/video_stub.h" |
14 | 14 |
15 namespace remoting { | 15 namespace remoting { |
16 | 16 |
17 namespace protocol { | |
18 class Session; | |
19 } // namespace protocol | |
20 | |
21 class ChromotocolConfig; | |
22 class ChromotocolConnection; | 17 class ChromotocolConnection; |
23 | 18 |
24 namespace protocol { | 19 namespace protocol { |
25 | 20 |
| 21 class Session; |
| 22 class SessionConfig; |
| 23 |
26 class VideoReader { | 24 class VideoReader { |
27 public: | 25 public: |
28 static VideoReader* Create(const ChromotocolConfig* config); | 26 static VideoReader* Create(const SessionConfig* config); |
29 | 27 |
30 virtual ~VideoReader(); | 28 virtual ~VideoReader(); |
31 | 29 |
32 // Initializies the reader. Doesn't take ownership of either |connection| | 30 // Initializies the reader. Doesn't take ownership of either |connection| |
33 // or |video_stub|. | 31 // or |video_stub|. |
34 virtual void Init(protocol::Session* session, | 32 virtual void Init(Session* session, |
35 VideoStub* video_stub) = 0; | 33 VideoStub* video_stub) = 0; |
36 | 34 |
37 // Closes the reader. The stub should not be called after Close(). | 35 // Closes the reader. The stub should not be called after Close(). |
38 virtual void Close() = 0; | 36 virtual void Close() = 0; |
39 | 37 |
40 protected: | 38 protected: |
41 VideoReader() { } | 39 VideoReader() { } |
42 | 40 |
43 private: | 41 private: |
44 DISALLOW_COPY_AND_ASSIGN(VideoReader); | 42 DISALLOW_COPY_AND_ASSIGN(VideoReader); |
45 }; | 43 }; |
46 | 44 |
47 } // namespace protocol | 45 } // namespace protocol |
48 } // namespace remoting | 46 } // namespace remoting |
49 | 47 |
50 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_ | 48 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_ |
OLD | NEW |