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

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

Issue 5382008: Refactor ZLib and Verbatim encoders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « remoting/base/encoder_row_based_unittest.cc ('k') | remoting/base/encoder_verbatim.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_VERBATIM_H_
6 #define REMOTING_BASE_ENCODER_VERBATIM_H_
7
8 #include "remoting/base/encoder.h"
9
10 #include "gfx/rect.h"
11
12 namespace remoting {
13
14 class UpdateStreamPacket;
15
16 // EncoderVerbatim implements Encoder and simply copies input to the output
17 // buffer verbatim.
18 class EncoderVerbatim : public Encoder {
19 public:
20 EncoderVerbatim();
21 EncoderVerbatim(int packet_size);
22
23 virtual ~EncoderVerbatim() {}
24
25 virtual void Encode(scoped_refptr<CaptureData> capture_data,
26 bool key_frame,
27 DataAvailableCallback* data_available_callback);
28
29 private:
30 // Encode a single dirty rect.
31 void EncodeRect(const gfx::Rect& rect, size_t rect_index);
32
33 // Marks a packets as the first in a series of rectangle updates.
34 void PrepareUpdateStart(const gfx::Rect& rect, VideoPacket* packet);
35
36 // Retrieves a pointer to the output buffer in |update| used for storing the
37 // encoded rectangle data. Will resize the buffer to |size|.
38 uint8* GetOutputBuffer(VideoPacket* packet, size_t size);
39
40 // Submit |message| to |callback_|.
41 void SubmitMessage(VideoPacket* packet, size_t rect_index);
42
43 scoped_refptr<CaptureData> capture_data_;
44 scoped_ptr<DataAvailableCallback> callback_;
45 int packet_size_;
46 };
47
48 } // namespace remoting
49
50 #endif // REMOTING_BASE_ENCODER_VERBATIM_H_
OLDNEW
« no previous file with comments | « remoting/base/encoder_row_based_unittest.cc ('k') | remoting/base/encoder_verbatim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698