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 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ | 5 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ |
6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ | 6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ |
7 | 7 |
| 8 #include "remoting/proto/video.pb.h" |
8 #include "remoting/protocol/message_reader.h" | 9 #include "remoting/protocol/message_reader.h" |
9 #include "remoting/protocol/video_reader.h" | 10 #include "remoting/protocol/video_reader.h" |
10 | 11 |
11 namespace remoting { | 12 namespace remoting { |
12 namespace protocol { | 13 namespace protocol { |
13 | 14 |
14 class Session; | 15 class Session; |
15 | 16 |
16 class ProtobufVideoReader : public VideoReader { | 17 class ProtobufVideoReader : public VideoReader { |
17 public: | 18 public: |
18 ProtobufVideoReader(); | 19 ProtobufVideoReader(VideoPacketFormat::Encoding encoding); |
19 virtual ~ProtobufVideoReader(); | 20 virtual ~ProtobufVideoReader(); |
20 | 21 |
21 // VideoReader interface. | 22 // VideoReader interface. |
22 virtual void Init(protocol::Session* session, VideoStub* video_stub); | 23 virtual void Init(protocol::Session* session, VideoStub* video_stub); |
23 virtual void Close(); | 24 virtual void Close(); |
24 | 25 |
25 private: | 26 private: |
26 void OnNewData(VideoPacket* packet); | 27 void OnNewData(VideoPacket* packet); |
27 | 28 |
| 29 VideoPacketFormat::Encoding encoding_; |
| 30 |
28 MessageReader reader_; | 31 MessageReader reader_; |
29 | 32 |
30 // The stub that processes all received packets. | 33 // The stub that processes all received packets. |
31 VideoStub* video_stub_; | 34 VideoStub* video_stub_; |
32 | 35 |
33 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoReader); | 36 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoReader); |
34 }; | 37 }; |
35 | 38 |
36 } // namespace protocol | 39 } // namespace protocol |
37 } // namespace remoting | 40 } // namespace remoting |
38 | 41 |
39 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ | 42 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ |
OLD | NEW |