Initialize all data members in HTTPResponseInfo's new ctor and remove the related...
[chromium-blink-merge.git] / remoting / base / encoder_zlib.h
blob476135b71bbbcd8634441e9539daa4813208cc5a
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.
5 #ifndef REMOTING_BASE_ENCODER_ZLIB_H_
6 #define REMOTING_BASE_ENCODER_ZLIB_H_
8 #include "remoting/base/encoder.h"
10 #include "gfx/rect.h"
12 namespace remoting {
14 class CompressorZlib;
15 class UpdateStreamPacket;
17 // EncoderZlib implements an Encoder using Zlib for compression.
18 class EncoderZlib : public Encoder {
19 public:
20 EncoderZlib();
21 EncoderZlib(int packet_size);
23 virtual ~EncoderZlib() {}
25 virtual void Encode(scoped_refptr<CaptureData> capture_data,
26 bool key_frame,
27 DataAvailableCallback* data_available_callback);
29 private:
30 // Encode a single dirty rect using compressor.
31 void EncodeRect(CompressorZlib* compressor, const gfx::Rect& rect,
32 size_t rect_index);
34 // Create a new HostMessage with the right flag and attributes. The message
35 // can be used immediately for output of encoding.
36 HostMessage* PrepareMessage(const gfx::Rect* rect);
38 // Submit |message| to |callback_|.
39 void SubmitMessage(HostMessage* message, size_t rect_index);
41 scoped_refptr<CaptureData> capture_data_;
42 scoped_ptr<DataAvailableCallback> callback_;
43 //size_t current_rect_;
44 int packet_size_;
47 } // namespace remoting
49 #endif // REMOTING_BASE_ENCODER_ZLIB_H_