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

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

Issue 2868062: EncoderZlib/DecoderZlib for chromoting (Closed)
Patch Set: from .cc to .c Created 10 years, 4 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/compressor_zlib_unittest.cc ('k') | remoting/base/decoder_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_DECODER_ZLIB_H_
6 #define REMOTING_BASE_DECODER_ZLIB_H_
7
8 #include "remoting/base/decoder.h"
9
10 namespace remoting {
11
12 class DecompressorZlib;
13
14 class DecoderZlib : public Decoder {
15 public:
16 DecoderZlib();
17
18 // Decoder implementations.
19 virtual bool BeginDecode(scoped_refptr<media::VideoFrame> frame,
20 UpdatedRects* update_rects,
21 Task* partial_decode_done,
22 Task* decode_done);
23 virtual bool PartialDecode(HostMessage* message);
24 virtual void EndDecode();
25
26 private:
27 bool HandleBeginRect(HostMessage* message);
28 bool HandleRectData(HostMessage* message);
29 bool HandleEndRect(HostMessage* message);
30
31 // The internal state of the decoder.
32 State state_;
33
34 // Keeps track of the updating rect.
35 int rect_x_;
36 int rect_y_;
37 int rect_width_;
38 int rect_height_;
39 int bytes_per_pixel_;
40
41 // Tasks to call when decode is done.
42 scoped_ptr<Task> partial_decode_done_;
43 scoped_ptr<Task> decode_done_;
44
45 // The video frame to write to.
46 scoped_refptr<media::VideoFrame> frame_;
47 UpdatedRects* updated_rects_;
48
49 // A zlib decompressor used throughout one update sequence.
50 scoped_ptr<DecompressorZlib> decompressor_;
51
52 // The position in the row that we are updating.
53 int row_pos_;
54
55 // The row number in the rect that we are updaing.
56 int row_y_;
57
58 DISALLOW_COPY_AND_ASSIGN(DecoderZlib);
59 };
60
61 } // namespace remoting
62
63 #endif // REMOTING_BASE_DECODER_ZLIB_H_
OLDNEW
« no previous file with comments | « remoting/base/compressor_zlib_unittest.cc ('k') | remoting/base/decoder_zlib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698