Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Side by Side Diff: remoting/base/encoder_zlib.h

Issue 2868062: EncoderZlib/DecoderZlib for chromoting (Closed)
Patch Set: from .cc to .c Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/base/encoder_verbatim.cc ('k') | remoting/base/encoder_zlib.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_BASE_ENCODER_ZLIB_H_
6 #define REMOTING_BASE_ENCODER_ZLIB_H_
7
8 #include "remoting/base/encoder.h"
9
10 namespace remoting {
11
12 class CompressorZlib;
13 class UpdateStreamPacket;
14
15 // EncoderZlib implements an Encoder using Zlib for compression.
16 class EncoderZlib : public Encoder {
17 public:
18 EncoderZlib();
19 EncoderZlib(int packet_size);
20
21 virtual ~EncoderZlib() {}
22
23 virtual void Encode(scoped_refptr<CaptureData> capture_data,
24 bool key_frame,
25 DataAvailableCallback* data_available_callback);
26
27 private:
28 // Encode a single dirty rect using compressor.
29 void EncodeRect(CompressorZlib* compressor);
30
31 // Create a new HostMessage with the right flag and attributes. The message
32 // can be used immediately for output of encoding.
33 HostMessage* PrepareMessage(bool new_rect);
34
35 // Submit |message| to |callback_|.
36 void SubmitMessage(HostMessage* message);
37
38 scoped_refptr<CaptureData> capture_data_;
39 scoped_ptr<DataAvailableCallback> callback_;
40 size_t current_rect_;
41 int packet_size_;
42 };
43
44 } // namespace remoting
45
46 #endif // REMOTING_BASE_ENCODER_ZLIB_H_
OLDNEW
« no previous file with comments | « remoting/base/encoder_verbatim.cc ('k') | remoting/base/encoder_zlib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698