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