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_HOST_ENCODER_VERBATIM_H_ | 5 #ifndef REMOTING_BASE_ENCODER_VERBATIM_H_ |
6 #define REMOTING_HOST_ENCODER_VERBATIM_H_ | 6 #define REMOTING_BASE_ENCODER_VERBATIM_H_ |
7 | 7 |
8 #include "remoting/host/encoder.h" | 8 #include "remoting/base/encoder.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 class UpdateStreamPacket; | 12 class UpdateStreamPacket; |
13 | 13 |
14 // EncoderVerbatim implements Encoder and simply copies input to the output | 14 // EncoderVerbatim implements Encoder and simply copies input to the output |
15 // buffer verbatim. | 15 // buffer verbatim. |
16 class EncoderVerbatim : public Encoder { | 16 class EncoderVerbatim : public Encoder { |
17 public: | 17 public: |
18 EncoderVerbatim() {} | 18 EncoderVerbatim() {} |
19 virtual ~EncoderVerbatim() {} | 19 virtual ~EncoderVerbatim() {} |
20 | 20 |
21 virtual void Encode(scoped_refptr<Capturer::CaptureData> capture_data, | 21 virtual void Encode(scoped_refptr<CaptureData> capture_data, |
22 bool key_frame, | 22 bool key_frame, |
23 DataAvailableCallback* data_available_callback); | 23 DataAvailableCallback* data_available_callback); |
24 | 24 |
25 private: | 25 private: |
26 // Encode a single dirty rect. Called by Encode(). Output is written | 26 // Encode a single dirty rect. Called by Encode(). Output is written |
27 // to |msg|. | 27 // to |msg|. |
28 // Returns false if there is an error. | 28 // Returns false if there is an error. |
29 bool EncodeRect(const gfx::Rect& dirty, | 29 bool EncodeRect(int x, int y, int width, int height, |
30 const scoped_refptr<Capturer::CaptureData>& capture_data, | 30 const scoped_refptr<CaptureData>& capture_data, |
31 UpdateStreamPacketMessage* msg); | 31 UpdateStreamPacketMessage* msg); |
32 }; | 32 }; |
33 | 33 |
34 } // namespace remoting | 34 } // namespace remoting |
35 | 35 |
36 #endif // REMOTING_HOST_ENCODER_VERBATIM_H_ | 36 #endif // REMOTING_BASE_ENCODER_VERBATIM_H_ |
OLD | NEW |