OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_HOST_ENCODER_VERBATIM_H_ |
| 6 #define REMOTING_HOST_ENCODER_VERBATIM_H_ |
| 7 |
| 8 #include "remoting/host/encoder.h" |
| 9 |
| 10 namespace remoting { |
| 11 |
| 12 // EncoderVerbatim implements Encoder and simply copies input to the output |
| 13 // buffer verbatim. |
| 14 class EncoderVerbatim : public Encoder { |
| 15 public: |
| 16 EncoderVerbatim() |
| 17 : width_(0), height_(0), bytes_per_pixel_(0) {} |
| 18 virtual ~EncoderVerbatim() {} |
| 19 |
| 20 virtual void Encode(const DirtyRects& dirty_rects, |
| 21 const uint8** input_data, |
| 22 const int* strides, |
| 23 bool key_frame, |
| 24 chromotocol_pb::UpdateStreamPacketHeader* header, |
| 25 scoped_refptr<media::DataBuffer>* output_data, |
| 26 bool* encode_done, |
| 27 Task* data_available_task); |
| 28 virtual void SetSize(int width, int height); |
| 29 virtual void SetPixelFormat(chromotocol_pb::PixelFormat pixel_format); |
| 30 |
| 31 private: |
| 32 // Encode a single dirty rect. Called by Encode(). |
| 33 // Returns false if there is an error. |
| 34 bool EncodeRect(const gfx::Rect& dirty, |
| 35 const uint8** input_data, |
| 36 const int* strides, |
| 37 chromotocol_pb::UpdateStreamPacketHeader* header, |
| 38 scoped_refptr<media::DataBuffer>* output_data); |
| 39 |
| 40 int width_; |
| 41 int height_; |
| 42 int bytes_per_pixel_; |
| 43 }; |
| 44 |
| 45 } // namespace remoting |
| 46 |
| 47 #endif // REMOTING_HOST_ENCODER_VERBATIM_H_ |
OLD | NEW |